diff --git a/java-backupdr/google-cloud-backupdr-bom/pom.xml b/java-backupdr/google-cloud-backupdr-bom/pom.xml index f9da680ca671..ce2e77c660cf 100644 --- a/java-backupdr/google-cloud-backupdr-bom/pom.xml +++ b/java-backupdr/google-cloud-backupdr-bom/pom.xml @@ -34,11 +34,21 @@ grpc-google-cloud-backupdr-v1 0.57.0-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-backupdr-v1beta + 0.57.0-SNAPSHOT + com.google.api.grpc proto-google-cloud-backupdr-v1 0.57.0-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-backupdr-v1beta + 0.57.0-SNAPSHOT + diff --git a/java-backupdr/google-cloud-backupdr/pom.xml b/java-backupdr/google-cloud-backupdr/pom.xml index c9e98105a43e..6e9db1bf0518 100644 --- a/java-backupdr/google-cloud-backupdr/pom.xml +++ b/java-backupdr/google-cloud-backupdr/pom.xml @@ -46,6 +46,10 @@ com.google.api.grpc proto-google-cloud-backupdr-v1 + + com.google.api.grpc + proto-google-cloud-backupdr-v1beta + com.google.guava @@ -95,6 +99,11 @@ grpc-google-cloud-backupdr-v1 test + + com.google.api.grpc + grpc-google-cloud-backupdr-v1beta + test + diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRClient.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRClient.java new file mode 100644 index 000000000000..8844f9cd5865 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRClient.java @@ -0,0 +1,11031 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.stub.BackupDRStub; +import com.google.cloud.backupdr.v1beta.stub.BackupDRStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The BackupDR Service + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+ *   ManagementServerName name =
+ *       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
+ *   ManagementServer response = backupDRClient.getManagementServer(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the BackupDRClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

ListManagementServers

Lists ManagementServers in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listManagementServers(ListManagementServersRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listManagementServers(LocationName parent) + *

  • listManagementServers(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listManagementServersPagedCallable() + *

  • listManagementServersCallable() + *

+ *

GetManagementServer

Gets details of a single ManagementServer.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getManagementServer(GetManagementServerRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getManagementServer(ManagementServerName name) + *

  • getManagementServer(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getManagementServerCallable() + *

+ *

CreateManagementServer

Creates a new ManagementServer in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createManagementServerAsync(CreateManagementServerRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createManagementServerAsync(LocationName parent, ManagementServer managementServer, String managementServerId) + *

  • createManagementServerAsync(String parent, ManagementServer managementServer, String managementServerId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createManagementServerOperationCallable() + *

  • createManagementServerCallable() + *

+ *

DeleteManagementServer

Deletes a single ManagementServer.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteManagementServerAsync(DeleteManagementServerRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteManagementServerAsync(ManagementServerName name) + *

  • deleteManagementServerAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteManagementServerOperationCallable() + *

  • deleteManagementServerCallable() + *

+ *

CreateBackupVault

Creates a new BackupVault in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createBackupVaultAsync(CreateBackupVaultRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createBackupVaultAsync(LocationName parent, BackupVault backupVault, String backupVaultId) + *

  • createBackupVaultAsync(String parent, BackupVault backupVault, String backupVaultId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createBackupVaultOperationCallable() + *

  • createBackupVaultCallable() + *

+ *

ListBackupVaults

Lists BackupVaults in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBackupVaults(ListBackupVaultsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBackupVaults(LocationName parent) + *

  • listBackupVaults(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBackupVaultsPagedCallable() + *

  • listBackupVaultsCallable() + *

+ *

FetchUsableBackupVaults

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • fetchUsableBackupVaults(FetchUsableBackupVaultsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • fetchUsableBackupVaults(LocationName parent) + *

  • fetchUsableBackupVaults(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • fetchUsableBackupVaultsPagedCallable() + *

  • fetchUsableBackupVaultsCallable() + *

+ *

GetBackupVault

Gets details of a BackupVault.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBackupVault(GetBackupVaultRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBackupVault(BackupVaultName name) + *

  • getBackupVault(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBackupVaultCallable() + *

+ *

UpdateBackupVault

Updates the settings of a BackupVault.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateBackupVaultAsync(UpdateBackupVaultRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateBackupVaultAsync(BackupVault backupVault, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateBackupVaultOperationCallable() + *

  • updateBackupVaultCallable() + *

+ *

DeleteBackupVault

Deletes a BackupVault.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteBackupVaultAsync(DeleteBackupVaultRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteBackupVaultAsync(BackupVaultName name) + *

  • deleteBackupVaultAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteBackupVaultOperationCallable() + *

  • deleteBackupVaultCallable() + *

+ *

ListDataSources

Lists DataSources in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDataSources(ListDataSourcesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDataSources(BackupVaultName parent) + *

  • listDataSources(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDataSourcesPagedCallable() + *

  • listDataSourcesCallable() + *

+ *

GetDataSource

Gets details of a DataSource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getDataSource(GetDataSourceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getDataSource(DataSourceName name) + *

  • getDataSource(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getDataSourceCallable() + *

+ *

UpdateDataSource

Updates the settings of a DataSource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateDataSourceAsync(UpdateDataSourceRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateDataSourceAsync(DataSource dataSource, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateDataSourceOperationCallable() + *

  • updateDataSourceCallable() + *

+ *

ListBackups

Lists Backups in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBackups(ListBackupsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBackups(DataSourceName parent) + *

  • listBackups(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBackupsPagedCallable() + *

  • listBackupsCallable() + *

+ *

FetchBackupsForResourceType

Fetch Backups for a given resource type.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • fetchBackupsForResourceType(FetchBackupsForResourceTypeRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • fetchBackupsForResourceType(DataSourceName parent, String resourceType) + *

  • fetchBackupsForResourceType(String parent, String resourceType) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • fetchBackupsForResourceTypePagedCallable() + *

  • fetchBackupsForResourceTypeCallable() + *

+ *

GetBackup

Gets details of a Backup.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBackup(GetBackupRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBackup(BackupName name) + *

  • getBackup(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBackupCallable() + *

+ *

UpdateBackup

Updates the settings of a Backup.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateBackupAsync(UpdateBackupRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateBackupAsync(Backup backup, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateBackupOperationCallable() + *

  • updateBackupCallable() + *

+ *

DeleteBackup

Deletes a Backup.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteBackupAsync(DeleteBackupRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteBackupAsync(BackupName name) + *

  • deleteBackupAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteBackupOperationCallable() + *

  • deleteBackupCallable() + *

+ *

RestoreBackup

Restore from a Backup

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • restoreBackupAsync(RestoreBackupRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • restoreBackupAsync(BackupName name) + *

  • restoreBackupAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • restoreBackupOperationCallable() + *

  • restoreBackupCallable() + *

+ *

CreateBackupPlan

Create a BackupPlan

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createBackupPlanAsync(CreateBackupPlanRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createBackupPlanAsync(LocationName parent, BackupPlan backupPlan, String backupPlanId) + *

  • createBackupPlanAsync(String parent, BackupPlan backupPlan, String backupPlanId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createBackupPlanOperationCallable() + *

  • createBackupPlanCallable() + *

+ *

UpdateBackupPlan

Update a BackupPlan.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateBackupPlanAsync(UpdateBackupPlanRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateBackupPlanAsync(BackupPlan backupPlan, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateBackupPlanOperationCallable() + *

  • updateBackupPlanCallable() + *

+ *

GetBackupPlan

Gets details of a single BackupPlan.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBackupPlan(GetBackupPlanRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBackupPlan(BackupPlanName name) + *

  • getBackupPlan(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBackupPlanCallable() + *

+ *

ListBackupPlans

Lists BackupPlans in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBackupPlans(ListBackupPlansRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBackupPlans(LocationName parent) + *

  • listBackupPlans(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBackupPlansPagedCallable() + *

  • listBackupPlansCallable() + *

+ *

DeleteBackupPlan

Deletes a single BackupPlan.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteBackupPlanAsync(DeleteBackupPlanRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteBackupPlanAsync(BackupPlanName name) + *

  • deleteBackupPlanAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteBackupPlanOperationCallable() + *

  • deleteBackupPlanCallable() + *

+ *

GetBackupPlanRevision

Gets details of a single BackupPlanRevision.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBackupPlanRevision(GetBackupPlanRevisionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBackupPlanRevision(BackupPlanRevisionName name) + *

  • getBackupPlanRevision(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBackupPlanRevisionCallable() + *

+ *

ListBackupPlanRevisions

Lists BackupPlanRevisions in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBackupPlanRevisions(ListBackupPlanRevisionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBackupPlanRevisions(BackupPlanName parent) + *

  • listBackupPlanRevisions(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBackupPlanRevisionsPagedCallable() + *

  • listBackupPlanRevisionsCallable() + *

+ *

CreateBackupPlanAssociation

Create a BackupPlanAssociation

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createBackupPlanAssociationAsync(LocationName parent, BackupPlanAssociation backupPlanAssociation, String backupPlanAssociationId) + *

  • createBackupPlanAssociationAsync(String parent, BackupPlanAssociation backupPlanAssociation, String backupPlanAssociationId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createBackupPlanAssociationOperationCallable() + *

  • createBackupPlanAssociationCallable() + *

+ *

UpdateBackupPlanAssociation

Update a BackupPlanAssociation.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateBackupPlanAssociationAsync(UpdateBackupPlanAssociationRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateBackupPlanAssociationAsync(BackupPlanAssociation backupPlanAssociation, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateBackupPlanAssociationOperationCallable() + *

  • updateBackupPlanAssociationCallable() + *

+ *

GetBackupPlanAssociation

Gets details of a single BackupPlanAssociation.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBackupPlanAssociation(GetBackupPlanAssociationRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBackupPlanAssociation(BackupPlanAssociationName name) + *

  • getBackupPlanAssociation(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBackupPlanAssociationCallable() + *

+ *

ListBackupPlanAssociations

Lists BackupPlanAssociations in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBackupPlanAssociations(ListBackupPlanAssociationsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBackupPlanAssociations(LocationName parent) + *

  • listBackupPlanAssociations(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBackupPlanAssociationsPagedCallable() + *

  • listBackupPlanAssociationsCallable() + *

+ *

FetchBackupPlanAssociationsForResourceType

List BackupPlanAssociations for a given resource type.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • fetchBackupPlanAssociationsForResourceType(FetchBackupPlanAssociationsForResourceTypeRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • fetchBackupPlanAssociationsForResourceType(LocationName parent, String resourceType) + *

  • fetchBackupPlanAssociationsForResourceType(String parent, String resourceType) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • fetchBackupPlanAssociationsForResourceTypePagedCallable() + *

  • fetchBackupPlanAssociationsForResourceTypeCallable() + *

+ *

DeleteBackupPlanAssociation

Deletes a single BackupPlanAssociation.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteBackupPlanAssociationAsync(BackupPlanAssociationName name) + *

  • deleteBackupPlanAssociationAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteBackupPlanAssociationOperationCallable() + *

  • deleteBackupPlanAssociationCallable() + *

+ *

TriggerBackup

Triggers a new Backup.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • triggerBackupAsync(TriggerBackupRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • triggerBackupAsync(BackupPlanAssociationName name, String ruleId) + *

  • triggerBackupAsync(String name, String ruleId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • triggerBackupOperationCallable() + *

  • triggerBackupCallable() + *

+ *

GetDataSourceReference

Gets details of a single DataSourceReference.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getDataSourceReference(GetDataSourceReferenceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getDataSourceReference(DataSourceReferenceName name) + *

  • getDataSourceReference(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getDataSourceReferenceCallable() + *

+ *

ListDataSourceReferences

Lists DataSourceReferences for a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listDataSourceReferences(ListDataSourceReferencesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listDataSourceReferences(LocationName parent) + *

  • listDataSourceReferences(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listDataSourceReferencesPagedCallable() + *

  • listDataSourceReferencesCallable() + *

+ *

FetchDataSourceReferencesForResourceType

Fetch DataSourceReferences for a given project, location and resource type.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • fetchDataSourceReferencesForResourceType(FetchDataSourceReferencesForResourceTypeRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • fetchDataSourceReferencesForResourceType(LocationName parent, String resourceType) + *

  • fetchDataSourceReferencesForResourceType(String parent, String resourceType) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • fetchDataSourceReferencesForResourceTypePagedCallable() + *

  • fetchDataSourceReferencesForResourceTypeCallable() + *

+ *

InitializeService

Initializes the service related config for a project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • initializeServiceAsync(InitializeServiceRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • initializeServiceOperationCallable() + *

  • initializeServiceCallable() + *

+ *

CreateAutoProtectionPolicy

Creates a new AutoProtectionPolicy in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAutoProtectionPolicyAsync(CreateAutoProtectionPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createAutoProtectionPolicyAsync(LocationName parent, AutoProtectionPolicy autoProtectionPolicy, String autoProtectionPolicyId) + *

  • createAutoProtectionPolicyAsync(String parent, AutoProtectionPolicy autoProtectionPolicy, String autoProtectionPolicyId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAutoProtectionPolicyOperationCallable() + *

  • createAutoProtectionPolicyCallable() + *

+ *

ListAutoProtectionPolicies

Lists AutoProtectionPolicies for a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAutoProtectionPolicies(ListAutoProtectionPoliciesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAutoProtectionPolicies(LocationName parent) + *

  • listAutoProtectionPolicies(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAutoProtectionPoliciesPagedCallable() + *

  • listAutoProtectionPoliciesCallable() + *

+ *

GetAutoProtectionPolicy

Gets details of a single AutoProtectionPolicy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAutoProtectionPolicy(GetAutoProtectionPolicyRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAutoProtectionPolicy(AutoProtectionPolicyName name) + *

  • getAutoProtectionPolicy(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAutoProtectionPolicyCallable() + *

+ *

UpdateAutoProtectionPolicy

Updates the parameters of a single AutoProtectionPolicy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAutoProtectionPolicyAsync(UpdateAutoProtectionPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateAutoProtectionPolicyAsync(AutoProtectionPolicy autoProtectionPolicy, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAutoProtectionPolicyOperationCallable() + *

  • updateAutoProtectionPolicyCallable() + *

+ *

DeleteAutoProtectionPolicy

Deletes a single AutoProtectionPolicy.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteAutoProtectionPolicyAsync(DeleteAutoProtectionPolicyRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteAutoProtectionPolicyAsync(AutoProtectionPolicyName name) + *

  • deleteAutoProtectionPolicyAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteAutoProtectionPolicyOperationCallable() + *

  • deleteAutoProtectionPolicyCallable() + *

+ *

CreateAutoProtectionPolicyBinding

Creates a new AutoProtectionPolicyBinding in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAutoProtectionPolicyBindingAsync(CreateAutoProtectionPolicyBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createAutoProtectionPolicyBindingAsync(AutoProtectionPolicyName parent, AutoProtectionPolicyBinding autoProtectionPolicyBinding, String autoProtectionPolicyBindingId) + *

  • createAutoProtectionPolicyBindingAsync(String parent, AutoProtectionPolicyBinding autoProtectionPolicyBinding, String autoProtectionPolicyBindingId) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAutoProtectionPolicyBindingOperationCallable() + *

  • createAutoProtectionPolicyBindingCallable() + *

+ *

GetAutoProtectionPolicyBinding

Returns the auto protection policy binding read from the CCFE tables.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAutoProtectionPolicyBinding(GetAutoProtectionPolicyBindingRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAutoProtectionPolicyBinding(AutoProtectionPolicyBindingName name) + *

  • getAutoProtectionPolicyBinding(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAutoProtectionPolicyBindingCallable() + *

+ *

ListAutoProtectionPolicyBindings

Returns the auto protection policy bindings read from the CCFE tables.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAutoProtectionPolicyBindings(ListAutoProtectionPolicyBindingsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAutoProtectionPolicyBindings(AutoProtectionPolicyName parent) + *

  • listAutoProtectionPolicyBindings(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAutoProtectionPolicyBindingsPagedCallable() + *

  • listAutoProtectionPolicyBindingsCallable() + *

+ *

ListAppliedAutoProtectionPolicies

Lists AppliedAutoProtectionPolicies in a given project and location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAppliedAutoProtectionPolicies(ListAppliedAutoProtectionPoliciesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAppliedAutoProtectionPolicies(LocationName parent) + *

  • listAppliedAutoProtectionPolicies(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAppliedAutoProtectionPoliciesPagedCallable() + *

  • listAppliedAutoProtectionPoliciesCallable() + *

+ *

InitiateDeleteAutoProtectionPolicyBinding

InitiateDeleteAutoProtectionPolicyBinding initiates delete for AutoProtectionPolicy Binding

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • initiateDeleteAutoProtectionPolicyBindingAsync(InitiateDeleteAutoProtectionPolicyBindingRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • initiateDeleteAutoProtectionPolicyBindingAsync(AutoProtectionPolicyBindingName name) + *

  • initiateDeleteAutoProtectionPolicyBindingAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • initiateDeleteAutoProtectionPolicyBindingOperationCallable() + *

  • initiateDeleteAutoProtectionPolicyBindingCallable() + *

+ *

GetBindingMatchingResource

Gets details of a single Binding Matching Resource.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getBindingMatchingResource(GetBindingMatchingResourceRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getBindingMatchingResource(BindingMatchingResourceName name) + *

  • getBindingMatchingResource(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getBindingMatchingResourceCallable() + *

+ *

ListBindingMatchingResources

Lists Binding Matching Resources for a given AutoProtectionPolicyBinding.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listBindingMatchingResources(ListBindingMatchingResourcesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listBindingMatchingResources(AutoProtectionPolicyBindingName parent) + *

  • listBindingMatchingResources(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listBindingMatchingResourcesPagedCallable() + *

  • listBindingMatchingResourcesCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service. + *

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of BackupDRSettings to create(). + * For example: + * + *

To customize credentials: + * + *

{@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
+ * BackupDRSettings backupDRSettings =
+ *     BackupDRSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * BackupDRSettings backupDRSettings =
+ *     BackupDRSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * BackupDRSettings backupDRSettings = BackupDRSettings.newHttpJsonBuilder().build();
+ * BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class BackupDRClient implements BackgroundResource { + private final @Nullable BackupDRSettings settings; + private final BackupDRStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of BackupDRClient with default settings. */ + public static final BackupDRClient create() throws IOException { + return create(BackupDRSettings.newBuilder().build()); + } + + /** + * Constructs an instance of BackupDRClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final BackupDRClient create(BackupDRSettings settings) throws IOException { + return new BackupDRClient(settings); + } + + /** + * Constructs an instance of BackupDRClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(BackupDRSettings). + */ + public static final BackupDRClient create(BackupDRStub stub) { + return new BackupDRClient(stub); + } + + /** + * Constructs an instance of BackupDRClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected BackupDRClient(BackupDRSettings settings) throws IOException { + this.settings = settings; + this.stub = ((BackupDRStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected BackupDRClient(BackupDRStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final @Nullable BackupDRSettings getSettings() { + return settings; + } + + public BackupDRStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ManagementServers in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ManagementServer element : backupDRClient.listManagementServers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud + * Backup and DR, locations map to Google Cloud regions, for example + * + * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListManagementServersPagedResponse listManagementServers( + @Nullable LocationName parent) { + ListManagementServersRequest request = + ListManagementServersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listManagementServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ManagementServers in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (ManagementServer element : backupDRClient.listManagementServers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud + * Backup and DR, locations map to Google Cloud regions, for example + * + * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListManagementServersPagedResponse listManagementServers(String parent) { + ListManagementServersRequest request = + ListManagementServersRequest.newBuilder().setParent(parent).build(); + return listManagementServers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ManagementServers in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListManagementServersRequest request =
+   *       ListManagementServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ManagementServer element : backupDRClient.listManagementServers(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 ListManagementServersPagedResponse listManagementServers( + ListManagementServersRequest request) { + return listManagementServersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ManagementServers in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListManagementServersRequest request =
+   *       ListManagementServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listManagementServersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ManagementServer element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listManagementServersPagedCallable() { + return stub.listManagementServersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ManagementServers in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListManagementServersRequest request =
+   *       ListManagementServersRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListManagementServersResponse response =
+   *         backupDRClient.listManagementServersCallable().call(request);
+   *     for (ManagementServer element : response.getManagementServersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listManagementServersCallable() { + return stub.listManagementServersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ManagementServerName name =
+   *       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
+   *   ManagementServer response = backupDRClient.getManagementServer(name);
+   * }
+   * }
+ * + * @param name Required. Name of the management server resource name, in the format + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ManagementServer getManagementServer(@Nullable ManagementServerName name) { + GetManagementServerRequest request = + GetManagementServerRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getManagementServer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString();
+   *   ManagementServer response = backupDRClient.getManagementServer(name);
+   * }
+   * }
+ * + * @param name Required. Name of the management server resource name, in the format + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ManagementServer getManagementServer(String name) { + GetManagementServerRequest request = + GetManagementServerRequest.newBuilder().setName(name).build(); + return getManagementServer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetManagementServerRequest request =
+   *       GetManagementServerRequest.newBuilder()
+   *           .setName(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .build();
+   *   ManagementServer response = backupDRClient.getManagementServer(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 ManagementServer getManagementServer(GetManagementServerRequest request) { + return getManagementServerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetManagementServerRequest request =
+   *       GetManagementServerRequest.newBuilder()
+   *           .setName(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.getManagementServerCallable().futureCall(request);
+   *   // Do something.
+   *   ManagementServer response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getManagementServerCallable() { + return stub.getManagementServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ManagementServer in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ManagementServer managementServer = ManagementServer.newBuilder().build();
+   *   String managementServerId = "managementServerId-1229628127";
+   *   ManagementServer response =
+   *       backupDRClient
+   *           .createManagementServerAsync(parent, managementServer, managementServerId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR locations map + * to Google Cloud regions, for example **us-central1**. + * @param managementServer Required. A [management server + * resource][google.cloud.backupdr.v1.ManagementServer] + * @param managementServerId Required. The name of the management server to create. The name must + * be unique for the specified project and location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createManagementServerAsync( + @Nullable LocationName parent, ManagementServer managementServer, String managementServerId) { + CreateManagementServerRequest request = + CreateManagementServerRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setManagementServer(managementServer) + .setManagementServerId(managementServerId) + .build(); + return createManagementServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ManagementServer in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ManagementServer managementServer = ManagementServer.newBuilder().build();
+   *   String managementServerId = "managementServerId-1229628127";
+   *   ManagementServer response =
+   *       backupDRClient
+   *           .createManagementServerAsync(parent, managementServer, managementServerId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR locations map + * to Google Cloud regions, for example **us-central1**. + * @param managementServer Required. A [management server + * resource][google.cloud.backupdr.v1.ManagementServer] + * @param managementServerId Required. The name of the management server to create. The name must + * be unique for the specified project and location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createManagementServerAsync( + String parent, ManagementServer managementServer, String managementServerId) { + CreateManagementServerRequest request = + CreateManagementServerRequest.newBuilder() + .setParent(parent) + .setManagementServer(managementServer) + .setManagementServerId(managementServerId) + .build(); + return createManagementServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ManagementServer in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateManagementServerRequest request =
+   *       CreateManagementServerRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setManagementServerId("managementServerId-1229628127")
+   *           .setManagementServer(ManagementServer.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ManagementServer response = backupDRClient.createManagementServerAsync(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 createManagementServerAsync( + CreateManagementServerRequest request) { + return createManagementServerOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ManagementServer in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateManagementServerRequest request =
+   *       CreateManagementServerRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setManagementServerId("managementServerId-1229628127")
+   *           .setManagementServer(ManagementServer.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.createManagementServerOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ManagementServer response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createManagementServerOperationCallable() { + return stub.createManagementServerOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new ManagementServer in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateManagementServerRequest request =
+   *       CreateManagementServerRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setManagementServerId("managementServerId-1229628127")
+   *           .setManagementServer(ManagementServer.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.createManagementServerCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createManagementServerCallable() { + return stub.createManagementServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ManagementServerName name =
+   *       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
+   *   backupDRClient.deleteManagementServerAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteManagementServerAsync( + @Nullable ManagementServerName name) { + DeleteManagementServerRequest request = + DeleteManagementServerRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteManagementServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString();
+   *   backupDRClient.deleteManagementServerAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteManagementServerAsync(String name) { + DeleteManagementServerRequest request = + DeleteManagementServerRequest.newBuilder().setName(name).build(); + return deleteManagementServerAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteManagementServerRequest request =
+   *       DeleteManagementServerRequest.newBuilder()
+   *           .setName(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   backupDRClient.deleteManagementServerAsync(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 deleteManagementServerAsync( + DeleteManagementServerRequest request) { + return deleteManagementServerOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteManagementServerRequest request =
+   *       DeleteManagementServerRequest.newBuilder()
+   *           .setName(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.deleteManagementServerOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteManagementServerOperationCallable() { + return stub.deleteManagementServerOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single ManagementServer. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteManagementServerRequest request =
+   *       DeleteManagementServerRequest.newBuilder()
+   *           .setName(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.deleteManagementServerCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteManagementServerCallable() { + return stub.deleteManagementServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new BackupVault in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   BackupVault backupVault = BackupVault.newBuilder().build();
+   *   String backupVaultId = "backupVaultId-1897432373";
+   *   BackupVault response =
+   *       backupDRClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param backupVault Required. The resource being created + * @param backupVaultId Required. ID of the requesting object If auto-generating ID server-side, + * remove this field and backup_vault_id from the method_signature of Create RPC + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBackupVaultAsync( + @Nullable 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 a new BackupVault in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   BackupVault backupVault = BackupVault.newBuilder().build();
+   *   String backupVaultId = "backupVaultId-1897432373";
+   *   BackupVault response =
+   *       backupDRClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param backupVault Required. The resource being created + * @param backupVaultId Required. ID of the requesting object If auto-generating ID server-side, + * remove this field and backup_vault_id from the method_signature of Create RPC + * @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 a new BackupVault in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupVaultRequest request =
+   *       CreateBackupVaultRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupVaultId("backupVaultId-1897432373")
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   BackupVault response = backupDRClient.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 a new BackupVault in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupVaultRequest request =
+   *       CreateBackupVaultRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupVaultId("backupVaultId-1897432373")
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.createBackupVaultOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupVault response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBackupVaultOperationCallable() { + return stub.createBackupVaultOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new BackupVault in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupVaultRequest request =
+   *       CreateBackupVaultRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupVaultId("backupVaultId-1897432373")
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = backupDRClient.createBackupVaultCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBackupVaultCallable() { + return stub.createBackupVaultCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupVaults in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (BackupVault element : backupDRClient.listBackupVaults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud + * Backup and DR, locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. To retrieve backupvault stores for all locations, use "-" + * for the '{location}' value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupVaultsPagedResponse listBackupVaults(@Nullable LocationName parent) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBackupVaults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupVaults in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (BackupVault element : backupDRClient.listBackupVaults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud + * Backup and DR, locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. To retrieve backupvault stores for all locations, use "-" + * for the '{location}' value. + *
+ * + * @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. + /** + * Lists BackupVaults in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupVaultsRequest request =
+   *       ListBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupVaultView.forNumber(0))
+   *           .build();
+   *   for (BackupVault element : backupDRClient.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. + /** + * Lists BackupVaults in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupVaultsRequest request =
+   *       ListBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupVaultView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.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. + /** + * Lists BackupVaults in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupVaultsRequest request =
+   *       ListBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupVaultView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListBackupVaultsResponse response = backupDRClient.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. + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable + * BackupVault are the ones that user has backupdr.backupVaults.get permission. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (BackupVault element : backupDRClient.fetchUsableBackupVaults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud + * Backup and DR, locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. To retrieve backupvault stores for all locations, use "-" + * for the '{location}' value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchUsableBackupVaultsPagedResponse fetchUsableBackupVaults( + @Nullable LocationName parent) { + FetchUsableBackupVaultsRequest request = + FetchUsableBackupVaultsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return fetchUsableBackupVaults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable + * BackupVault are the ones that user has backupdr.backupVaults.get permission. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (BackupVault element : backupDRClient.fetchUsableBackupVaults(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud + * Backup and DR, locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. To retrieve backupvault stores for all locations, use "-" + * for the '{location}' value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchUsableBackupVaultsPagedResponse fetchUsableBackupVaults(String parent) { + FetchUsableBackupVaultsRequest request = + FetchUsableBackupVaultsRequest.newBuilder().setParent(parent).build(); + return fetchUsableBackupVaults(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable + * BackupVault are the ones that user has backupdr.backupVaults.get permission. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchUsableBackupVaultsRequest request =
+   *       FetchUsableBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (BackupVault element : backupDRClient.fetchUsableBackupVaults(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 FetchUsableBackupVaultsPagedResponse fetchUsableBackupVaults( + FetchUsableBackupVaultsRequest request) { + return fetchUsableBackupVaultsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable + * BackupVault are the ones that user has backupdr.backupVaults.get permission. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchUsableBackupVaultsRequest request =
+   *       FetchUsableBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.fetchUsableBackupVaultsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BackupVault element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + fetchUsableBackupVaultsPagedCallable() { + return stub.fetchUsableBackupVaultsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable + * BackupVault are the ones that user has backupdr.backupVaults.get permission. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchUsableBackupVaultsRequest request =
+   *       FetchUsableBackupVaultsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     FetchUsableBackupVaultsResponse response =
+   *         backupDRClient.fetchUsableBackupVaultsCallable().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 + fetchUsableBackupVaultsCallable() { + return stub.fetchUsableBackupVaultsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
+   *   BackupVault response = backupDRClient.getBackupVault(name);
+   * }
+   * }
+ * + * @param name Required. Name of the backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupVault getBackupVault(@Nullable BackupVaultName name) { + GetBackupVaultRequest request = + GetBackupVaultRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBackupVault(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString();
+   *   BackupVault response = backupDRClient.getBackupVault(name);
+   * }
+   * }
+ * + * @param name Required. Name of the backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + * @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. + /** + * Gets details of 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupVaultRequest request =
+   *       GetBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
+   *           .setView(BackupVaultView.forNumber(0))
+   *           .build();
+   *   BackupVault response = backupDRClient.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. + /** + * Gets details of 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupVaultRequest request =
+   *       GetBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
+   *           .setView(BackupVaultView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = backupDRClient.getBackupVaultCallable().futureCall(request);
+   *   // Do something.
+   *   BackupVault response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupVaultCallable() { + return stub.getBackupVaultCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupVault backupVault = BackupVault.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   BackupVault response = backupDRClient.updateBackupVaultAsync(backupVault, updateMask).get();
+   * }
+   * }
+ * + * @param backupVault Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * BackupVault 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 the request will fail. + * @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 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupVaultRequest request =
+   *       UpdateBackupVaultRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .setForceUpdateAccessRestriction(true)
+   *           .build();
+   *   BackupVault response = backupDRClient.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 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupVaultRequest request =
+   *       UpdateBackupVaultRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .setForceUpdateAccessRestriction(true)
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.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 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupVaultRequest request =
+   *       UpdateBackupVaultRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackupVault(BackupVault.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setForce(true)
+   *           .setForceUpdateAccessRestriction(true)
+   *           .build();
+   *   ApiFuture future = backupDRClient.updateBackupVaultCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateBackupVaultCallable() { + return stub.updateBackupVaultCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
+   *   backupDRClient.deleteBackupVaultAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupVaultAsync( + @Nullable BackupVaultName name) { + DeleteBackupVaultRequest request = + DeleteBackupVaultRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteBackupVaultAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString();
+   *   backupDRClient.deleteBackupVaultAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @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. + /** + * Deletes 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupVaultRequest request =
+   *       DeleteBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setIgnoreBackupPlanReferences(true)
+   *           .build();
+   *   backupDRClient.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. + /** + * Deletes 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupVaultRequest request =
+   *       DeleteBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setIgnoreBackupPlanReferences(true)
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.deleteBackupVaultOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupVaultOperationCallable() { + return stub.deleteBackupVaultOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupVaultRequest request =
+   *       DeleteBackupVaultRequest.newBuilder()
+   *           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setForce(true)
+   *           .setEtag("etag3123477")
+   *           .setValidateOnly(true)
+   *           .setAllowMissing(true)
+   *           .setIgnoreBackupPlanReferences(true)
+   *           .build();
+   *   ApiFuture future = backupDRClient.deleteBackupVaultCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupVaultCallable() { + return stub.deleteBackupVaultCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSources in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
+   *   for (DataSource element : backupDRClient.listDataSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve data sources + * information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud + * Backup and DR, locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. To retrieve data sources for all locations, use "-" for + * the '{location}' value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataSourcesPagedResponse listDataSources(@Nullable BackupVaultName parent) { + ListDataSourcesRequest request = + ListDataSourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSources in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString();
+   *   for (DataSource element : backupDRClient.listDataSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve data sources + * information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud + * Backup and DR, locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. To retrieve data sources for all locations, use "-" for + * the '{location}' value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataSourcesPagedResponse listDataSources(String parent) { + ListDataSourcesRequest request = ListDataSourcesRequest.newBuilder().setParent(parent).build(); + return listDataSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSources in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListDataSourcesRequest request =
+   *       ListDataSourcesRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DataSource element : backupDRClient.listDataSources(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 ListDataSourcesPagedResponse listDataSources(ListDataSourcesRequest request) { + return listDataSourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSources in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListDataSourcesRequest request =
+   *       ListDataSourcesRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listDataSourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataSource element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataSourcesPagedCallable() { + return stub.listDataSourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSources in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListDataSourcesRequest request =
+   *       ListDataSourcesRequest.newBuilder()
+   *           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDataSourcesResponse response = backupDRClient.listDataSourcesCallable().call(request);
+   *     for (DataSource element : response.getDataSourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataSourcesCallable() { + return stub.listDataSourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a DataSource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DataSourceName name =
+   *       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
+   *   DataSource response = backupDRClient.getDataSource(name);
+   * }
+   * }
+ * + * @param name Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSource getDataSource(@Nullable DataSourceName name) { + GetDataSourceRequest request = + GetDataSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a DataSource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
+   *   DataSource response = backupDRClient.getDataSource(name);
+   * }
+   * }
+ * + * @param name Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSource getDataSource(String name) { + GetDataSourceRequest request = GetDataSourceRequest.newBuilder().setName(name).build(); + return getDataSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a DataSource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetDataSourceRequest request =
+   *       GetDataSourceRequest.newBuilder()
+   *           .setName(
+   *               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
+   *                   .toString())
+   *           .build();
+   *   DataSource response = backupDRClient.getDataSource(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 DataSource getDataSource(GetDataSourceRequest request) { + return getDataSourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a DataSource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetDataSourceRequest request =
+   *       GetDataSourceRequest.newBuilder()
+   *           .setName(
+   *               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = backupDRClient.getDataSourceCallable().futureCall(request);
+   *   // Do something.
+   *   DataSource response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDataSourceCallable() { + return stub.getDataSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a DataSource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DataSource dataSource = DataSource.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataSource response = backupDRClient.updateDataSourceAsync(dataSource, updateMask).get();
+   * }
+   * }
+ * + * @param dataSource Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * DataSource 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 the request will fail. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDataSourceAsync( + DataSource dataSource, FieldMask updateMask) { + UpdateDataSourceRequest request = + UpdateDataSourceRequest.newBuilder() + .setDataSource(dataSource) + .setUpdateMask(updateMask) + .build(); + return updateDataSourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a DataSource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateDataSourceRequest request =
+   *       UpdateDataSourceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataSource(DataSource.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   DataSource response = backupDRClient.updateDataSourceAsync(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 updateDataSourceAsync( + UpdateDataSourceRequest request) { + return updateDataSourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a DataSource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateDataSourceRequest request =
+   *       UpdateDataSourceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataSource(DataSource.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.updateDataSourceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataSource response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDataSourceOperationCallable() { + return stub.updateDataSourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a DataSource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateDataSourceRequest request =
+   *       UpdateDataSourceRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataSource(DataSource.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .build();
+   *   ApiFuture future = backupDRClient.updateDataSourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDataSourceCallable() { + return stub.updateDataSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Backups in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DataSourceName parent =
+   *       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
+   *   for (Backup element : backupDRClient.listBackups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve backup information, in + * the format 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, + * locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. To retrieve data sources for all locations, use "-" for + * the '{location}' value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupsPagedResponse listBackups(@Nullable DataSourceName parent) { + ListBackupsRequest request = + ListBackupsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBackups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Backups in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent =
+   *       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
+   *   for (Backup element : backupDRClient.listBackups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve backup information, in + * the format 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, + * locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. To retrieve data sources for all locations, use "-" for + * the '{location}' value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupsPagedResponse listBackups(String parent) { + ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build(); + return listBackups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Backups in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(
+   *               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupView.forNumber(0))
+   *           .build();
+   *   for (Backup element : backupDRClient.listBackups(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) { + return listBackupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Backups in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(
+   *               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = backupDRClient.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. + /** + * Lists Backups in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupsRequest request =
+   *       ListBackupsRequest.newBuilder()
+   *           .setParent(
+   *               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     ListBackupsResponse response = backupDRClient.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. + /** + * Fetch Backups for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DataSourceName parent =
+   *       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
+   *   String resourceType = "resourceType-384364440";
+   *   for (Backup element :
+   *       backupDRClient.fetchBackupsForResourceType(parent, resourceType).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Datasources are the parent resource for the backups. Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + * @param resourceType Required. The type of the GCP resource. Ex: + * sqladmin.googleapis.com/Instance + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchBackupsForResourceTypePagedResponse fetchBackupsForResourceType( + @Nullable DataSourceName parent, String resourceType) { + FetchBackupsForResourceTypeRequest request = + FetchBackupsForResourceTypeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setResourceType(resourceType) + .build(); + return fetchBackupsForResourceType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch Backups for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent =
+   *       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
+   *   String resourceType = "resourceType-384364440";
+   *   for (Backup element :
+   *       backupDRClient.fetchBackupsForResourceType(parent, resourceType).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Datasources are the parent resource for the backups. Format: + * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + * @param resourceType Required. The type of the GCP resource. Ex: + * sqladmin.googleapis.com/Instance + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchBackupsForResourceTypePagedResponse fetchBackupsForResourceType( + String parent, String resourceType) { + FetchBackupsForResourceTypeRequest request = + FetchBackupsForResourceTypeRequest.newBuilder() + .setParent(parent) + .setResourceType(resourceType) + .build(); + return fetchBackupsForResourceType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch Backups for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchBackupsForResourceTypeRequest request =
+   *       FetchBackupsForResourceTypeRequest.newBuilder()
+   *           .setParent(
+   *               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
+   *                   .toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupView.forNumber(0))
+   *           .build();
+   *   for (Backup element : backupDRClient.fetchBackupsForResourceType(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 FetchBackupsForResourceTypePagedResponse fetchBackupsForResourceType( + FetchBackupsForResourceTypeRequest request) { + return fetchBackupsForResourceTypePagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch Backups for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchBackupsForResourceTypeRequest request =
+   *       FetchBackupsForResourceTypeRequest.newBuilder()
+   *           .setParent(
+   *               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
+   *                   .toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupView.forNumber(0))
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.fetchBackupsForResourceTypePagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Backup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypePagedCallable() { + return stub.fetchBackupsForResourceTypePagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch Backups for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchBackupsForResourceTypeRequest request =
+   *       FetchBackupsForResourceTypeRequest.newBuilder()
+   *           .setParent(
+   *               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
+   *                   .toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setView(BackupView.forNumber(0))
+   *           .build();
+   *   while (true) {
+   *     FetchBackupsForResourceTypeResponse response =
+   *         backupDRClient.fetchBackupsForResourceTypeCallable().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< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse> + fetchBackupsForResourceTypeCallable() { + return stub.fetchBackupsForResourceTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupName name =
+   *       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
+   *   Backup response = backupDRClient.getBackup(name);
+   * }
+   * }
+ * + * @param name Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Backup getBackup(@Nullable BackupName name) { + GetBackupRequest request = + GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBackup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *           .toString();
+   *   Backup response = backupDRClient.getBackup(name);
+   * }
+   * }
+ * + * @param name Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Backup getBackup(String name) { + GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build(); + return getBackup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupRequest request =
+   *       GetBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *                   .toString())
+   *           .setView(BackupView.forNumber(0))
+   *           .build();
+   *   Backup response = backupDRClient.getBackup(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Backup getBackup(GetBackupRequest request) { + return getBackupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupRequest request =
+   *       GetBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *                   .toString())
+   *           .setView(BackupView.forNumber(0))
+   *           .build();
+   *   ApiFuture future = backupDRClient.getBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupCallable() { + return stub.getBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   Backup backup = Backup.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Backup response = backupDRClient.updateBackupAsync(backup, updateMask).get();
+   * }
+   * }
+ * + * @param backup Required. The resource being updated + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup 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 the request will fail. + * @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. + /** + * Updates the settings of a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupRequest request =
+   *       UpdateBackupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackup(Backup.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Backup response = backupDRClient.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. + /** + * Updates the settings of a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupRequest request =
+   *       UpdateBackupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackup(Backup.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.updateBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateBackupOperationCallable() { + return stub.updateBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the settings of a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupRequest request =
+   *       UpdateBackupRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setBackup(Backup.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = backupDRClient.updateBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateBackupCallable() { + return stub.updateBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupName name =
+   *       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
+   *   Backup response = backupDRClient.deleteBackupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupAsync( + @Nullable BackupName name) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *           .toString();
+   *   Backup response = backupDRClient.deleteBackupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @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. + /** + * Deletes a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Backup response = backupDRClient.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. + /** + * Deletes a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.deleteBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Backup response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupOperationCallable() { + return stub.deleteBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupRequest request =
+   *       DeleteBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = backupDRClient.deleteBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupCallable() { + return stub.deleteBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restore from a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupName name =
+   *       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
+   *   RestoreBackupResponse response = backupDRClient.restoreBackupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the Backup instance, in the format + * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture restoreBackupAsync( + @Nullable BackupName name) { + RestoreBackupRequest request = + RestoreBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return restoreBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restore from a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *           .toString();
+   *   RestoreBackupResponse response = backupDRClient.restoreBackupAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the Backup instance, in the format + * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture restoreBackupAsync( + String name) { + RestoreBackupRequest request = RestoreBackupRequest.newBuilder().setName(name).build(); + return restoreBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restore from a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   RestoreBackupRequest request =
+   *       RestoreBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setClearOverridesFieldMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   RestoreBackupResponse response = backupDRClient.restoreBackupAsync(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 restoreBackupAsync( + RestoreBackupRequest request) { + return restoreBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restore from a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   RestoreBackupRequest request =
+   *       RestoreBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setClearOverridesFieldMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.restoreBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RestoreBackupResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + restoreBackupOperationCallable() { + return stub.restoreBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restore from a 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   RestoreBackupRequest request =
+   *       RestoreBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setClearOverridesFieldMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = backupDRClient.restoreBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable restoreBackupCallable() { + return stub.restoreBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlan + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   BackupPlan backupPlan = BackupPlan.newBuilder().build();
+   *   String backupPlanId = "backupPlanId-84871546";
+   *   BackupPlan response =
+   *       backupDRClient.createBackupPlanAsync(parent, backupPlan, backupPlanId).get();
+   * }
+   * }
+ * + * @param parent Required. The `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR locations map to + * Google Cloud regions, for example **us-central1**. + * @param backupPlan Required. The `BackupPlan` resource object to create. + * @param backupPlanId Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase letter followed + * by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBackupPlanAsync( + @Nullable LocationName parent, BackupPlan backupPlan, String backupPlanId) { + CreateBackupPlanRequest request = + CreateBackupPlanRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackupPlan(backupPlan) + .setBackupPlanId(backupPlanId) + .build(); + return createBackupPlanAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlan + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   BackupPlan backupPlan = BackupPlan.newBuilder().build();
+   *   String backupPlanId = "backupPlanId-84871546";
+   *   BackupPlan response =
+   *       backupDRClient.createBackupPlanAsync(parent, backupPlan, backupPlanId).get();
+   * }
+   * }
+ * + * @param parent Required. The `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR locations map to + * Google Cloud regions, for example **us-central1**. + * @param backupPlan Required. The `BackupPlan` resource object to create. + * @param backupPlanId Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase letter followed + * by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createBackupPlanAsync( + String parent, BackupPlan backupPlan, String backupPlanId) { + CreateBackupPlanRequest request = + CreateBackupPlanRequest.newBuilder() + .setParent(parent) + .setBackupPlan(backupPlan) + .setBackupPlanId(backupPlanId) + .build(); + return createBackupPlanAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlan + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupPlanRequest request =
+   *       CreateBackupPlanRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPlanId("backupPlanId-84871546")
+   *           .setBackupPlan(BackupPlan.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   BackupPlan response = backupDRClient.createBackupPlanAsync(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 createBackupPlanAsync( + CreateBackupPlanRequest request) { + return createBackupPlanOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlan + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupPlanRequest request =
+   *       CreateBackupPlanRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPlanId("backupPlanId-84871546")
+   *           .setBackupPlan(BackupPlan.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.createBackupPlanOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPlan response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createBackupPlanOperationCallable() { + return stub.createBackupPlanOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlan + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupPlanRequest request =
+   *       CreateBackupPlanRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPlanId("backupPlanId-84871546")
+   *           .setBackupPlan(BackupPlan.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = backupDRClient.createBackupPlanCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createBackupPlanCallable() { + return stub.createBackupPlanCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlan backupPlan = BackupPlan.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   BackupPlan response = backupDRClient.updateBackupPlanAsync(backupPlan, updateMask).get();
+   * }
+   * }
+ * + * @param backupPlan Required. The resource being updated + * @param updateMask Required. The list of fields to update. Field mask is used to specify the + * fields to be overwritten in the BackupPlan 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 the request will + * fail. Currently, these fields are supported in update: description, schedules, retention + * period, adding and removing Backup Rules. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateBackupPlanAsync( + BackupPlan backupPlan, FieldMask updateMask) { + UpdateBackupPlanRequest request = + UpdateBackupPlanRequest.newBuilder() + .setBackupPlan(backupPlan) + .setUpdateMask(updateMask) + .build(); + return updateBackupPlanAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupPlanRequest request =
+   *       UpdateBackupPlanRequest.newBuilder()
+   *           .setBackupPlan(BackupPlan.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   BackupPlan response = backupDRClient.updateBackupPlanAsync(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 updateBackupPlanAsync( + UpdateBackupPlanRequest request) { + return updateBackupPlanOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupPlanRequest request =
+   *       UpdateBackupPlanRequest.newBuilder()
+   *           .setBackupPlan(BackupPlan.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.updateBackupPlanOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPlan response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateBackupPlanOperationCallable() { + return stub.updateBackupPlanOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupPlanRequest request =
+   *       UpdateBackupPlanRequest.newBuilder()
+   *           .setBackupPlan(BackupPlan.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = backupDRClient.updateBackupPlanCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateBackupPlanCallable() { + return stub.updateBackupPlanCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
+   *   BackupPlan response = backupDRClient.getBackupPlan(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the `BackupPlan` to retrieve. + *

Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupPlan getBackupPlan(@Nullable BackupPlanName name) { + GetBackupPlanRequest request = + GetBackupPlanRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getBackupPlan(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
+   *   BackupPlan response = backupDRClient.getBackupPlan(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the `BackupPlan` to retrieve. + *

Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupPlan getBackupPlan(String name) { + GetBackupPlanRequest request = GetBackupPlanRequest.newBuilder().setName(name).build(); + return getBackupPlan(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupPlanRequest request =
+   *       GetBackupPlanRequest.newBuilder()
+   *           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
+   *           .build();
+   *   BackupPlan response = backupDRClient.getBackupPlan(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 BackupPlan getBackupPlan(GetBackupPlanRequest request) { + return getBackupPlanCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupPlanRequest request =
+   *       GetBackupPlanRequest.newBuilder()
+   *           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
+   *           .build();
+   *   ApiFuture future = backupDRClient.getBackupPlanCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPlan response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getBackupPlanCallable() { + return stub.getBackupPlanCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlans in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (BackupPlan element : backupDRClient.listBackupPlans(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for e.g. + *
    + *
  • *us-central1**. To retrieve backup plans for all locations, use "-" for + * the `{location}` value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupPlansPagedResponse listBackupPlans(@Nullable LocationName parent) { + ListBackupPlansRequest request = + ListBackupPlansRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBackupPlans(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlans in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (BackupPlan element : backupDRClient.listBackupPlans(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Google Cloud Backup and + * DR, locations map to Google Cloud regions, for e.g. + *
    + *
  • *us-central1**. To retrieve backup plans for all locations, use "-" for + * the `{location}` value. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupPlansPagedResponse listBackupPlans(String parent) { + ListBackupPlansRequest request = ListBackupPlansRequest.newBuilder().setParent(parent).build(); + return listBackupPlans(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlans in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlansRequest request =
+   *       ListBackupPlansRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (BackupPlan element : backupDRClient.listBackupPlans(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 ListBackupPlansPagedResponse listBackupPlans(ListBackupPlansRequest request) { + return listBackupPlansPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlans in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlansRequest request =
+   *       ListBackupPlansRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listBackupPlansPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BackupPlan element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupPlansPagedCallable() { + return stub.listBackupPlansPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlans in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlansRequest request =
+   *       ListBackupPlansRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListBackupPlansResponse response = backupDRClient.listBackupPlansCallable().call(request);
+   *     for (BackupPlan element : response.getBackupPlansList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupPlansCallable() { + return stub.listBackupPlansCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
+   *   backupDRClient.deleteBackupPlanAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the `BackupPlan` to delete. + *

Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupPlanAsync( + @Nullable BackupPlanName name) { + DeleteBackupPlanRequest request = + DeleteBackupPlanRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteBackupPlanAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
+   *   backupDRClient.deleteBackupPlanAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the `BackupPlan` to delete. + *

Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupPlanAsync(String name) { + DeleteBackupPlanRequest request = DeleteBackupPlanRequest.newBuilder().setName(name).build(); + return deleteBackupPlanAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupPlanRequest request =
+   *       DeleteBackupPlanRequest.newBuilder()
+   *           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   backupDRClient.deleteBackupPlanAsync(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 deleteBackupPlanAsync( + DeleteBackupPlanRequest request) { + return deleteBackupPlanOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupPlanRequest request =
+   *       DeleteBackupPlanRequest.newBuilder()
+   *           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.deleteBackupPlanOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupPlanOperationCallable() { + return stub.deleteBackupPlanOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlan. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupPlanRequest request =
+   *       DeleteBackupPlanRequest.newBuilder()
+   *           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = backupDRClient.deleteBackupPlanCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteBackupPlanCallable() { + return stub.deleteBackupPlanCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlanRevision. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlanRevisionName name =
+   *       BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]");
+   *   BackupPlanRevision response = backupDRClient.getBackupPlanRevision(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the `BackupPlanRevision` to retrieve. + *

Format: + * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupPlanRevision getBackupPlanRevision(@Nullable BackupPlanRevisionName name) { + GetBackupPlanRevisionRequest request = + GetBackupPlanRevisionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getBackupPlanRevision(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlanRevision. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]")
+   *           .toString();
+   *   BackupPlanRevision response = backupDRClient.getBackupPlanRevision(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the `BackupPlanRevision` to retrieve. + *

Format: + * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupPlanRevision getBackupPlanRevision(String name) { + GetBackupPlanRevisionRequest request = + GetBackupPlanRevisionRequest.newBuilder().setName(name).build(); + return getBackupPlanRevision(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlanRevision. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupPlanRevisionRequest request =
+   *       GetBackupPlanRevisionRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanRevisionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]")
+   *                   .toString())
+   *           .build();
+   *   BackupPlanRevision response = backupDRClient.getBackupPlanRevision(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 BackupPlanRevision getBackupPlanRevision(GetBackupPlanRevisionRequest request) { + return getBackupPlanRevisionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlanRevision. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupPlanRevisionRequest request =
+   *       GetBackupPlanRevisionRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanRevisionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.getBackupPlanRevisionCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPlanRevision response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getBackupPlanRevisionCallable() { + return stub.getBackupPlanRevisionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanRevisions in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlanName parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
+   *   for (BackupPlanRevision element :
+   *       backupDRClient.listBackupPlanRevisions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve `BackupPlanRevisions` + * information. Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + *
    + *
  • *us-central1**. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupPlanRevisionsPagedResponse listBackupPlanRevisions( + @Nullable BackupPlanName parent) { + ListBackupPlanRevisionsRequest request = + ListBackupPlanRevisionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBackupPlanRevisions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanRevisions in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
+   *   for (BackupPlanRevision element :
+   *       backupDRClient.listBackupPlanRevisions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve `BackupPlanRevisions` + * information. Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + *
    + *
  • *us-central1**. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupPlanRevisionsPagedResponse listBackupPlanRevisions(String parent) { + ListBackupPlanRevisionsRequest request = + ListBackupPlanRevisionsRequest.newBuilder().setParent(parent).build(); + return listBackupPlanRevisions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanRevisions in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlanRevisionsRequest request =
+   *       ListBackupPlanRevisionsRequest.newBuilder()
+   *           .setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (BackupPlanRevision element :
+   *       backupDRClient.listBackupPlanRevisions(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 ListBackupPlanRevisionsPagedResponse listBackupPlanRevisions( + ListBackupPlanRevisionsRequest request) { + return listBackupPlanRevisionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanRevisions in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlanRevisionsRequest request =
+   *       ListBackupPlanRevisionsRequest.newBuilder()
+   *           .setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listBackupPlanRevisionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BackupPlanRevision element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupPlanRevisionsPagedCallable() { + return stub.listBackupPlanRevisionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanRevisions in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlanRevisionsRequest request =
+   *       ListBackupPlanRevisionsRequest.newBuilder()
+   *           .setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListBackupPlanRevisionsResponse response =
+   *         backupDRClient.listBackupPlanRevisionsCallable().call(request);
+   *     for (BackupPlanRevision element : response.getBackupPlanRevisionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupPlanRevisionsCallable() { + return stub.listBackupPlanRevisionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlanAssociation + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build();
+   *   String backupPlanAssociationId = "backupPlanAssociationId567762737";
+   *   BackupPlanAssociation response =
+   *       backupDRClient
+   *           .createBackupPlanAssociationAsync(
+   *               parent, backupPlanAssociation, backupPlanAssociationId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Backup and DR locations map to Google + * Cloud regions, for example **us-central1**. + * @param backupPlanAssociation Required. The resource being created + * @param backupPlanAssociationId Required. The name of the backup plan association to create. The + * name must be unique for the specified project and location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createBackupPlanAssociationAsync( + @Nullable LocationName parent, + BackupPlanAssociation backupPlanAssociation, + String backupPlanAssociationId) { + CreateBackupPlanAssociationRequest request = + CreateBackupPlanAssociationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setBackupPlanAssociation(backupPlanAssociation) + .setBackupPlanAssociationId(backupPlanAssociationId) + .build(); + return createBackupPlanAssociationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlanAssociation + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build();
+   *   String backupPlanAssociationId = "backupPlanAssociationId567762737";
+   *   BackupPlanAssociation response =
+   *       backupDRClient
+   *           .createBackupPlanAssociationAsync(
+   *               parent, backupPlanAssociation, backupPlanAssociationId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Backup and DR locations map to Google + * Cloud regions, for example **us-central1**. + * @param backupPlanAssociation Required. The resource being created + * @param backupPlanAssociationId Required. The name of the backup plan association to create. The + * name must be unique for the specified project and location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createBackupPlanAssociationAsync( + String parent, + BackupPlanAssociation backupPlanAssociation, + String backupPlanAssociationId) { + CreateBackupPlanAssociationRequest request = + CreateBackupPlanAssociationRequest.newBuilder() + .setParent(parent) + .setBackupPlanAssociation(backupPlanAssociation) + .setBackupPlanAssociationId(backupPlanAssociationId) + .build(); + return createBackupPlanAssociationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlanAssociation + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupPlanAssociationRequest request =
+   *       CreateBackupPlanAssociationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPlanAssociationId("backupPlanAssociationId567762737")
+   *           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   BackupPlanAssociation response =
+   *       backupDRClient.createBackupPlanAssociationAsync(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 + createBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest request) { + return createBackupPlanAssociationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlanAssociation + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupPlanAssociationRequest request =
+   *       CreateBackupPlanAssociationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPlanAssociationId("backupPlanAssociationId567762737")
+   *           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.createBackupPlanAssociationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPlanAssociation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationCallable() { + return stub.createBackupPlanAssociationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a BackupPlanAssociation + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateBackupPlanAssociationRequest request =
+   *       CreateBackupPlanAssociationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setBackupPlanAssociationId("backupPlanAssociationId567762737")
+   *           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.createBackupPlanAssociationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createBackupPlanAssociationCallable() { + return stub.createBackupPlanAssociationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   BackupPlanAssociation response =
+   *       backupDRClient.updateBackupPlanAssociationAsync(backupPlanAssociation, updateMask).get();
+   * }
+   * }
+ * + * @param backupPlanAssociation Required. The resource being updated + * @param updateMask Required. The list of fields to update. Field mask is used to specify the + * fields to be overwritten in the BackupPlanAssociation 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 the + * request will fail. Currently backup_plan_association.backup_plan is the only supported + * field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateBackupPlanAssociationAsync( + BackupPlanAssociation backupPlanAssociation, FieldMask updateMask) { + UpdateBackupPlanAssociationRequest request = + UpdateBackupPlanAssociationRequest.newBuilder() + .setBackupPlanAssociation(backupPlanAssociation) + .setUpdateMask(updateMask) + .build(); + return updateBackupPlanAssociationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupPlanAssociationRequest request =
+   *       UpdateBackupPlanAssociationRequest.newBuilder()
+   *           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   BackupPlanAssociation response =
+   *       backupDRClient.updateBackupPlanAssociationAsync(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 + updateBackupPlanAssociationAsync(UpdateBackupPlanAssociationRequest request) { + return updateBackupPlanAssociationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupPlanAssociationRequest request =
+   *       UpdateBackupPlanAssociationRequest.newBuilder()
+   *           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.updateBackupPlanAssociationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPlanAssociation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationCallable() { + return stub.updateBackupPlanAssociationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateBackupPlanAssociationRequest request =
+   *       UpdateBackupPlanAssociationRequest.newBuilder()
+   *           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.updateBackupPlanAssociationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateBackupPlanAssociationCallable() { + return stub.updateBackupPlanAssociationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlanAssociationName name =
+   *       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
+   *   BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(name);
+   * }
+   * }
+ * + * @param name Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupPlanAssociation getBackupPlanAssociation( + @Nullable BackupPlanAssociationName name) { + GetBackupPlanAssociationRequest request = + GetBackupPlanAssociationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getBackupPlanAssociation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *           .toString();
+   *   BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(name);
+   * }
+   * }
+ * + * @param name Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BackupPlanAssociation getBackupPlanAssociation(String name) { + GetBackupPlanAssociationRequest request = + GetBackupPlanAssociationRequest.newBuilder().setName(name).build(); + return getBackupPlanAssociation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupPlanAssociationRequest request =
+   *       GetBackupPlanAssociationRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanAssociationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *                   .toString())
+   *           .build();
+   *   BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(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 BackupPlanAssociation getBackupPlanAssociation( + GetBackupPlanAssociationRequest request) { + return getBackupPlanAssociationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBackupPlanAssociationRequest request =
+   *       GetBackupPlanAssociationRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanAssociationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.getBackupPlanAssociationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPlanAssociation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getBackupPlanAssociationCallable() { + return stub.getBackupPlanAssociationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanAssociations in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (BackupPlanAssociation element :
+   *       backupDRClient.listBackupPlanAssociations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve backup Plan Associations + * information, in the format `projects/{project_id}/locations/{location}`. In Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. To + * retrieve backup plan associations for all locations, use "-" for the `{location}` value. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupPlanAssociationsPagedResponse listBackupPlanAssociations( + @Nullable LocationName parent) { + ListBackupPlanAssociationsRequest request = + ListBackupPlanAssociationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBackupPlanAssociations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanAssociations in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (BackupPlanAssociation element :
+   *       backupDRClient.listBackupPlanAssociations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve backup Plan Associations + * information, in the format `projects/{project_id}/locations/{location}`. In Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. To + * retrieve backup plan associations for all locations, use "-" for the `{location}` value. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBackupPlanAssociationsPagedResponse listBackupPlanAssociations(String parent) { + ListBackupPlanAssociationsRequest request = + ListBackupPlanAssociationsRequest.newBuilder().setParent(parent).build(); + return listBackupPlanAssociations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanAssociations in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlanAssociationsRequest request =
+   *       ListBackupPlanAssociationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (BackupPlanAssociation element :
+   *       backupDRClient.listBackupPlanAssociations(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 ListBackupPlanAssociationsPagedResponse listBackupPlanAssociations( + ListBackupPlanAssociationsRequest request) { + return listBackupPlanAssociationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanAssociations in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlanAssociationsRequest request =
+   *       ListBackupPlanAssociationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listBackupPlanAssociationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BackupPlanAssociation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListBackupPlanAssociationsRequest, ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsPagedCallable() { + return stub.listBackupPlanAssociationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists BackupPlanAssociations in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBackupPlanAssociationsRequest request =
+   *       ListBackupPlanAssociationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListBackupPlanAssociationsResponse response =
+   *         backupDRClient.listBackupPlanAssociationsCallable().call(request);
+   *     for (BackupPlanAssociation element : response.getBackupPlanAssociationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listBackupPlanAssociationsCallable() { + return stub.listBackupPlanAssociationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List BackupPlanAssociations for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String resourceType = "resourceType-384364440";
+   *   for (BackupPlanAssociation element :
+   *       backupDRClient
+   *           .fetchBackupPlanAssociationsForResourceType(parent, resourceType)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. Format: + * projects/{project}/locations/{location} + * @param resourceType Required. The type of the Google Cloud resource. Ex: + * sql.googleapis.com/Instance + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchBackupPlanAssociationsForResourceTypePagedResponse + fetchBackupPlanAssociationsForResourceType( + @Nullable LocationName parent, String resourceType) { + FetchBackupPlanAssociationsForResourceTypeRequest request = + FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setResourceType(resourceType) + .build(); + return fetchBackupPlanAssociationsForResourceType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List BackupPlanAssociations for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String resourceType = "resourceType-384364440";
+   *   for (BackupPlanAssociation element :
+   *       backupDRClient
+   *           .fetchBackupPlanAssociationsForResourceType(parent, resourceType)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. Format: + * projects/{project}/locations/{location} + * @param resourceType Required. The type of the Google Cloud resource. Ex: + * sql.googleapis.com/Instance + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchBackupPlanAssociationsForResourceTypePagedResponse + fetchBackupPlanAssociationsForResourceType(String parent, String resourceType) { + FetchBackupPlanAssociationsForResourceTypeRequest request = + FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder() + .setParent(parent) + .setResourceType(resourceType) + .build(); + return fetchBackupPlanAssociationsForResourceType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List BackupPlanAssociations for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchBackupPlanAssociationsForResourceTypeRequest request =
+   *       FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (BackupPlanAssociation element :
+   *       backupDRClient.fetchBackupPlanAssociationsForResourceType(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 FetchBackupPlanAssociationsForResourceTypePagedResponse + fetchBackupPlanAssociationsForResourceType( + FetchBackupPlanAssociationsForResourceTypeRequest request) { + return fetchBackupPlanAssociationsForResourceTypePagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List BackupPlanAssociations for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchBackupPlanAssociationsForResourceTypeRequest request =
+   *       FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient
+   *           .fetchBackupPlanAssociationsForResourceTypePagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (BackupPlanAssociation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypePagedCallable() { + return stub.fetchBackupPlanAssociationsForResourceTypePagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List BackupPlanAssociations for a given resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchBackupPlanAssociationsForResourceTypeRequest request =
+   *       FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     FetchBackupPlanAssociationsForResourceTypeResponse response =
+   *         backupDRClient.fetchBackupPlanAssociationsForResourceTypeCallable().call(request);
+   *     for (BackupPlanAssociation element : response.getBackupPlanAssociationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeCallable() { + return stub.fetchBackupPlanAssociationsForResourceTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlanAssociationName name =
+   *       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
+   *   backupDRClient.deleteBackupPlanAssociationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupPlanAssociationAsync( + @Nullable BackupPlanAssociationName name) { + DeleteBackupPlanAssociationRequest request = + DeleteBackupPlanAssociationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteBackupPlanAssociationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *           .toString();
+   *   backupDRClient.deleteBackupPlanAssociationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteBackupPlanAssociationAsync( + String name) { + DeleteBackupPlanAssociationRequest request = + DeleteBackupPlanAssociationRequest.newBuilder().setName(name).build(); + return deleteBackupPlanAssociationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupPlanAssociationRequest request =
+   *       DeleteBackupPlanAssociationRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanAssociationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAutoProtectionPolicyBinding(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .build();
+   *   backupDRClient.deleteBackupPlanAssociationAsync(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 deleteBackupPlanAssociationAsync( + DeleteBackupPlanAssociationRequest request) { + return deleteBackupPlanAssociationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupPlanAssociationRequest request =
+   *       DeleteBackupPlanAssociationRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanAssociationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAutoProtectionPolicyBinding(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.deleteBackupPlanAssociationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteBackupPlanAssociationOperationCallable() { + return stub.deleteBackupPlanAssociationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single BackupPlanAssociation. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteBackupPlanAssociationRequest request =
+   *       DeleteBackupPlanAssociationRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanAssociationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAutoProtectionPolicyBinding(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.deleteBackupPlanAssociationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteBackupPlanAssociationCallable() { + return stub.deleteBackupPlanAssociationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers a new 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BackupPlanAssociationName name =
+   *       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
+   *   String ruleId = "ruleId-919875273";
+   *   BackupPlanAssociation response = backupDRClient.triggerBackupAsync(name, ruleId).get();
+   * }
+   * }
+ * + * @param name Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param ruleId Optional. backup rule_id for which a backup needs to be triggered. If not + * specified, on-demand backup with custom retention will be triggered. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture triggerBackupAsync( + @Nullable BackupPlanAssociationName name, String ruleId) { + TriggerBackupRequest request = + TriggerBackupRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setRuleId(ruleId) + .build(); + return triggerBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers a new 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *           .toString();
+   *   String ruleId = "ruleId-919875273";
+   *   BackupPlanAssociation response = backupDRClient.triggerBackupAsync(name, ruleId).get();
+   * }
+   * }
+ * + * @param name Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param ruleId Optional. backup rule_id for which a backup needs to be triggered. If not + * specified, on-demand backup with custom retention will be triggered. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture triggerBackupAsync( + String name, String ruleId) { + TriggerBackupRequest request = + TriggerBackupRequest.newBuilder().setName(name).setRuleId(ruleId).build(); + return triggerBackupAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers a new 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   TriggerBackupRequest request =
+   *       TriggerBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanAssociationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *                   .toString())
+   *           .setRuleId("ruleId-919875273")
+   *           .setRequestId("requestId693933066")
+   *           .setCustomRetentionDays(-352387226)
+   *           .putAllLabels(new HashMap())
+   *           .build();
+   *   BackupPlanAssociation response = backupDRClient.triggerBackupAsync(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 triggerBackupAsync( + TriggerBackupRequest request) { + return triggerBackupOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers a new 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   TriggerBackupRequest request =
+   *       TriggerBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanAssociationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *                   .toString())
+   *           .setRuleId("ruleId-919875273")
+   *           .setRequestId("requestId693933066")
+   *           .setCustomRetentionDays(-352387226)
+   *           .putAllLabels(new HashMap())
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.triggerBackupOperationCallable().futureCall(request);
+   *   // Do something.
+   *   BackupPlanAssociation response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + triggerBackupOperationCallable() { + return stub.triggerBackupOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers a new 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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   TriggerBackupRequest request =
+   *       TriggerBackupRequest.newBuilder()
+   *           .setName(
+   *               BackupPlanAssociationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
+   *                   .toString())
+   *           .setRuleId("ruleId-919875273")
+   *           .setRequestId("requestId693933066")
+   *           .setCustomRetentionDays(-352387226)
+   *           .putAllLabels(new HashMap())
+   *           .build();
+   *   ApiFuture future = backupDRClient.triggerBackupCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable triggerBackupCallable() { + return stub.triggerBackupCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DataSourceReference. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DataSourceReferenceName name =
+   *       DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]");
+   *   DataSourceReference response = backupDRClient.getDataSourceReference(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DataSourceReference to retrieve. Format: + * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSourceReference getDataSourceReference(@Nullable DataSourceReferenceName name) { + GetDataSourceReferenceRequest request = + GetDataSourceReferenceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDataSourceReference(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DataSourceReference. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]")
+   *           .toString();
+   *   DataSourceReference response = backupDRClient.getDataSourceReference(name);
+   * }
+   * }
+ * + * @param name Required. The name of the DataSourceReference to retrieve. Format: + * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSourceReference getDataSourceReference(String name) { + GetDataSourceReferenceRequest request = + GetDataSourceReferenceRequest.newBuilder().setName(name).build(); + return getDataSourceReference(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DataSourceReference. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetDataSourceReferenceRequest request =
+   *       GetDataSourceReferenceRequest.newBuilder()
+   *           .setName(
+   *               DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]")
+   *                   .toString())
+   *           .build();
+   *   DataSourceReference response = backupDRClient.getDataSourceReference(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 DataSourceReference getDataSourceReference(GetDataSourceReferenceRequest request) { + return getDataSourceReferenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single DataSourceReference. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetDataSourceReferenceRequest request =
+   *       GetDataSourceReferenceRequest.newBuilder()
+   *           .setName(
+   *               DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.getDataSourceReferenceCallable().futureCall(request);
+   *   // Do something.
+   *   DataSourceReference response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDataSourceReferenceCallable() { + return stub.getDataSourceReferenceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSourceReferences for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DataSourceReference element :
+   *       backupDRClient.listDataSourceReferences(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. Format: + * projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataSourceReferencesPagedResponse listDataSourceReferences( + @Nullable LocationName parent) { + ListDataSourceReferencesRequest request = + ListDataSourceReferencesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataSourceReferences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSourceReferences for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (DataSourceReference element :
+   *       backupDRClient.listDataSourceReferences(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. Format: + * projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataSourceReferencesPagedResponse listDataSourceReferences(String parent) { + ListDataSourceReferencesRequest request = + ListDataSourceReferencesRequest.newBuilder().setParent(parent).build(); + return listDataSourceReferences(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSourceReferences for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListDataSourceReferencesRequest request =
+   *       ListDataSourceReferencesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DataSourceReference element :
+   *       backupDRClient.listDataSourceReferences(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 ListDataSourceReferencesPagedResponse listDataSourceReferences( + ListDataSourceReferencesRequest request) { + return listDataSourceReferencesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSourceReferences for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListDataSourceReferencesRequest request =
+   *       ListDataSourceReferencesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listDataSourceReferencesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataSourceReference element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataSourceReferencesPagedCallable() { + return stub.listDataSourceReferencesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataSourceReferences for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListDataSourceReferencesRequest request =
+   *       ListDataSourceReferencesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDataSourceReferencesResponse response =
+   *         backupDRClient.listDataSourceReferencesCallable().call(request);
+   *     for (DataSourceReference element : response.getDataSourceReferencesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataSourceReferencesCallable() { + return stub.listDataSourceReferencesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch DataSourceReferences for a given project, location and resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String resourceType = "resourceType-384364440";
+   *   for (DataSourceReference element :
+   *       backupDRClient
+   *           .fetchDataSourceReferencesForResourceType(parent, resourceType)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. Format: + * projects/{project}/locations/{location} + * @param resourceType Required. The type of the Google Cloud resource. Ex: + * sql.googleapis.com/Instance + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchDataSourceReferencesForResourceTypePagedResponse + fetchDataSourceReferencesForResourceType(@Nullable LocationName parent, String resourceType) { + FetchDataSourceReferencesForResourceTypeRequest request = + FetchDataSourceReferencesForResourceTypeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setResourceType(resourceType) + .build(); + return fetchDataSourceReferencesForResourceType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch DataSourceReferences for a given project, location and resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String resourceType = "resourceType-384364440";
+   *   for (DataSourceReference element :
+   *       backupDRClient
+   *           .fetchDataSourceReferencesForResourceType(parent, resourceType)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. Format: + * projects/{project}/locations/{location} + * @param resourceType Required. The type of the Google Cloud resource. Ex: + * sql.googleapis.com/Instance + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchDataSourceReferencesForResourceTypePagedResponse + fetchDataSourceReferencesForResourceType(String parent, String resourceType) { + FetchDataSourceReferencesForResourceTypeRequest request = + FetchDataSourceReferencesForResourceTypeRequest.newBuilder() + .setParent(parent) + .setResourceType(resourceType) + .build(); + return fetchDataSourceReferencesForResourceType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch DataSourceReferences for a given project, location and resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchDataSourceReferencesForResourceTypeRequest request =
+   *       FetchDataSourceReferencesForResourceTypeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DataSourceReference element :
+   *       backupDRClient.fetchDataSourceReferencesForResourceType(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 FetchDataSourceReferencesForResourceTypePagedResponse + fetchDataSourceReferencesForResourceType( + FetchDataSourceReferencesForResourceTypeRequest request) { + return fetchDataSourceReferencesForResourceTypePagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch DataSourceReferences for a given project, location and resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchDataSourceReferencesForResourceTypeRequest request =
+   *       FetchDataSourceReferencesForResourceTypeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient
+   *           .fetchDataSourceReferencesForResourceTypePagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (DataSourceReference element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypePagedCallable() { + return stub.fetchDataSourceReferencesForResourceTypePagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch DataSourceReferences for a given project, location and resource type. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   FetchDataSourceReferencesForResourceTypeRequest request =
+   *       FetchDataSourceReferencesForResourceTypeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setResourceType("resourceType-384364440")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     FetchDataSourceReferencesForResourceTypeResponse response =
+   *         backupDRClient.fetchDataSourceReferencesForResourceTypeCallable().call(request);
+   *     for (DataSourceReference element : response.getDataSourceReferencesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeCallable() { + return stub.fetchDataSourceReferencesForResourceTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Initializes the service related config for a project. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   InitializeServiceRequest request =
+   *       InitializeServiceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setResourceType("resourceType-384364440")
+   *           .setRequestId("requestId693933066")
+   *           .setBackupPlanLocation("backupPlanLocation543722720")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   InitializeServiceResponse response = backupDRClient.initializeServiceAsync(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 initializeServiceAsync( + InitializeServiceRequest request) { + return initializeServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Initializes the service related config for a project. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   InitializeServiceRequest request =
+   *       InitializeServiceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setResourceType("resourceType-384364440")
+   *           .setRequestId("requestId693933066")
+   *           .setBackupPlanLocation("backupPlanLocation543722720")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.initializeServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   InitializeServiceResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationCallable() { + return stub.initializeServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Initializes the service related config for a project. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   InitializeServiceRequest request =
+   *       InitializeServiceRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setResourceType("resourceType-384364440")
+   *           .setRequestId("requestId693933066")
+   *           .setBackupPlanLocation("backupPlanLocation543722720")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future = backupDRClient.initializeServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable initializeServiceCallable() { + return stub.initializeServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicy in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build();
+   *   String autoProtectionPolicyId = "autoProtectionPolicyId1759243253";
+   *   AutoProtectionPolicy response =
+   *       backupDRClient
+   *           .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy will be created. Format: + * projects/{project}/locations/{location} + * @param autoProtectionPolicy Required. The AutoProtectionPolicy resource to create. + * @param autoProtectionPolicyId Required. The ID to use for the policy. This will become the + * final component of the policy's resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createAutoProtectionPolicyAsync( + @Nullable LocationName parent, + AutoProtectionPolicy autoProtectionPolicy, + String autoProtectionPolicyId) { + CreateAutoProtectionPolicyRequest request = + CreateAutoProtectionPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAutoProtectionPolicy(autoProtectionPolicy) + .setAutoProtectionPolicyId(autoProtectionPolicyId) + .build(); + return createAutoProtectionPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicy in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build();
+   *   String autoProtectionPolicyId = "autoProtectionPolicyId1759243253";
+   *   AutoProtectionPolicy response =
+   *       backupDRClient
+   *           .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this policy will be created. Format: + * projects/{project}/locations/{location} + * @param autoProtectionPolicy Required. The AutoProtectionPolicy resource to create. + * @param autoProtectionPolicyId Required. The ID to use for the policy. This will become the + * final component of the policy's resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createAutoProtectionPolicyAsync( + String parent, AutoProtectionPolicy autoProtectionPolicy, String autoProtectionPolicyId) { + CreateAutoProtectionPolicyRequest request = + CreateAutoProtectionPolicyRequest.newBuilder() + .setParent(parent) + .setAutoProtectionPolicy(autoProtectionPolicy) + .setAutoProtectionPolicyId(autoProtectionPolicyId) + .build(); + return createAutoProtectionPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicy in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateAutoProtectionPolicyRequest request =
+   *       CreateAutoProtectionPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAutoProtectionPolicyId("autoProtectionPolicyId1759243253")
+   *           .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build())
+   *           .build();
+   *   AutoProtectionPolicy response = backupDRClient.createAutoProtectionPolicyAsync(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 + createAutoProtectionPolicyAsync(CreateAutoProtectionPolicyRequest request) { + return createAutoProtectionPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicy in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateAutoProtectionPolicyRequest request =
+   *       CreateAutoProtectionPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAutoProtectionPolicyId("autoProtectionPolicyId1759243253")
+   *           .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.createAutoProtectionPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AutoProtectionPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationCallable() { + return stub.createAutoProtectionPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicy in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateAutoProtectionPolicyRequest request =
+   *       CreateAutoProtectionPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAutoProtectionPolicyId("autoProtectionPolicyId1759243253")
+   *           .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.createAutoProtectionPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createAutoProtectionPolicyCallable() { + return stub.createAutoProtectionPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutoProtectionPolicies for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (AutoProtectionPolicy element :
+   *       backupDRClient.listAutoProtectionPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve the list of policies. + * Format: projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutoProtectionPoliciesPagedResponse listAutoProtectionPolicies( + @Nullable LocationName parent) { + ListAutoProtectionPoliciesRequest request = + ListAutoProtectionPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAutoProtectionPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutoProtectionPolicies for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (AutoProtectionPolicy element :
+   *       backupDRClient.listAutoProtectionPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve the list of policies. + * Format: projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutoProtectionPoliciesPagedResponse listAutoProtectionPolicies(String parent) { + ListAutoProtectionPoliciesRequest request = + ListAutoProtectionPoliciesRequest.newBuilder().setParent(parent).build(); + return listAutoProtectionPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutoProtectionPolicies for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAutoProtectionPoliciesRequest request =
+   *       ListAutoProtectionPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (AutoProtectionPolicy element :
+   *       backupDRClient.listAutoProtectionPolicies(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 ListAutoProtectionPoliciesPagedResponse listAutoProtectionPolicies( + ListAutoProtectionPoliciesRequest request) { + return listAutoProtectionPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutoProtectionPolicies for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAutoProtectionPoliciesRequest request =
+   *       ListAutoProtectionPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listAutoProtectionPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AutoProtectionPolicy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListAutoProtectionPoliciesRequest, ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesPagedCallable() { + return stub.listAutoProtectionPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutoProtectionPolicies for a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAutoProtectionPoliciesRequest request =
+   *       ListAutoProtectionPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListAutoProtectionPoliciesResponse response =
+   *         backupDRClient.listAutoProtectionPoliciesCallable().call(request);
+   *     for (AutoProtectionPolicy element : response.getAutoProtectionPoliciesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAutoProtectionPoliciesCallable() { + return stub.listAutoProtectionPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   AutoProtectionPolicyName name =
+   *       AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]");
+   *   AutoProtectionPolicy response = backupDRClient.getAutoProtectionPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the policy to retrieve. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutoProtectionPolicy getAutoProtectionPolicy( + @Nullable AutoProtectionPolicyName name) { + GetAutoProtectionPolicyRequest request = + GetAutoProtectionPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAutoProtectionPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *           .toString();
+   *   AutoProtectionPolicy response = backupDRClient.getAutoProtectionPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The name of the policy to retrieve. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutoProtectionPolicy getAutoProtectionPolicy(String name) { + GetAutoProtectionPolicyRequest request = + GetAutoProtectionPolicyRequest.newBuilder().setName(name).build(); + return getAutoProtectionPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetAutoProtectionPolicyRequest request =
+   *       GetAutoProtectionPolicyRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .build();
+   *   AutoProtectionPolicy response = backupDRClient.getAutoProtectionPolicy(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 AutoProtectionPolicy getAutoProtectionPolicy( + GetAutoProtectionPolicyRequest request) { + return getAutoProtectionPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetAutoProtectionPolicyRequest request =
+   *       GetAutoProtectionPolicyRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.getAutoProtectionPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   AutoProtectionPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getAutoProtectionPolicyCallable() { + return stub.getAutoProtectionPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AutoProtectionPolicy response =
+   *       backupDRClient.updateAutoProtectionPolicyAsync(autoProtectionPolicy, updateMask).get();
+   * }
+   * }
+ * + * @param autoProtectionPolicy Required. The policy to update. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * AutoProtectionPolicy 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 + updateAutoProtectionPolicyAsync( + AutoProtectionPolicy autoProtectionPolicy, FieldMask updateMask) { + UpdateAutoProtectionPolicyRequest request = + UpdateAutoProtectionPolicyRequest.newBuilder() + .setAutoProtectionPolicy(autoProtectionPolicy) + .setUpdateMask(updateMask) + .build(); + return updateAutoProtectionPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateAutoProtectionPolicyRequest request =
+   *       UpdateAutoProtectionPolicyRequest.newBuilder()
+   *           .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AutoProtectionPolicy response = backupDRClient.updateAutoProtectionPolicyAsync(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 + updateAutoProtectionPolicyAsync(UpdateAutoProtectionPolicyRequest request) { + return updateAutoProtectionPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateAutoProtectionPolicyRequest request =
+   *       UpdateAutoProtectionPolicyRequest.newBuilder()
+   *           .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.updateAutoProtectionPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AutoProtectionPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationCallable() { + return stub.updateAutoProtectionPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   UpdateAutoProtectionPolicyRequest request =
+   *       UpdateAutoProtectionPolicyRequest.newBuilder()
+   *           .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.updateAutoProtectionPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateAutoProtectionPolicyCallable() { + return stub.updateAutoProtectionPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   AutoProtectionPolicyName name =
+   *       AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]");
+   *   backupDRClient.deleteAutoProtectionPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the policy to delete. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAutoProtectionPolicyAsync( + @Nullable AutoProtectionPolicyName name) { + DeleteAutoProtectionPolicyRequest request = + DeleteAutoProtectionPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteAutoProtectionPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *           .toString();
+   *   backupDRClient.deleteAutoProtectionPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the policy to delete. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAutoProtectionPolicyAsync( + String name) { + DeleteAutoProtectionPolicyRequest request = + DeleteAutoProtectionPolicyRequest.newBuilder().setName(name).build(); + return deleteAutoProtectionPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteAutoProtectionPolicyRequest request =
+   *       DeleteAutoProtectionPolicyRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   backupDRClient.deleteAutoProtectionPolicyAsync(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 deleteAutoProtectionPolicyAsync( + DeleteAutoProtectionPolicyRequest request) { + return deleteAutoProtectionPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteAutoProtectionPolicyRequest request =
+   *       DeleteAutoProtectionPolicyRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.deleteAutoProtectionPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAutoProtectionPolicyOperationCallable() { + return stub.deleteAutoProtectionPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AutoProtectionPolicy. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   DeleteAutoProtectionPolicyRequest request =
+   *       DeleteAutoProtectionPolicyRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.deleteAutoProtectionPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteAutoProtectionPolicyCallable() { + return stub.deleteAutoProtectionPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicyBinding in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   AutoProtectionPolicyName parent =
+   *       AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]");
+   *   AutoProtectionPolicyBinding autoProtectionPolicyBinding =
+   *       AutoProtectionPolicyBinding.newBuilder().build();
+   *   String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414";
+   *   AutoProtectionPolicyBinding response =
+   *       backupDRClient
+   *           .createAutoProtectionPolicyBindingAsync(
+   *               parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this binding will be created. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @param autoProtectionPolicyBinding Required. The AutoProtectionPolicyBinding resource to + * create. + * @param autoProtectionPolicyBindingId Required. The ID to use for the binding. This will become + * the final component of the binding's resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createAutoProtectionPolicyBindingAsync( + @Nullable AutoProtectionPolicyName parent, + AutoProtectionPolicyBinding autoProtectionPolicyBinding, + String autoProtectionPolicyBindingId) { + CreateAutoProtectionPolicyBindingRequest request = + CreateAutoProtectionPolicyBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAutoProtectionPolicyBinding(autoProtectionPolicyBinding) + .setAutoProtectionPolicyBindingId(autoProtectionPolicyBindingId) + .build(); + return createAutoProtectionPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicyBinding in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent =
+   *       AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *           .toString();
+   *   AutoProtectionPolicyBinding autoProtectionPolicyBinding =
+   *       AutoProtectionPolicyBinding.newBuilder().build();
+   *   String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414";
+   *   AutoProtectionPolicyBinding response =
+   *       backupDRClient
+   *           .createAutoProtectionPolicyBindingAsync(
+   *               parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource where this binding will be created. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + * @param autoProtectionPolicyBinding Required. The AutoProtectionPolicyBinding resource to + * create. + * @param autoProtectionPolicyBindingId Required. The ID to use for the binding. This will become + * the final component of the binding's resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createAutoProtectionPolicyBindingAsync( + String parent, + AutoProtectionPolicyBinding autoProtectionPolicyBinding, + String autoProtectionPolicyBindingId) { + CreateAutoProtectionPolicyBindingRequest request = + CreateAutoProtectionPolicyBindingRequest.newBuilder() + .setParent(parent) + .setAutoProtectionPolicyBinding(autoProtectionPolicyBinding) + .setAutoProtectionPolicyBindingId(autoProtectionPolicyBindingId) + .build(); + return createAutoProtectionPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicyBinding in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateAutoProtectionPolicyBindingRequest request =
+   *       CreateAutoProtectionPolicyBindingRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setAutoProtectionPolicyBindingId("autoProtectionPolicyBindingId2122957414")
+   *           .setAutoProtectionPolicyBinding(AutoProtectionPolicyBinding.newBuilder().build())
+   *           .build();
+   *   AutoProtectionPolicyBinding response =
+   *       backupDRClient.createAutoProtectionPolicyBindingAsync(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 + createAutoProtectionPolicyBindingAsync(CreateAutoProtectionPolicyBindingRequest request) { + return createAutoProtectionPolicyBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicyBinding in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateAutoProtectionPolicyBindingRequest request =
+   *       CreateAutoProtectionPolicyBindingRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setAutoProtectionPolicyBindingId("autoProtectionPolicyBindingId2122957414")
+   *           .setAutoProtectionPolicyBinding(AutoProtectionPolicyBinding.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient.createAutoProtectionPolicyBindingOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AutoProtectionPolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationCallable() { + return stub.createAutoProtectionPolicyBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AutoProtectionPolicyBinding in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   CreateAutoProtectionPolicyBindingRequest request =
+   *       CreateAutoProtectionPolicyBindingRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setAutoProtectionPolicyBindingId("autoProtectionPolicyBindingId2122957414")
+   *           .setAutoProtectionPolicyBinding(AutoProtectionPolicyBinding.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.createAutoProtectionPolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createAutoProtectionPolicyBindingCallable() { + return stub.createAutoProtectionPolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy binding read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   AutoProtectionPolicyBindingName name =
+   *       AutoProtectionPolicyBindingName.of(
+   *           "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]");
+   *   AutoProtectionPolicyBinding response = backupDRClient.getAutoProtectionPolicyBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the binding to retrieve. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutoProtectionPolicyBinding getAutoProtectionPolicyBinding( + @Nullable AutoProtectionPolicyBindingName name) { + GetAutoProtectionPolicyBindingRequest request = + GetAutoProtectionPolicyBindingRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAutoProtectionPolicyBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy binding read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       AutoProtectionPolicyBindingName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *           .toString();
+   *   AutoProtectionPolicyBinding response = backupDRClient.getAutoProtectionPolicyBinding(name);
+   * }
+   * }
+ * + * @param name Required. The name of the binding to retrieve. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutoProtectionPolicyBinding getAutoProtectionPolicyBinding(String name) { + GetAutoProtectionPolicyBindingRequest request = + GetAutoProtectionPolicyBindingRequest.newBuilder().setName(name).build(); + return getAutoProtectionPolicyBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy binding read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetAutoProtectionPolicyBindingRequest request =
+   *       GetAutoProtectionPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .build();
+   *   AutoProtectionPolicyBinding response = backupDRClient.getAutoProtectionPolicyBinding(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 AutoProtectionPolicyBinding getAutoProtectionPolicyBinding( + GetAutoProtectionPolicyBindingRequest request) { + return getAutoProtectionPolicyBindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy binding read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetAutoProtectionPolicyBindingRequest request =
+   *       GetAutoProtectionPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.getAutoProtectionPolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   AutoProtectionPolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getAutoProtectionPolicyBindingCallable() { + return stub.getAutoProtectionPolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy bindings read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   AutoProtectionPolicyName parent =
+   *       AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]");
+   *   for (AutoProtectionPolicyBinding element :
+   *       backupDRClient.listAutoProtectionPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve the list of policies. + * Format: projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutoProtectionPolicyBindingsPagedResponse listAutoProtectionPolicyBindings( + @Nullable AutoProtectionPolicyName parent) { + ListAutoProtectionPolicyBindingsRequest request = + ListAutoProtectionPolicyBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAutoProtectionPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy bindings read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent =
+   *       AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *           .toString();
+   *   for (AutoProtectionPolicyBinding element :
+   *       backupDRClient.listAutoProtectionPolicyBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve the list of policies. + * Format: projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutoProtectionPolicyBindingsPagedResponse listAutoProtectionPolicyBindings( + String parent) { + ListAutoProtectionPolicyBindingsRequest request = + ListAutoProtectionPolicyBindingsRequest.newBuilder().setParent(parent).build(); + return listAutoProtectionPolicyBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy bindings read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAutoProtectionPolicyBindingsRequest request =
+   *       ListAutoProtectionPolicyBindingsRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (AutoProtectionPolicyBinding element :
+   *       backupDRClient.listAutoProtectionPolicyBindings(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 ListAutoProtectionPolicyBindingsPagedResponse listAutoProtectionPolicyBindings( + ListAutoProtectionPolicyBindingsRequest request) { + return listAutoProtectionPolicyBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy bindings read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAutoProtectionPolicyBindingsRequest request =
+   *       ListAutoProtectionPolicyBindingsRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listAutoProtectionPolicyBindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AutoProtectionPolicyBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsPagedCallable() { + return stub.listAutoProtectionPolicyBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the auto protection policy bindings read from the CCFE tables. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAutoProtectionPolicyBindingsRequest request =
+   *       ListAutoProtectionPolicyBindingsRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListAutoProtectionPolicyBindingsResponse response =
+   *         backupDRClient.listAutoProtectionPolicyBindingsCallable().call(request);
+   *     for (AutoProtectionPolicyBinding element : response.getAutoProtectionPolicyBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsCallable() { + return stub.listAutoProtectionPolicyBindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AppliedAutoProtectionPolicies in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (AppliedAutoProtectionPolicy element :
+   *       backupDRClient.listAppliedAutoProtectionPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve the list of applied + * policies. Format: projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAppliedAutoProtectionPoliciesPagedResponse listAppliedAutoProtectionPolicies( + @Nullable LocationName parent) { + ListAppliedAutoProtectionPoliciesRequest request = + ListAppliedAutoProtectionPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAppliedAutoProtectionPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AppliedAutoProtectionPolicies in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (AppliedAutoProtectionPolicy element :
+   *       backupDRClient.listAppliedAutoProtectionPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve the list of applied + * policies. Format: projects/{project}/locations/{location} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAppliedAutoProtectionPoliciesPagedResponse listAppliedAutoProtectionPolicies( + String parent) { + ListAppliedAutoProtectionPoliciesRequest request = + ListAppliedAutoProtectionPoliciesRequest.newBuilder().setParent(parent).build(); + return listAppliedAutoProtectionPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AppliedAutoProtectionPolicies in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAppliedAutoProtectionPoliciesRequest request =
+   *       ListAppliedAutoProtectionPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (AppliedAutoProtectionPolicy element :
+   *       backupDRClient.listAppliedAutoProtectionPolicies(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 ListAppliedAutoProtectionPoliciesPagedResponse listAppliedAutoProtectionPolicies( + ListAppliedAutoProtectionPoliciesRequest request) { + return listAppliedAutoProtectionPoliciesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AppliedAutoProtectionPolicies in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAppliedAutoProtectionPoliciesRequest request =
+   *       ListAppliedAutoProtectionPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listAppliedAutoProtectionPoliciesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AppliedAutoProtectionPolicy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesPagedCallable() { + return stub.listAppliedAutoProtectionPoliciesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AppliedAutoProtectionPolicies in a given project and location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListAppliedAutoProtectionPoliciesRequest request =
+   *       ListAppliedAutoProtectionPoliciesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListAppliedAutoProtectionPoliciesResponse response =
+   *         backupDRClient.listAppliedAutoProtectionPoliciesCallable().call(request);
+   *     for (AppliedAutoProtectionPolicy element :
+   *         response.getAppliedAutoProtectionPoliciesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesCallable() { + return stub.listAppliedAutoProtectionPoliciesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitiateDeleteAutoProtectionPolicyBinding initiates delete for AutoProtectionPolicy Binding + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   AutoProtectionPolicyBindingName name =
+   *       AutoProtectionPolicyBindingName.of(
+   *           "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]");
+   *   AutoProtectionPolicyBinding response =
+   *       backupDRClient.initiateDeleteAutoProtectionPolicyBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the binding to delete. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + initiateDeleteAutoProtectionPolicyBindingAsync( + @Nullable AutoProtectionPolicyBindingName name) { + InitiateDeleteAutoProtectionPolicyBindingRequest request = + InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return initiateDeleteAutoProtectionPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitiateDeleteAutoProtectionPolicyBinding initiates delete for AutoProtectionPolicy Binding + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       AutoProtectionPolicyBindingName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *           .toString();
+   *   AutoProtectionPolicyBinding response =
+   *       backupDRClient.initiateDeleteAutoProtectionPolicyBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the binding to delete. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + initiateDeleteAutoProtectionPolicyBindingAsync(String name) { + InitiateDeleteAutoProtectionPolicyBindingRequest request = + InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder().setName(name).build(); + return initiateDeleteAutoProtectionPolicyBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitiateDeleteAutoProtectionPolicyBinding initiates delete for AutoProtectionPolicy Binding + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   InitiateDeleteAutoProtectionPolicyBindingRequest request =
+   *       InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .build();
+   *   AutoProtectionPolicyBinding response =
+   *       backupDRClient.initiateDeleteAutoProtectionPolicyBindingAsync(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 + initiateDeleteAutoProtectionPolicyBindingAsync( + InitiateDeleteAutoProtectionPolicyBindingRequest request) { + return initiateDeleteAutoProtectionPolicyBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitiateDeleteAutoProtectionPolicyBinding initiates delete for AutoProtectionPolicy Binding + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   InitiateDeleteAutoProtectionPolicyBindingRequest request =
+   *       InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       backupDRClient
+   *           .initiateDeleteAutoProtectionPolicyBindingOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   AutoProtectionPolicyBinding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationCallable() { + return stub.initiateDeleteAutoProtectionPolicyBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitiateDeleteAutoProtectionPolicyBinding initiates delete for AutoProtectionPolicy Binding + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   InitiateDeleteAutoProtectionPolicyBindingRequest request =
+   *       InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder()
+   *           .setName(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.initiateDeleteAutoProtectionPolicyBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + initiateDeleteAutoProtectionPolicyBindingCallable() { + return stub.initiateDeleteAutoProtectionPolicyBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Binding Matching Resource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   BindingMatchingResourceName name =
+   *       BindingMatchingResourceName.of(
+   *           "[PROJECT]",
+   *           "[LOCATION]",
+   *           "[AUTO_PROTECTION_POLICY]",
+   *           "[BINDING]",
+   *           "[MATCHING_RESOURCE]");
+   *   BindingMatchingResource response = backupDRClient.getBindingMatchingResource(name);
+   * }
+   * }
+ * + * @param name Required. The name of the matching resource to retrieve. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BindingMatchingResource getBindingMatchingResource( + @Nullable BindingMatchingResourceName name) { + GetBindingMatchingResourceRequest request = + GetBindingMatchingResourceRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getBindingMatchingResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Binding Matching Resource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String name =
+   *       BindingMatchingResourceName.of(
+   *               "[PROJECT]",
+   *               "[LOCATION]",
+   *               "[AUTO_PROTECTION_POLICY]",
+   *               "[BINDING]",
+   *               "[MATCHING_RESOURCE]")
+   *           .toString();
+   *   BindingMatchingResource response = backupDRClient.getBindingMatchingResource(name);
+   * }
+   * }
+ * + * @param name Required. The name of the matching resource to retrieve. Format: + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BindingMatchingResource getBindingMatchingResource(String name) { + GetBindingMatchingResourceRequest request = + GetBindingMatchingResourceRequest.newBuilder().setName(name).build(); + return getBindingMatchingResource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Binding Matching Resource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBindingMatchingResourceRequest request =
+   *       GetBindingMatchingResourceRequest.newBuilder()
+   *           .setName(
+   *               BindingMatchingResourceName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AUTO_PROTECTION_POLICY]",
+   *                       "[BINDING]",
+   *                       "[MATCHING_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   BindingMatchingResource response = backupDRClient.getBindingMatchingResource(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 BindingMatchingResource getBindingMatchingResource( + GetBindingMatchingResourceRequest request) { + return getBindingMatchingResourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Binding Matching Resource. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetBindingMatchingResourceRequest request =
+   *       GetBindingMatchingResourceRequest.newBuilder()
+   *           .setName(
+   *               BindingMatchingResourceName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[AUTO_PROTECTION_POLICY]",
+   *                       "[BINDING]",
+   *                       "[MATCHING_RESOURCE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.getBindingMatchingResourceCallable().futureCall(request);
+   *   // Do something.
+   *   BindingMatchingResource response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getBindingMatchingResourceCallable() { + return stub.getBindingMatchingResourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   AutoProtectionPolicyBindingName parent =
+   *       AutoProtectionPolicyBindingName.of(
+   *           "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]");
+   *   for (BindingMatchingResource element :
+   *       backupDRClient.listBindingMatchingResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project, location, auto protection policy and binding for which to + * retrieve `BindingMatchingResources` information. Format: + * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBindingMatchingResourcesPagedResponse listBindingMatchingResources( + @Nullable AutoProtectionPolicyBindingName parent) { + ListBindingMatchingResourcesRequest request = + ListBindingMatchingResourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listBindingMatchingResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   String parent =
+   *       AutoProtectionPolicyBindingName.of(
+   *               "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *           .toString();
+   *   for (BindingMatchingResource element :
+   *       backupDRClient.listBindingMatchingResources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project, location, auto protection policy and binding for which to + * retrieve `BindingMatchingResources` information. Format: + * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`. + * In Google Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListBindingMatchingResourcesPagedResponse listBindingMatchingResources( + String parent) { + ListBindingMatchingResourcesRequest request = + ListBindingMatchingResourcesRequest.newBuilder().setParent(parent).build(); + return listBindingMatchingResources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBindingMatchingResourcesRequest request =
+   *       ListBindingMatchingResourcesRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (BindingMatchingResource element :
+   *       backupDRClient.listBindingMatchingResources(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 ListBindingMatchingResourcesPagedResponse listBindingMatchingResources( + ListBindingMatchingResourcesRequest request) { + return listBindingMatchingResourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBindingMatchingResourcesRequest request =
+   *       ListBindingMatchingResourcesRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.listBindingMatchingResourcesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BindingMatchingResource element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesPagedCallable() { + return stub.listBindingMatchingResourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListBindingMatchingResourcesRequest request =
+   *       ListBindingMatchingResourcesRequest.newBuilder()
+   *           .setParent(
+   *               AutoProtectionPolicyBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListBindingMatchingResourcesResponse response =
+   *         backupDRClient.listBindingMatchingResourcesCallable().call(request);
+   *     for (BindingMatchingResource element : response.getMatchingResourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesResponse> + listBindingMatchingResourcesCallable() { + return stub.listBindingMatchingResourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : backupDRClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = backupDRClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = backupDRClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = backupDRClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = backupDRClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = backupDRClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = backupDRClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = backupDRClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = backupDRClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = backupDRClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDRClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListManagementServersPagedResponse + extends AbstractPagedListResponse< + ListManagementServersRequest, + ListManagementServersResponse, + ManagementServer, + ListManagementServersPage, + ListManagementServersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListManagementServersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListManagementServersPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListManagementServersPagedResponse(ListManagementServersPage page) { + super(page, ListManagementServersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListManagementServersPage + extends AbstractPage< + ListManagementServersRequest, + ListManagementServersResponse, + ManagementServer, + ListManagementServersPage> { + + private ListManagementServersPage( + @Nullable + PageContext< + ListManagementServersRequest, ListManagementServersResponse, ManagementServer> + context, + @Nullable ListManagementServersResponse response) { + super(context, response); + } + + private static ListManagementServersPage createEmptyPage() { + return new ListManagementServersPage(null, null); + } + + @Override + protected ListManagementServersPage createPage( + @Nullable + PageContext< + ListManagementServersRequest, ListManagementServersResponse, ManagementServer> + context, + @Nullable ListManagementServersResponse response) { + return new ListManagementServersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListManagementServersRequest, ListManagementServersResponse, ManagementServer> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListManagementServersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListManagementServersRequest, + ListManagementServersResponse, + ManagementServer, + ListManagementServersPage, + ListManagementServersFixedSizeCollection> { + + private ListManagementServersFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListManagementServersFixedSizeCollection createEmptyCollection() { + return new ListManagementServersFixedSizeCollection(null, 0); + } + + @Override + protected ListManagementServersFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListManagementServersFixedSizeCollection(pages, collectionSize); + } + } + + 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( + @Nullable PageContext + context, + @Nullable ListBackupVaultsResponse response) { + super(context, response); + } + + private static ListBackupVaultsPage createEmptyPage() { + return new ListBackupVaultsPage(null, null); + } + + @Override + protected ListBackupVaultsPage createPage( + @Nullable PageContext + context, + @Nullable ListBackupVaultsResponse response) { + return new ListBackupVaultsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupVaultsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupVaultsRequest, + ListBackupVaultsResponse, + BackupVault, + ListBackupVaultsPage, + ListBackupVaultsFixedSizeCollection> { + + private ListBackupVaultsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupVaultsFixedSizeCollection createEmptyCollection() { + return new ListBackupVaultsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupVaultsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListBackupVaultsFixedSizeCollection(pages, collectionSize); + } + } + + public static class FetchUsableBackupVaultsPagedResponse + extends AbstractPagedListResponse< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + BackupVault, + FetchUsableBackupVaultsPage, + FetchUsableBackupVaultsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + FetchUsableBackupVaultsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new FetchUsableBackupVaultsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private FetchUsableBackupVaultsPagedResponse(FetchUsableBackupVaultsPage page) { + super(page, FetchUsableBackupVaultsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class FetchUsableBackupVaultsPage + extends AbstractPage< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + BackupVault, + FetchUsableBackupVaultsPage> { + + private FetchUsableBackupVaultsPage( + @Nullable + PageContext< + FetchUsableBackupVaultsRequest, FetchUsableBackupVaultsResponse, BackupVault> + context, + @Nullable FetchUsableBackupVaultsResponse response) { + super(context, response); + } + + private static FetchUsableBackupVaultsPage createEmptyPage() { + return new FetchUsableBackupVaultsPage(null, null); + } + + @Override + protected FetchUsableBackupVaultsPage createPage( + @Nullable + PageContext< + FetchUsableBackupVaultsRequest, FetchUsableBackupVaultsResponse, BackupVault> + context, + @Nullable FetchUsableBackupVaultsResponse response) { + return new FetchUsableBackupVaultsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + FetchUsableBackupVaultsRequest, FetchUsableBackupVaultsResponse, BackupVault> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class FetchUsableBackupVaultsFixedSizeCollection + extends AbstractFixedSizeCollection< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + BackupVault, + FetchUsableBackupVaultsPage, + FetchUsableBackupVaultsFixedSizeCollection> { + + private FetchUsableBackupVaultsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static FetchUsableBackupVaultsFixedSizeCollection createEmptyCollection() { + return new FetchUsableBackupVaultsFixedSizeCollection(null, 0); + } + + @Override + protected FetchUsableBackupVaultsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new FetchUsableBackupVaultsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDataSourcesPagedResponse + extends AbstractPagedListResponse< + ListDataSourcesRequest, + ListDataSourcesResponse, + DataSource, + ListDataSourcesPage, + ListDataSourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataSourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataSourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataSourcesPagedResponse(ListDataSourcesPage page) { + super(page, ListDataSourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataSourcesPage + extends AbstractPage< + ListDataSourcesRequest, ListDataSourcesResponse, DataSource, ListDataSourcesPage> { + + private ListDataSourcesPage( + @Nullable PageContext context, + @Nullable ListDataSourcesResponse response) { + super(context, response); + } + + private static ListDataSourcesPage createEmptyPage() { + return new ListDataSourcesPage(null, null); + } + + @Override + protected ListDataSourcesPage createPage( + @Nullable PageContext context, + @Nullable ListDataSourcesResponse response) { + return new ListDataSourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataSourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataSourcesRequest, + ListDataSourcesResponse, + DataSource, + ListDataSourcesPage, + ListDataSourcesFixedSizeCollection> { + + private ListDataSourcesFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataSourcesFixedSizeCollection createEmptyCollection() { + return new ListDataSourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListDataSourcesFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListDataSourcesFixedSizeCollection(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( + @Nullable PageContext context, + @Nullable ListBackupsResponse response) { + super(context, response); + } + + private static ListBackupsPage createEmptyPage() { + return new ListBackupsPage(null, null); + } + + @Override + protected ListBackupsPage createPage( + @Nullable PageContext context, + @Nullable ListBackupsResponse response) { + return new ListBackupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupsRequest, + ListBackupsResponse, + Backup, + ListBackupsPage, + ListBackupsFixedSizeCollection> { + + private ListBackupsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupsFixedSizeCollection createEmptyCollection() { + return new ListBackupsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListBackupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class FetchBackupsForResourceTypePagedResponse + extends AbstractPagedListResponse< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + Backup, + FetchBackupsForResourceTypePage, + FetchBackupsForResourceTypeFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + FetchBackupsForResourceTypePage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new FetchBackupsForResourceTypePagedResponse(input), + MoreExecutors.directExecutor()); + } + + private FetchBackupsForResourceTypePagedResponse(FetchBackupsForResourceTypePage page) { + super(page, FetchBackupsForResourceTypeFixedSizeCollection.createEmptyCollection()); + } + } + + public static class FetchBackupsForResourceTypePage + extends AbstractPage< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + Backup, + FetchBackupsForResourceTypePage> { + + private FetchBackupsForResourceTypePage( + @Nullable + PageContext< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse, Backup> + context, + @Nullable FetchBackupsForResourceTypeResponse response) { + super(context, response); + } + + private static FetchBackupsForResourceTypePage createEmptyPage() { + return new FetchBackupsForResourceTypePage(null, null); + } + + @Override + protected FetchBackupsForResourceTypePage createPage( + @Nullable + PageContext< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse, Backup> + context, + @Nullable FetchBackupsForResourceTypeResponse response) { + return new FetchBackupsForResourceTypePage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse, Backup> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class FetchBackupsForResourceTypeFixedSizeCollection + extends AbstractFixedSizeCollection< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + Backup, + FetchBackupsForResourceTypePage, + FetchBackupsForResourceTypeFixedSizeCollection> { + + private FetchBackupsForResourceTypeFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static FetchBackupsForResourceTypeFixedSizeCollection createEmptyCollection() { + return new FetchBackupsForResourceTypeFixedSizeCollection(null, 0); + } + + @Override + protected FetchBackupsForResourceTypeFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new FetchBackupsForResourceTypeFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBackupPlansPagedResponse + extends AbstractPagedListResponse< + ListBackupPlansRequest, + ListBackupPlansResponse, + BackupPlan, + ListBackupPlansPage, + ListBackupPlansFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupPlansPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListBackupPlansPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListBackupPlansPagedResponse(ListBackupPlansPage page) { + super(page, ListBackupPlansFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupPlansPage + extends AbstractPage< + ListBackupPlansRequest, ListBackupPlansResponse, BackupPlan, ListBackupPlansPage> { + + private ListBackupPlansPage( + @Nullable PageContext context, + @Nullable ListBackupPlansResponse response) { + super(context, response); + } + + private static ListBackupPlansPage createEmptyPage() { + return new ListBackupPlansPage(null, null); + } + + @Override + protected ListBackupPlansPage createPage( + @Nullable PageContext context, + @Nullable ListBackupPlansResponse response) { + return new ListBackupPlansPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupPlansFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupPlansRequest, + ListBackupPlansResponse, + BackupPlan, + ListBackupPlansPage, + ListBackupPlansFixedSizeCollection> { + + private ListBackupPlansFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupPlansFixedSizeCollection createEmptyCollection() { + return new ListBackupPlansFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupPlansFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListBackupPlansFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBackupPlanRevisionsPagedResponse + extends AbstractPagedListResponse< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + BackupPlanRevision, + ListBackupPlanRevisionsPage, + ListBackupPlanRevisionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListBackupPlanRevisionsRequest, ListBackupPlanRevisionsResponse, BackupPlanRevision> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupPlanRevisionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListBackupPlanRevisionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListBackupPlanRevisionsPagedResponse(ListBackupPlanRevisionsPage page) { + super(page, ListBackupPlanRevisionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupPlanRevisionsPage + extends AbstractPage< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + BackupPlanRevision, + ListBackupPlanRevisionsPage> { + + private ListBackupPlanRevisionsPage( + @Nullable + PageContext< + ListBackupPlanRevisionsRequest, ListBackupPlanRevisionsResponse, BackupPlanRevision> + context, + @Nullable ListBackupPlanRevisionsResponse response) { + super(context, response); + } + + private static ListBackupPlanRevisionsPage createEmptyPage() { + return new ListBackupPlanRevisionsPage(null, null); + } + + @Override + protected ListBackupPlanRevisionsPage createPage( + @Nullable + PageContext< + ListBackupPlanRevisionsRequest, ListBackupPlanRevisionsResponse, BackupPlanRevision> + context, + @Nullable ListBackupPlanRevisionsResponse response) { + return new ListBackupPlanRevisionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListBackupPlanRevisionsRequest, ListBackupPlanRevisionsResponse, BackupPlanRevision> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupPlanRevisionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + BackupPlanRevision, + ListBackupPlanRevisionsPage, + ListBackupPlanRevisionsFixedSizeCollection> { + + private ListBackupPlanRevisionsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupPlanRevisionsFixedSizeCollection createEmptyCollection() { + return new ListBackupPlanRevisionsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupPlanRevisionsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListBackupPlanRevisionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBackupPlanAssociationsPagedResponse + extends AbstractPagedListResponse< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation, + ListBackupPlanAssociationsPage, + ListBackupPlanAssociationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBackupPlanAssociationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListBackupPlanAssociationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListBackupPlanAssociationsPagedResponse(ListBackupPlanAssociationsPage page) { + super(page, ListBackupPlanAssociationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBackupPlanAssociationsPage + extends AbstractPage< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation, + ListBackupPlanAssociationsPage> { + + private ListBackupPlanAssociationsPage( + @Nullable + PageContext< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation> + context, + @Nullable ListBackupPlanAssociationsResponse response) { + super(context, response); + } + + private static ListBackupPlanAssociationsPage createEmptyPage() { + return new ListBackupPlanAssociationsPage(null, null); + } + + @Override + protected ListBackupPlanAssociationsPage createPage( + @Nullable + PageContext< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation> + context, + @Nullable ListBackupPlanAssociationsResponse response) { + return new ListBackupPlanAssociationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBackupPlanAssociationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation, + ListBackupPlanAssociationsPage, + ListBackupPlanAssociationsFixedSizeCollection> { + + private ListBackupPlanAssociationsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBackupPlanAssociationsFixedSizeCollection createEmptyCollection() { + return new ListBackupPlanAssociationsFixedSizeCollection(null, 0); + } + + @Override + protected ListBackupPlanAssociationsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListBackupPlanAssociationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class FetchBackupPlanAssociationsForResourceTypePagedResponse + extends AbstractPagedListResponse< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation, + FetchBackupPlanAssociationsForResourceTypePage, + FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + FetchBackupPlanAssociationsForResourceTypePage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new FetchBackupPlanAssociationsForResourceTypePagedResponse(input), + MoreExecutors.directExecutor()); + } + + private FetchBackupPlanAssociationsForResourceTypePagedResponse( + FetchBackupPlanAssociationsForResourceTypePage page) { + super( + page, + FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection.createEmptyCollection()); + } + } + + public static class FetchBackupPlanAssociationsForResourceTypePage + extends AbstractPage< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation, + FetchBackupPlanAssociationsForResourceTypePage> { + + private FetchBackupPlanAssociationsForResourceTypePage( + @Nullable + PageContext< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation> + context, + @Nullable FetchBackupPlanAssociationsForResourceTypeResponse response) { + super(context, response); + } + + private static FetchBackupPlanAssociationsForResourceTypePage createEmptyPage() { + return new FetchBackupPlanAssociationsForResourceTypePage(null, null); + } + + @Override + protected FetchBackupPlanAssociationsForResourceTypePage createPage( + @Nullable + PageContext< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation> + context, + @Nullable FetchBackupPlanAssociationsForResourceTypeResponse response) { + return new FetchBackupPlanAssociationsForResourceTypePage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection + extends AbstractFixedSizeCollection< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation, + FetchBackupPlanAssociationsForResourceTypePage, + FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection> { + + private FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection + createEmptyCollection() { + return new FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection(null, 0); + } + + @Override + protected FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new FetchBackupPlanAssociationsForResourceTypeFixedSizeCollection( + pages, collectionSize); + } + } + + public static class ListDataSourceReferencesPagedResponse + extends AbstractPagedListResponse< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference, + ListDataSourceReferencesPage, + ListDataSourceReferencesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataSourceReferencesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataSourceReferencesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataSourceReferencesPagedResponse(ListDataSourceReferencesPage page) { + super(page, ListDataSourceReferencesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataSourceReferencesPage + extends AbstractPage< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference, + ListDataSourceReferencesPage> { + + private ListDataSourceReferencesPage( + @Nullable + PageContext< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference> + context, + @Nullable ListDataSourceReferencesResponse response) { + super(context, response); + } + + private static ListDataSourceReferencesPage createEmptyPage() { + return new ListDataSourceReferencesPage(null, null); + } + + @Override + protected ListDataSourceReferencesPage createPage( + @Nullable + PageContext< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference> + context, + @Nullable ListDataSourceReferencesResponse response) { + return new ListDataSourceReferencesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataSourceReferencesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference, + ListDataSourceReferencesPage, + ListDataSourceReferencesFixedSizeCollection> { + + private ListDataSourceReferencesFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataSourceReferencesFixedSizeCollection createEmptyCollection() { + return new ListDataSourceReferencesFixedSizeCollection(null, 0); + } + + @Override + protected ListDataSourceReferencesFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListDataSourceReferencesFixedSizeCollection(pages, collectionSize); + } + } + + public static class FetchDataSourceReferencesForResourceTypePagedResponse + extends AbstractPagedListResponse< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference, + FetchDataSourceReferencesForResourceTypePage, + FetchDataSourceReferencesForResourceTypeFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + FetchDataSourceReferencesForResourceTypePage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new FetchDataSourceReferencesForResourceTypePagedResponse(input), + MoreExecutors.directExecutor()); + } + + private FetchDataSourceReferencesForResourceTypePagedResponse( + FetchDataSourceReferencesForResourceTypePage page) { + super( + page, + FetchDataSourceReferencesForResourceTypeFixedSizeCollection.createEmptyCollection()); + } + } + + public static class FetchDataSourceReferencesForResourceTypePage + extends AbstractPage< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference, + FetchDataSourceReferencesForResourceTypePage> { + + private FetchDataSourceReferencesForResourceTypePage( + @Nullable + PageContext< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference> + context, + @Nullable FetchDataSourceReferencesForResourceTypeResponse response) { + super(context, response); + } + + private static FetchDataSourceReferencesForResourceTypePage createEmptyPage() { + return new FetchDataSourceReferencesForResourceTypePage(null, null); + } + + @Override + protected FetchDataSourceReferencesForResourceTypePage createPage( + @Nullable + PageContext< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference> + context, + @Nullable FetchDataSourceReferencesForResourceTypeResponse response) { + return new FetchDataSourceReferencesForResourceTypePage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class FetchDataSourceReferencesForResourceTypeFixedSizeCollection + extends AbstractFixedSizeCollection< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference, + FetchDataSourceReferencesForResourceTypePage, + FetchDataSourceReferencesForResourceTypeFixedSizeCollection> { + + private FetchDataSourceReferencesForResourceTypeFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static FetchDataSourceReferencesForResourceTypeFixedSizeCollection + createEmptyCollection() { + return new FetchDataSourceReferencesForResourceTypeFixedSizeCollection(null, 0); + } + + @Override + protected FetchDataSourceReferencesForResourceTypeFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new FetchDataSourceReferencesForResourceTypeFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAutoProtectionPoliciesPagedResponse + extends AbstractPagedListResponse< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy, + ListAutoProtectionPoliciesPage, + ListAutoProtectionPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAutoProtectionPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAutoProtectionPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAutoProtectionPoliciesPagedResponse(ListAutoProtectionPoliciesPage page) { + super(page, ListAutoProtectionPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAutoProtectionPoliciesPage + extends AbstractPage< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy, + ListAutoProtectionPoliciesPage> { + + private ListAutoProtectionPoliciesPage( + @Nullable + PageContext< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy> + context, + @Nullable ListAutoProtectionPoliciesResponse response) { + super(context, response); + } + + private static ListAutoProtectionPoliciesPage createEmptyPage() { + return new ListAutoProtectionPoliciesPage(null, null); + } + + @Override + protected ListAutoProtectionPoliciesPage createPage( + @Nullable + PageContext< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy> + context, + @Nullable ListAutoProtectionPoliciesResponse response) { + return new ListAutoProtectionPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAutoProtectionPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy, + ListAutoProtectionPoliciesPage, + ListAutoProtectionPoliciesFixedSizeCollection> { + + private ListAutoProtectionPoliciesFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAutoProtectionPoliciesFixedSizeCollection createEmptyCollection() { + return new ListAutoProtectionPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListAutoProtectionPoliciesFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListAutoProtectionPoliciesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAutoProtectionPolicyBindingsPagedResponse + extends AbstractPagedListResponse< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding, + ListAutoProtectionPolicyBindingsPage, + ListAutoProtectionPolicyBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAutoProtectionPolicyBindingsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAutoProtectionPolicyBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAutoProtectionPolicyBindingsPagedResponse( + ListAutoProtectionPolicyBindingsPage page) { + super(page, ListAutoProtectionPolicyBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAutoProtectionPolicyBindingsPage + extends AbstractPage< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding, + ListAutoProtectionPolicyBindingsPage> { + + private ListAutoProtectionPolicyBindingsPage( + @Nullable + PageContext< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding> + context, + @Nullable ListAutoProtectionPolicyBindingsResponse response) { + super(context, response); + } + + private static ListAutoProtectionPolicyBindingsPage createEmptyPage() { + return new ListAutoProtectionPolicyBindingsPage(null, null); + } + + @Override + protected ListAutoProtectionPolicyBindingsPage createPage( + @Nullable + PageContext< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding> + context, + @Nullable ListAutoProtectionPolicyBindingsResponse response) { + return new ListAutoProtectionPolicyBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAutoProtectionPolicyBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding, + ListAutoProtectionPolicyBindingsPage, + ListAutoProtectionPolicyBindingsFixedSizeCollection> { + + private ListAutoProtectionPolicyBindingsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAutoProtectionPolicyBindingsFixedSizeCollection createEmptyCollection() { + return new ListAutoProtectionPolicyBindingsFixedSizeCollection(null, 0); + } + + @Override + protected ListAutoProtectionPolicyBindingsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListAutoProtectionPolicyBindingsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAppliedAutoProtectionPoliciesPagedResponse + extends AbstractPagedListResponse< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy, + ListAppliedAutoProtectionPoliciesPage, + ListAppliedAutoProtectionPoliciesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAppliedAutoProtectionPoliciesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAppliedAutoProtectionPoliciesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAppliedAutoProtectionPoliciesPagedResponse( + ListAppliedAutoProtectionPoliciesPage page) { + super(page, ListAppliedAutoProtectionPoliciesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAppliedAutoProtectionPoliciesPage + extends AbstractPage< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy, + ListAppliedAutoProtectionPoliciesPage> { + + private ListAppliedAutoProtectionPoliciesPage( + @Nullable + PageContext< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy> + context, + @Nullable ListAppliedAutoProtectionPoliciesResponse response) { + super(context, response); + } + + private static ListAppliedAutoProtectionPoliciesPage createEmptyPage() { + return new ListAppliedAutoProtectionPoliciesPage(null, null); + } + + @Override + protected ListAppliedAutoProtectionPoliciesPage createPage( + @Nullable + PageContext< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy> + context, + @Nullable ListAppliedAutoProtectionPoliciesResponse response) { + return new ListAppliedAutoProtectionPoliciesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAppliedAutoProtectionPoliciesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy, + ListAppliedAutoProtectionPoliciesPage, + ListAppliedAutoProtectionPoliciesFixedSizeCollection> { + + private ListAppliedAutoProtectionPoliciesFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAppliedAutoProtectionPoliciesFixedSizeCollection createEmptyCollection() { + return new ListAppliedAutoProtectionPoliciesFixedSizeCollection(null, 0); + } + + @Override + protected ListAppliedAutoProtectionPoliciesFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListAppliedAutoProtectionPoliciesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListBindingMatchingResourcesPagedResponse + extends AbstractPagedListResponse< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource, + ListBindingMatchingResourcesPage, + ListBindingMatchingResourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListBindingMatchingResourcesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListBindingMatchingResourcesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListBindingMatchingResourcesPagedResponse(ListBindingMatchingResourcesPage page) { + super(page, ListBindingMatchingResourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListBindingMatchingResourcesPage + extends AbstractPage< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource, + ListBindingMatchingResourcesPage> { + + private ListBindingMatchingResourcesPage( + @Nullable + PageContext< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource> + context, + @Nullable ListBindingMatchingResourcesResponse response) { + super(context, response); + } + + private static ListBindingMatchingResourcesPage createEmptyPage() { + return new ListBindingMatchingResourcesPage(null, null); + } + + @Override + protected ListBindingMatchingResourcesPage createPage( + @Nullable + PageContext< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource> + context, + @Nullable ListBindingMatchingResourcesResponse response) { + return new ListBindingMatchingResourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListBindingMatchingResourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource, + ListBindingMatchingResourcesPage, + ListBindingMatchingResourcesFixedSizeCollection> { + + private ListBindingMatchingResourcesFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListBindingMatchingResourcesFixedSizeCollection createEmptyCollection() { + return new ListBindingMatchingResourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListBindingMatchingResourcesFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListBindingMatchingResourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + @Nullable PageContext context, + @Nullable ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + @Nullable PageContext context, + @Nullable ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRSettings.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRSettings.java new file mode 100644 index 000000000000..8516738d29d8 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRSettings.java @@ -0,0 +1,1283 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupPlanAssociationsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchDataSourceReferencesForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchUsableBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAppliedAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPolicyBindingsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanAssociationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanRevisionsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlansPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBindingMatchingResourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourceReferencesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListManagementServersPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.backupdr.v1beta.stub.BackupDRStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link BackupDRClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (backupdr.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getManagementServer: + * + *

{@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
+ * BackupDRSettings.Builder backupDRSettingsBuilder = BackupDRSettings.newBuilder();
+ * backupDRSettingsBuilder
+ *     .getManagementServerSettings()
+ *     .setRetrySettings(
+ *         backupDRSettingsBuilder
+ *             .getManagementServerSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * BackupDRSettings backupDRSettings = backupDRSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createManagementServer: + * + *

{@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
+ * BackupDRSettings.Builder backupDRSettingsBuilder = BackupDRSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * backupDRSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class BackupDRSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listManagementServers. */ + public PagedCallSettings< + ListManagementServersRequest, + ListManagementServersResponse, + ListManagementServersPagedResponse> + listManagementServersSettings() { + return ((BackupDRStubSettings) getStubSettings()).listManagementServersSettings(); + } + + /** Returns the object with the settings used for calls to getManagementServer. */ + public UnaryCallSettings + getManagementServerSettings() { + return ((BackupDRStubSettings) getStubSettings()).getManagementServerSettings(); + } + + /** Returns the object with the settings used for calls to createManagementServer. */ + public UnaryCallSettings + createManagementServerSettings() { + return ((BackupDRStubSettings) getStubSettings()).createManagementServerSettings(); + } + + /** Returns the object with the settings used for calls to createManagementServer. */ + public OperationCallSettings + createManagementServerOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).createManagementServerOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteManagementServer. */ + public UnaryCallSettings + deleteManagementServerSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteManagementServerSettings(); + } + + /** Returns the object with the settings used for calls to deleteManagementServer. */ + public OperationCallSettings + deleteManagementServerOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteManagementServerOperationSettings(); + } + + /** Returns the object with the settings used for calls to createBackupVault. */ + public UnaryCallSettings createBackupVaultSettings() { + return ((BackupDRStubSettings) getStubSettings()).createBackupVaultSettings(); + } + + /** Returns the object with the settings used for calls to createBackupVault. */ + public OperationCallSettings + createBackupVaultOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).createBackupVaultOperationSettings(); + } + + /** Returns the object with the settings used for calls to listBackupVaults. */ + public PagedCallSettings< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings() { + return ((BackupDRStubSettings) getStubSettings()).listBackupVaultsSettings(); + } + + /** Returns the object with the settings used for calls to fetchUsableBackupVaults. */ + public PagedCallSettings< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + FetchUsableBackupVaultsPagedResponse> + fetchUsableBackupVaultsSettings() { + return ((BackupDRStubSettings) getStubSettings()).fetchUsableBackupVaultsSettings(); + } + + /** Returns the object with the settings used for calls to getBackupVault. */ + public UnaryCallSettings getBackupVaultSettings() { + return ((BackupDRStubSettings) getStubSettings()).getBackupVaultSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupVault. */ + public UnaryCallSettings updateBackupVaultSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateBackupVaultSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupVault. */ + public OperationCallSettings + updateBackupVaultOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateBackupVaultOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupVault. */ + public UnaryCallSettings deleteBackupVaultSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteBackupVaultSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupVault. */ + public OperationCallSettings + deleteBackupVaultOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteBackupVaultOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDataSources. */ + public PagedCallSettings< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings() { + return ((BackupDRStubSettings) getStubSettings()).listDataSourcesSettings(); + } + + /** Returns the object with the settings used for calls to getDataSource. */ + public UnaryCallSettings getDataSourceSettings() { + return ((BackupDRStubSettings) getStubSettings()).getDataSourceSettings(); + } + + /** Returns the object with the settings used for calls to updateDataSource. */ + public UnaryCallSettings updateDataSourceSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateDataSourceSettings(); + } + + /** Returns the object with the settings used for calls to updateDataSource. */ + public OperationCallSettings + updateDataSourceOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateDataSourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listBackups. */ + public PagedCallSettings + listBackupsSettings() { + return ((BackupDRStubSettings) getStubSettings()).listBackupsSettings(); + } + + /** Returns the object with the settings used for calls to fetchBackupsForResourceType. */ + public PagedCallSettings< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypeSettings() { + return ((BackupDRStubSettings) getStubSettings()).fetchBackupsForResourceTypeSettings(); + } + + /** Returns the object with the settings used for calls to getBackup. */ + public UnaryCallSettings getBackupSettings() { + return ((BackupDRStubSettings) getStubSettings()).getBackupSettings(); + } + + /** Returns the object with the settings used for calls to updateBackup. */ + public UnaryCallSettings updateBackupSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateBackupSettings(); + } + + /** Returns the object with the settings used for calls to updateBackup. */ + public OperationCallSettings + updateBackupOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public UnaryCallSettings deleteBackupSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteBackupSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackup. */ + public OperationCallSettings + deleteBackupOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to restoreBackup. */ + public UnaryCallSettings restoreBackupSettings() { + return ((BackupDRStubSettings) getStubSettings()).restoreBackupSettings(); + } + + /** Returns the object with the settings used for calls to restoreBackup. */ + public OperationCallSettings + restoreBackupOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).restoreBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to createBackupPlan. */ + public UnaryCallSettings createBackupPlanSettings() { + return ((BackupDRStubSettings) getStubSettings()).createBackupPlanSettings(); + } + + /** Returns the object with the settings used for calls to createBackupPlan. */ + public OperationCallSettings + createBackupPlanOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).createBackupPlanOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupPlan. */ + public UnaryCallSettings updateBackupPlanSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateBackupPlanSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupPlan. */ + public OperationCallSettings + updateBackupPlanOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateBackupPlanOperationSettings(); + } + + /** Returns the object with the settings used for calls to getBackupPlan. */ + public UnaryCallSettings getBackupPlanSettings() { + return ((BackupDRStubSettings) getStubSettings()).getBackupPlanSettings(); + } + + /** Returns the object with the settings used for calls to listBackupPlans. */ + public PagedCallSettings< + ListBackupPlansRequest, ListBackupPlansResponse, ListBackupPlansPagedResponse> + listBackupPlansSettings() { + return ((BackupDRStubSettings) getStubSettings()).listBackupPlansSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupPlan. */ + public UnaryCallSettings deleteBackupPlanSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteBackupPlanSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupPlan. */ + public OperationCallSettings + deleteBackupPlanOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteBackupPlanOperationSettings(); + } + + /** Returns the object with the settings used for calls to getBackupPlanRevision. */ + public UnaryCallSettings + getBackupPlanRevisionSettings() { + return ((BackupDRStubSettings) getStubSettings()).getBackupPlanRevisionSettings(); + } + + /** Returns the object with the settings used for calls to listBackupPlanRevisions. */ + public PagedCallSettings< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + ListBackupPlanRevisionsPagedResponse> + listBackupPlanRevisionsSettings() { + return ((BackupDRStubSettings) getStubSettings()).listBackupPlanRevisionsSettings(); + } + + /** Returns the object with the settings used for calls to createBackupPlanAssociation. */ + public UnaryCallSettings + createBackupPlanAssociationSettings() { + return ((BackupDRStubSettings) getStubSettings()).createBackupPlanAssociationSettings(); + } + + /** Returns the object with the settings used for calls to createBackupPlanAssociation. */ + public OperationCallSettings< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()) + .createBackupPlanAssociationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupPlanAssociation. */ + public UnaryCallSettings + updateBackupPlanAssociationSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateBackupPlanAssociationSettings(); + } + + /** Returns the object with the settings used for calls to updateBackupPlanAssociation. */ + public OperationCallSettings< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()) + .updateBackupPlanAssociationOperationSettings(); + } + + /** Returns the object with the settings used for calls to getBackupPlanAssociation. */ + public UnaryCallSettings + getBackupPlanAssociationSettings() { + return ((BackupDRStubSettings) getStubSettings()).getBackupPlanAssociationSettings(); + } + + /** Returns the object with the settings used for calls to listBackupPlanAssociations. */ + public PagedCallSettings< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsSettings() { + return ((BackupDRStubSettings) getStubSettings()).listBackupPlanAssociationsSettings(); + } + + /** + * Returns the object with the settings used for calls to + * fetchBackupPlanAssociationsForResourceType. + */ + public PagedCallSettings< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypeSettings() { + return ((BackupDRStubSettings) getStubSettings()) + .fetchBackupPlanAssociationsForResourceTypeSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupPlanAssociation. */ + public UnaryCallSettings + deleteBackupPlanAssociationSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteBackupPlanAssociationSettings(); + } + + /** Returns the object with the settings used for calls to deleteBackupPlanAssociation. */ + public OperationCallSettings + deleteBackupPlanAssociationOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()) + .deleteBackupPlanAssociationOperationSettings(); + } + + /** Returns the object with the settings used for calls to triggerBackup. */ + public UnaryCallSettings triggerBackupSettings() { + return ((BackupDRStubSettings) getStubSettings()).triggerBackupSettings(); + } + + /** Returns the object with the settings used for calls to triggerBackup. */ + public OperationCallSettings + triggerBackupOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).triggerBackupOperationSettings(); + } + + /** Returns the object with the settings used for calls to getDataSourceReference. */ + public UnaryCallSettings + getDataSourceReferenceSettings() { + return ((BackupDRStubSettings) getStubSettings()).getDataSourceReferenceSettings(); + } + + /** Returns the object with the settings used for calls to listDataSourceReferences. */ + public PagedCallSettings< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + ListDataSourceReferencesPagedResponse> + listDataSourceReferencesSettings() { + return ((BackupDRStubSettings) getStubSettings()).listDataSourceReferencesSettings(); + } + + /** + * Returns the object with the settings used for calls to + * fetchDataSourceReferencesForResourceType. + */ + public PagedCallSettings< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypeSettings() { + return ((BackupDRStubSettings) getStubSettings()) + .fetchDataSourceReferencesForResourceTypeSettings(); + } + + /** Returns the object with the settings used for calls to initializeService. */ + public UnaryCallSettings initializeServiceSettings() { + return ((BackupDRStubSettings) getStubSettings()).initializeServiceSettings(); + } + + /** Returns the object with the settings used for calls to initializeService. */ + public OperationCallSettings< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).initializeServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to createAutoProtectionPolicy. */ + public UnaryCallSettings + createAutoProtectionPolicySettings() { + return ((BackupDRStubSettings) getStubSettings()).createAutoProtectionPolicySettings(); + } + + /** Returns the object with the settings used for calls to createAutoProtectionPolicy. */ + public OperationCallSettings< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).createAutoProtectionPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to listAutoProtectionPolicies. */ + public PagedCallSettings< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesSettings() { + return ((BackupDRStubSettings) getStubSettings()).listAutoProtectionPoliciesSettings(); + } + + /** Returns the object with the settings used for calls to getAutoProtectionPolicy. */ + public UnaryCallSettings + getAutoProtectionPolicySettings() { + return ((BackupDRStubSettings) getStubSettings()).getAutoProtectionPolicySettings(); + } + + /** Returns the object with the settings used for calls to updateAutoProtectionPolicy. */ + public UnaryCallSettings + updateAutoProtectionPolicySettings() { + return ((BackupDRStubSettings) getStubSettings()).updateAutoProtectionPolicySettings(); + } + + /** Returns the object with the settings used for calls to updateAutoProtectionPolicy. */ + public OperationCallSettings< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).updateAutoProtectionPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteAutoProtectionPolicy. */ + public UnaryCallSettings + deleteAutoProtectionPolicySettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteAutoProtectionPolicySettings(); + } + + /** Returns the object with the settings used for calls to deleteAutoProtectionPolicy. */ + public OperationCallSettings + deleteAutoProtectionPolicyOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()).deleteAutoProtectionPolicyOperationSettings(); + } + + /** Returns the object with the settings used for calls to createAutoProtectionPolicyBinding. */ + public UnaryCallSettings + createAutoProtectionPolicyBindingSettings() { + return ((BackupDRStubSettings) getStubSettings()).createAutoProtectionPolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to createAutoProtectionPolicyBinding. */ + public OperationCallSettings< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()) + .createAutoProtectionPolicyBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAutoProtectionPolicyBinding. */ + public UnaryCallSettings + getAutoProtectionPolicyBindingSettings() { + return ((BackupDRStubSettings) getStubSettings()).getAutoProtectionPolicyBindingSettings(); + } + + /** Returns the object with the settings used for calls to listAutoProtectionPolicyBindings. */ + public PagedCallSettings< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsSettings() { + return ((BackupDRStubSettings) getStubSettings()).listAutoProtectionPolicyBindingsSettings(); + } + + /** Returns the object with the settings used for calls to listAppliedAutoProtectionPolicies. */ + public PagedCallSettings< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesSettings() { + return ((BackupDRStubSettings) getStubSettings()).listAppliedAutoProtectionPoliciesSettings(); + } + + /** + * Returns the object with the settings used for calls to + * initiateDeleteAutoProtectionPolicyBinding. + */ + public UnaryCallSettings + initiateDeleteAutoProtectionPolicyBindingSettings() { + return ((BackupDRStubSettings) getStubSettings()) + .initiateDeleteAutoProtectionPolicyBindingSettings(); + } + + /** + * Returns the object with the settings used for calls to + * initiateDeleteAutoProtectionPolicyBinding. + */ + public OperationCallSettings< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationSettings() { + return ((BackupDRStubSettings) getStubSettings()) + .initiateDeleteAutoProtectionPolicyBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to getBindingMatchingResource. */ + public UnaryCallSettings + getBindingMatchingResourceSettings() { + return ((BackupDRStubSettings) getStubSettings()).getBindingMatchingResourceSettings(); + } + + /** Returns the object with the settings used for calls to listBindingMatchingResources. */ + public PagedCallSettings< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesSettings() { + return ((BackupDRStubSettings) getStubSettings()).listBindingMatchingResourcesSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((BackupDRStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((BackupDRStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((BackupDRStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((BackupDRStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((BackupDRStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final BackupDRSettings create(BackupDRStubSettings stub) throws IOException { + return new BackupDRSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return BackupDRStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return BackupDRStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return BackupDRStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return BackupDRStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return BackupDRStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return BackupDRStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return BackupDRStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BackupDRStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BackupDRSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for BackupDRSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(BackupDRStubSettings.newBuilder(clientContext)); + } + + protected Builder(BackupDRSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(BackupDRStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(BackupDRStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(BackupDRStubSettings.newHttpJsonBuilder()); + } + + public BackupDRStubSettings.Builder getStubSettingsBuilder() { + return ((BackupDRStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listManagementServers. */ + public PagedCallSettings.Builder< + ListManagementServersRequest, + ListManagementServersResponse, + ListManagementServersPagedResponse> + listManagementServersSettings() { + return getStubSettingsBuilder().listManagementServersSettings(); + } + + /** Returns the builder for the settings used for calls to getManagementServer. */ + public UnaryCallSettings.Builder + getManagementServerSettings() { + return getStubSettingsBuilder().getManagementServerSettings(); + } + + /** Returns the builder for the settings used for calls to createManagementServer. */ + public UnaryCallSettings.Builder + createManagementServerSettings() { + return getStubSettingsBuilder().createManagementServerSettings(); + } + + /** Returns the builder for the settings used for calls to createManagementServer. */ + public OperationCallSettings.Builder< + CreateManagementServerRequest, ManagementServer, OperationMetadata> + createManagementServerOperationSettings() { + return getStubSettingsBuilder().createManagementServerOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteManagementServer. */ + public UnaryCallSettings.Builder + deleteManagementServerSettings() { + return getStubSettingsBuilder().deleteManagementServerSettings(); + } + + /** Returns the builder for the settings used for calls to deleteManagementServer. */ + public OperationCallSettings.Builder + deleteManagementServerOperationSettings() { + return getStubSettingsBuilder().deleteManagementServerOperationSettings(); + } + + /** 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 listBackupVaults. */ + public PagedCallSettings.Builder< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings() { + return getStubSettingsBuilder().listBackupVaultsSettings(); + } + + /** Returns the builder for the settings used for calls to fetchUsableBackupVaults. */ + public PagedCallSettings.Builder< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + FetchUsableBackupVaultsPagedResponse> + fetchUsableBackupVaultsSettings() { + return getStubSettingsBuilder().fetchUsableBackupVaultsSettings(); + } + + /** 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 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 listDataSources. */ + public PagedCallSettings.Builder< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings() { + return getStubSettingsBuilder().listDataSourcesSettings(); + } + + /** Returns the builder for the settings used for calls to getDataSource. */ + public UnaryCallSettings.Builder getDataSourceSettings() { + return getStubSettingsBuilder().getDataSourceSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataSource. */ + public UnaryCallSettings.Builder + updateDataSourceSettings() { + return getStubSettingsBuilder().updateDataSourceSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataSource. */ + public OperationCallSettings.Builder + updateDataSourceOperationSettings() { + return getStubSettingsBuilder().updateDataSourceOperationSettings(); + } + + /** 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 fetchBackupsForResourceType. */ + public PagedCallSettings.Builder< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypeSettings() { + return getStubSettingsBuilder().fetchBackupsForResourceTypeSettings(); + } + + /** 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 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 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 restoreBackup. */ + public UnaryCallSettings.Builder restoreBackupSettings() { + return getStubSettingsBuilder().restoreBackupSettings(); + } + + /** Returns the builder for the settings used for calls to restoreBackup. */ + public OperationCallSettings.Builder< + RestoreBackupRequest, RestoreBackupResponse, OperationMetadata> + restoreBackupOperationSettings() { + return getStubSettingsBuilder().restoreBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createBackupPlan. */ + public UnaryCallSettings.Builder + createBackupPlanSettings() { + return getStubSettingsBuilder().createBackupPlanSettings(); + } + + /** Returns the builder for the settings used for calls to createBackupPlan. */ + public OperationCallSettings.Builder + createBackupPlanOperationSettings() { + return getStubSettingsBuilder().createBackupPlanOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackupPlan. */ + public UnaryCallSettings.Builder + updateBackupPlanSettings() { + return getStubSettingsBuilder().updateBackupPlanSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackupPlan. */ + public OperationCallSettings.Builder + updateBackupPlanOperationSettings() { + return getStubSettingsBuilder().updateBackupPlanOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getBackupPlan. */ + public UnaryCallSettings.Builder getBackupPlanSettings() { + return getStubSettingsBuilder().getBackupPlanSettings(); + } + + /** Returns the builder for the settings used for calls to listBackupPlans. */ + public PagedCallSettings.Builder< + ListBackupPlansRequest, ListBackupPlansResponse, ListBackupPlansPagedResponse> + listBackupPlansSettings() { + return getStubSettingsBuilder().listBackupPlansSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackupPlan. */ + public UnaryCallSettings.Builder + deleteBackupPlanSettings() { + return getStubSettingsBuilder().deleteBackupPlanSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackupPlan. */ + public OperationCallSettings.Builder + deleteBackupPlanOperationSettings() { + return getStubSettingsBuilder().deleteBackupPlanOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getBackupPlanRevision. */ + public UnaryCallSettings.Builder + getBackupPlanRevisionSettings() { + return getStubSettingsBuilder().getBackupPlanRevisionSettings(); + } + + /** Returns the builder for the settings used for calls to listBackupPlanRevisions. */ + public PagedCallSettings.Builder< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + ListBackupPlanRevisionsPagedResponse> + listBackupPlanRevisionsSettings() { + return getStubSettingsBuilder().listBackupPlanRevisionsSettings(); + } + + /** Returns the builder for the settings used for calls to createBackupPlanAssociation. */ + public UnaryCallSettings.Builder + createBackupPlanAssociationSettings() { + return getStubSettingsBuilder().createBackupPlanAssociationSettings(); + } + + /** Returns the builder for the settings used for calls to createBackupPlanAssociation. */ + public OperationCallSettings.Builder< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationSettings() { + return getStubSettingsBuilder().createBackupPlanAssociationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackupPlanAssociation. */ + public UnaryCallSettings.Builder + updateBackupPlanAssociationSettings() { + return getStubSettingsBuilder().updateBackupPlanAssociationSettings(); + } + + /** Returns the builder for the settings used for calls to updateBackupPlanAssociation. */ + public OperationCallSettings.Builder< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationSettings() { + return getStubSettingsBuilder().updateBackupPlanAssociationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getBackupPlanAssociation. */ + public UnaryCallSettings.Builder + getBackupPlanAssociationSettings() { + return getStubSettingsBuilder().getBackupPlanAssociationSettings(); + } + + /** Returns the builder for the settings used for calls to listBackupPlanAssociations. */ + public PagedCallSettings.Builder< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsSettings() { + return getStubSettingsBuilder().listBackupPlanAssociationsSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * fetchBackupPlanAssociationsForResourceType. + */ + public PagedCallSettings.Builder< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypeSettings() { + return getStubSettingsBuilder().fetchBackupPlanAssociationsForResourceTypeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackupPlanAssociation. */ + public UnaryCallSettings.Builder + deleteBackupPlanAssociationSettings() { + return getStubSettingsBuilder().deleteBackupPlanAssociationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteBackupPlanAssociation. */ + public OperationCallSettings.Builder< + DeleteBackupPlanAssociationRequest, Empty, OperationMetadata> + deleteBackupPlanAssociationOperationSettings() { + return getStubSettingsBuilder().deleteBackupPlanAssociationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to triggerBackup. */ + public UnaryCallSettings.Builder triggerBackupSettings() { + return getStubSettingsBuilder().triggerBackupSettings(); + } + + /** Returns the builder for the settings used for calls to triggerBackup. */ + public OperationCallSettings.Builder< + TriggerBackupRequest, BackupPlanAssociation, OperationMetadata> + triggerBackupOperationSettings() { + return getStubSettingsBuilder().triggerBackupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getDataSourceReference. */ + public UnaryCallSettings.Builder + getDataSourceReferenceSettings() { + return getStubSettingsBuilder().getDataSourceReferenceSettings(); + } + + /** Returns the builder for the settings used for calls to listDataSourceReferences. */ + public PagedCallSettings.Builder< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + ListDataSourceReferencesPagedResponse> + listDataSourceReferencesSettings() { + return getStubSettingsBuilder().listDataSourceReferencesSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * fetchDataSourceReferencesForResourceType. + */ + public PagedCallSettings.Builder< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypeSettings() { + return getStubSettingsBuilder().fetchDataSourceReferencesForResourceTypeSettings(); + } + + /** Returns the builder for the settings used for calls to initializeService. */ + public UnaryCallSettings.Builder + initializeServiceSettings() { + return getStubSettingsBuilder().initializeServiceSettings(); + } + + /** Returns the builder for the settings used for calls to initializeService. */ + public OperationCallSettings.Builder< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationSettings() { + return getStubSettingsBuilder().initializeServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createAutoProtectionPolicy. */ + public UnaryCallSettings.Builder + createAutoProtectionPolicySettings() { + return getStubSettingsBuilder().createAutoProtectionPolicySettings(); + } + + /** Returns the builder for the settings used for calls to createAutoProtectionPolicy. */ + public OperationCallSettings.Builder< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationSettings() { + return getStubSettingsBuilder().createAutoProtectionPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listAutoProtectionPolicies. */ + public PagedCallSettings.Builder< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesSettings() { + return getStubSettingsBuilder().listAutoProtectionPoliciesSettings(); + } + + /** Returns the builder for the settings used for calls to getAutoProtectionPolicy. */ + public UnaryCallSettings.Builder + getAutoProtectionPolicySettings() { + return getStubSettingsBuilder().getAutoProtectionPolicySettings(); + } + + /** Returns the builder for the settings used for calls to updateAutoProtectionPolicy. */ + public UnaryCallSettings.Builder + updateAutoProtectionPolicySettings() { + return getStubSettingsBuilder().updateAutoProtectionPolicySettings(); + } + + /** Returns the builder for the settings used for calls to updateAutoProtectionPolicy. */ + public OperationCallSettings.Builder< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationSettings() { + return getStubSettingsBuilder().updateAutoProtectionPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAutoProtectionPolicy. */ + public UnaryCallSettings.Builder + deleteAutoProtectionPolicySettings() { + return getStubSettingsBuilder().deleteAutoProtectionPolicySettings(); + } + + /** Returns the builder for the settings used for calls to deleteAutoProtectionPolicy. */ + public OperationCallSettings.Builder< + DeleteAutoProtectionPolicyRequest, Empty, OperationMetadata> + deleteAutoProtectionPolicyOperationSettings() { + return getStubSettingsBuilder().deleteAutoProtectionPolicyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createAutoProtectionPolicyBinding. */ + public UnaryCallSettings.Builder + createAutoProtectionPolicyBindingSettings() { + return getStubSettingsBuilder().createAutoProtectionPolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to createAutoProtectionPolicyBinding. */ + public OperationCallSettings.Builder< + CreateAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + createAutoProtectionPolicyBindingOperationSettings() { + return getStubSettingsBuilder().createAutoProtectionPolicyBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAutoProtectionPolicyBinding. */ + public UnaryCallSettings.Builder< + GetAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding> + getAutoProtectionPolicyBindingSettings() { + return getStubSettingsBuilder().getAutoProtectionPolicyBindingSettings(); + } + + /** Returns the builder for the settings used for calls to listAutoProtectionPolicyBindings. */ + public PagedCallSettings.Builder< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsSettings() { + return getStubSettingsBuilder().listAutoProtectionPolicyBindingsSettings(); + } + + /** Returns the builder for the settings used for calls to listAppliedAutoProtectionPolicies. */ + public PagedCallSettings.Builder< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesSettings() { + return getStubSettingsBuilder().listAppliedAutoProtectionPoliciesSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * initiateDeleteAutoProtectionPolicyBinding. + */ + public UnaryCallSettings.Builder + initiateDeleteAutoProtectionPolicyBindingSettings() { + return getStubSettingsBuilder().initiateDeleteAutoProtectionPolicyBindingSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * initiateDeleteAutoProtectionPolicyBinding. + */ + public OperationCallSettings.Builder< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationSettings() { + return getStubSettingsBuilder().initiateDeleteAutoProtectionPolicyBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getBindingMatchingResource. */ + public UnaryCallSettings.Builder + getBindingMatchingResourceSettings() { + return getStubSettingsBuilder().getBindingMatchingResourceSettings(); + } + + /** Returns the builder for the settings used for calls to listBindingMatchingResources. */ + public PagedCallSettings.Builder< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesSettings() { + return getStubSettingsBuilder().listBindingMatchingResourcesSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public BackupDRSettings build() throws IOException { + return new BackupDRSettings(this); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClient.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClient.java new file mode 100644 index 000000000000..029e46b71d5b --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClient.java @@ -0,0 +1,1096 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.stub.BackupDrProtectionSummaryStub; +import com.google.cloud.backupdr.v1beta.stub.BackupDrProtectionSummaryStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The Protection Summary service. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+ *     BackupDrProtectionSummaryClient.create()) {
+ *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ *   Location response = backupDrProtectionSummaryClient.getLocation(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the BackupDrProtectionSummaryClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

ListResourceBackupConfigs

Lists ResourceBackupConfigs.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listResourceBackupConfigs(ListResourceBackupConfigsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listResourceBackupConfigs(LocationName parent) + *

  • listResourceBackupConfigs(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listResourceBackupConfigsPagedCallable() + *

  • listResourceBackupConfigsCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service. + *

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + *

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * BackupDrProtectionSummarySettings to create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * BackupDrProtectionSummarySettings backupDrProtectionSummarySettings =
+ *     BackupDrProtectionSummarySettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+ *     BackupDrProtectionSummaryClient.create(backupDrProtectionSummarySettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * BackupDrProtectionSummarySettings backupDrProtectionSummarySettings =
+ *     BackupDrProtectionSummarySettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+ *     BackupDrProtectionSummaryClient.create(backupDrProtectionSummarySettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * BackupDrProtectionSummarySettings backupDrProtectionSummarySettings =
+ *     BackupDrProtectionSummarySettings.newHttpJsonBuilder().build();
+ * BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+ *     BackupDrProtectionSummaryClient.create(backupDrProtectionSummarySettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class BackupDrProtectionSummaryClient implements BackgroundResource { + private final @Nullable BackupDrProtectionSummarySettings settings; + private final BackupDrProtectionSummaryStub stub; + + /** Constructs an instance of BackupDrProtectionSummaryClient with default settings. */ + public static final BackupDrProtectionSummaryClient create() throws IOException { + return create(BackupDrProtectionSummarySettings.newBuilder().build()); + } + + /** + * Constructs an instance of BackupDrProtectionSummaryClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final BackupDrProtectionSummaryClient create( + BackupDrProtectionSummarySettings settings) throws IOException { + return new BackupDrProtectionSummaryClient(settings); + } + + /** + * Constructs an instance of BackupDrProtectionSummaryClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(BackupDrProtectionSummarySettings). + */ + public static final BackupDrProtectionSummaryClient create(BackupDrProtectionSummaryStub stub) { + return new BackupDrProtectionSummaryClient(stub); + } + + /** + * Constructs an instance of BackupDrProtectionSummaryClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected BackupDrProtectionSummaryClient(BackupDrProtectionSummarySettings settings) + throws IOException { + this.settings = settings; + this.stub = ((BackupDrProtectionSummaryStubSettings) settings.getStubSettings()).createStub(); + } + + protected BackupDrProtectionSummaryClient(BackupDrProtectionSummaryStub stub) { + this.settings = null; + this.stub = stub; + } + + public final @Nullable BackupDrProtectionSummarySettings getSettings() { + return settings; + } + + public BackupDrProtectionSummaryStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ResourceBackupConfigs. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (ResourceBackupConfig element :
+   *       backupDrProtectionSummaryClient.listResourceBackupConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve resource backup configs. + * Format: 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, + * locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListResourceBackupConfigsPagedResponse listResourceBackupConfigs( + @Nullable LocationName parent) { + ListResourceBackupConfigsRequest request = + ListResourceBackupConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listResourceBackupConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ResourceBackupConfigs. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (ResourceBackupConfig element :
+   *       backupDrProtectionSummaryClient.listResourceBackupConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location for which to retrieve resource backup configs. + * Format: 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, + * locations map to Google Cloud regions, for example + *
    + *
  • *us-central1**. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListResourceBackupConfigsPagedResponse listResourceBackupConfigs(String parent) { + ListResourceBackupConfigsRequest request = + ListResourceBackupConfigsRequest.newBuilder().setParent(parent).build(); + return listResourceBackupConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ResourceBackupConfigs. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   ListResourceBackupConfigsRequest request =
+   *       ListResourceBackupConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (ResourceBackupConfig element :
+   *       backupDrProtectionSummaryClient.listResourceBackupConfigs(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 ListResourceBackupConfigsPagedResponse listResourceBackupConfigs( + ListResourceBackupConfigsRequest request) { + return listResourceBackupConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ResourceBackupConfigs. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   ListResourceBackupConfigsRequest request =
+   *       ListResourceBackupConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDrProtectionSummaryClient
+   *           .listResourceBackupConfigsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (ResourceBackupConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListResourceBackupConfigsRequest, ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsPagedCallable() { + return stub.listResourceBackupConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ResourceBackupConfigs. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   ListResourceBackupConfigsRequest request =
+   *       ListResourceBackupConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListResourceBackupConfigsResponse response =
+   *         backupDrProtectionSummaryClient.listResourceBackupConfigsCallable().call(request);
+   *     for (ResourceBackupConfig element : response.getResourceBackupConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listResourceBackupConfigsCallable() { + return stub.listResourceBackupConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : backupDrProtectionSummaryClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       backupDrProtectionSummaryClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *

For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         backupDrProtectionSummaryClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = backupDrProtectionSummaryClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       backupDrProtectionSummaryClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = backupDrProtectionSummaryClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDrProtectionSummaryClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = backupDrProtectionSummaryClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDrProtectionSummaryClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       backupDrProtectionSummaryClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+   *     BackupDrProtectionSummaryClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       backupDrProtectionSummaryClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListResourceBackupConfigsPagedResponse + extends AbstractPagedListResponse< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig, + ListResourceBackupConfigsPage, + ListResourceBackupConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListResourceBackupConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListResourceBackupConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListResourceBackupConfigsPagedResponse(ListResourceBackupConfigsPage page) { + super(page, ListResourceBackupConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListResourceBackupConfigsPage + extends AbstractPage< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig, + ListResourceBackupConfigsPage> { + + private ListResourceBackupConfigsPage( + @Nullable + PageContext< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig> + context, + @Nullable ListResourceBackupConfigsResponse response) { + super(context, response); + } + + private static ListResourceBackupConfigsPage createEmptyPage() { + return new ListResourceBackupConfigsPage(null, null); + } + + @Override + protected ListResourceBackupConfigsPage createPage( + @Nullable + PageContext< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig> + context, + @Nullable ListResourceBackupConfigsResponse response) { + return new ListResourceBackupConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListResourceBackupConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig, + ListResourceBackupConfigsPage, + ListResourceBackupConfigsFixedSizeCollection> { + + private ListResourceBackupConfigsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListResourceBackupConfigsFixedSizeCollection createEmptyCollection() { + return new ListResourceBackupConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListResourceBackupConfigsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListResourceBackupConfigsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + @Nullable PageContext context, + @Nullable ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + @Nullable PageContext context, + @Nullable ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummarySettings.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummarySettings.java new file mode 100644 index 000000000000..c809f6007803 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummarySettings.java @@ -0,0 +1,299 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListResourceBackupConfigsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.backupdr.v1beta.stub.BackupDrProtectionSummaryStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link BackupDrProtectionSummaryClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (backupdr.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getLocation: + * + *

{@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
+ * BackupDrProtectionSummarySettings.Builder backupDrProtectionSummarySettingsBuilder =
+ *     BackupDrProtectionSummarySettings.newBuilder();
+ * backupDrProtectionSummarySettingsBuilder
+ *     .getLocationSettings()
+ *     .setRetrySettings(
+ *         backupDrProtectionSummarySettingsBuilder
+ *             .getLocationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * BackupDrProtectionSummarySettings backupDrProtectionSummarySettings =
+ *     backupDrProtectionSummarySettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class BackupDrProtectionSummarySettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to listResourceBackupConfigs. */ + public PagedCallSettings< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsSettings() { + return ((BackupDrProtectionSummaryStubSettings) getStubSettings()) + .listResourceBackupConfigsSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((BackupDrProtectionSummaryStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((BackupDrProtectionSummaryStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((BackupDrProtectionSummaryStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((BackupDrProtectionSummaryStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((BackupDrProtectionSummaryStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final BackupDrProtectionSummarySettings create( + BackupDrProtectionSummaryStubSettings stub) throws IOException { + return new BackupDrProtectionSummarySettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return BackupDrProtectionSummaryStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return BackupDrProtectionSummaryStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return BackupDrProtectionSummaryStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return BackupDrProtectionSummaryStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return BackupDrProtectionSummaryStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return BackupDrProtectionSummaryStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return BackupDrProtectionSummaryStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BackupDrProtectionSummaryStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BackupDrProtectionSummarySettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for BackupDrProtectionSummarySettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(BackupDrProtectionSummaryStubSettings.newBuilder(clientContext)); + } + + protected Builder(BackupDrProtectionSummarySettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(BackupDrProtectionSummaryStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(BackupDrProtectionSummaryStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(BackupDrProtectionSummaryStubSettings.newHttpJsonBuilder()); + } + + public BackupDrProtectionSummaryStubSettings.Builder getStubSettingsBuilder() { + return ((BackupDrProtectionSummaryStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listResourceBackupConfigs. */ + public PagedCallSettings.Builder< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsSettings() { + return getStubSettingsBuilder().listResourceBackupConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public BackupDrProtectionSummarySettings build() throws IOException { + return new BackupDrProtectionSummarySettings(this); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/gapic_metadata.json b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..da4fa99d5297 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/gapic_metadata.json @@ -0,0 +1,207 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.backupdr.v1beta", + "libraryPackage": "com.google.cloud.backupdr.v1beta", + "services": { + "BackupDR": { + "clients": { + "grpc": { + "libraryClient": "BackupDRClient", + "rpcs": { + "CreateAutoProtectionPolicy": { + "methods": ["createAutoProtectionPolicyAsync", "createAutoProtectionPolicyAsync", "createAutoProtectionPolicyAsync", "createAutoProtectionPolicyOperationCallable", "createAutoProtectionPolicyCallable"] + }, + "CreateAutoProtectionPolicyBinding": { + "methods": ["createAutoProtectionPolicyBindingAsync", "createAutoProtectionPolicyBindingAsync", "createAutoProtectionPolicyBindingAsync", "createAutoProtectionPolicyBindingOperationCallable", "createAutoProtectionPolicyBindingCallable"] + }, + "CreateBackupPlan": { + "methods": ["createBackupPlanAsync", "createBackupPlanAsync", "createBackupPlanAsync", "createBackupPlanOperationCallable", "createBackupPlanCallable"] + }, + "CreateBackupPlanAssociation": { + "methods": ["createBackupPlanAssociationAsync", "createBackupPlanAssociationAsync", "createBackupPlanAssociationAsync", "createBackupPlanAssociationOperationCallable", "createBackupPlanAssociationCallable"] + }, + "CreateBackupVault": { + "methods": ["createBackupVaultAsync", "createBackupVaultAsync", "createBackupVaultAsync", "createBackupVaultOperationCallable", "createBackupVaultCallable"] + }, + "CreateManagementServer": { + "methods": ["createManagementServerAsync", "createManagementServerAsync", "createManagementServerAsync", "createManagementServerOperationCallable", "createManagementServerCallable"] + }, + "DeleteAutoProtectionPolicy": { + "methods": ["deleteAutoProtectionPolicyAsync", "deleteAutoProtectionPolicyAsync", "deleteAutoProtectionPolicyAsync", "deleteAutoProtectionPolicyOperationCallable", "deleteAutoProtectionPolicyCallable"] + }, + "DeleteBackup": { + "methods": ["deleteBackupAsync", "deleteBackupAsync", "deleteBackupAsync", "deleteBackupOperationCallable", "deleteBackupCallable"] + }, + "DeleteBackupPlan": { + "methods": ["deleteBackupPlanAsync", "deleteBackupPlanAsync", "deleteBackupPlanAsync", "deleteBackupPlanOperationCallable", "deleteBackupPlanCallable"] + }, + "DeleteBackupPlanAssociation": { + "methods": ["deleteBackupPlanAssociationAsync", "deleteBackupPlanAssociationAsync", "deleteBackupPlanAssociationAsync", "deleteBackupPlanAssociationOperationCallable", "deleteBackupPlanAssociationCallable"] + }, + "DeleteBackupVault": { + "methods": ["deleteBackupVaultAsync", "deleteBackupVaultAsync", "deleteBackupVaultAsync", "deleteBackupVaultOperationCallable", "deleteBackupVaultCallable"] + }, + "DeleteManagementServer": { + "methods": ["deleteManagementServerAsync", "deleteManagementServerAsync", "deleteManagementServerAsync", "deleteManagementServerOperationCallable", "deleteManagementServerCallable"] + }, + "FetchBackupPlanAssociationsForResourceType": { + "methods": ["fetchBackupPlanAssociationsForResourceType", "fetchBackupPlanAssociationsForResourceType", "fetchBackupPlanAssociationsForResourceType", "fetchBackupPlanAssociationsForResourceTypePagedCallable", "fetchBackupPlanAssociationsForResourceTypeCallable"] + }, + "FetchBackupsForResourceType": { + "methods": ["fetchBackupsForResourceType", "fetchBackupsForResourceType", "fetchBackupsForResourceType", "fetchBackupsForResourceTypePagedCallable", "fetchBackupsForResourceTypeCallable"] + }, + "FetchDataSourceReferencesForResourceType": { + "methods": ["fetchDataSourceReferencesForResourceType", "fetchDataSourceReferencesForResourceType", "fetchDataSourceReferencesForResourceType", "fetchDataSourceReferencesForResourceTypePagedCallable", "fetchDataSourceReferencesForResourceTypeCallable"] + }, + "FetchUsableBackupVaults": { + "methods": ["fetchUsableBackupVaults", "fetchUsableBackupVaults", "fetchUsableBackupVaults", "fetchUsableBackupVaultsPagedCallable", "fetchUsableBackupVaultsCallable"] + }, + "GetAutoProtectionPolicy": { + "methods": ["getAutoProtectionPolicy", "getAutoProtectionPolicy", "getAutoProtectionPolicy", "getAutoProtectionPolicyCallable"] + }, + "GetAutoProtectionPolicyBinding": { + "methods": ["getAutoProtectionPolicyBinding", "getAutoProtectionPolicyBinding", "getAutoProtectionPolicyBinding", "getAutoProtectionPolicyBindingCallable"] + }, + "GetBackup": { + "methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"] + }, + "GetBackupPlan": { + "methods": ["getBackupPlan", "getBackupPlan", "getBackupPlan", "getBackupPlanCallable"] + }, + "GetBackupPlanAssociation": { + "methods": ["getBackupPlanAssociation", "getBackupPlanAssociation", "getBackupPlanAssociation", "getBackupPlanAssociationCallable"] + }, + "GetBackupPlanRevision": { + "methods": ["getBackupPlanRevision", "getBackupPlanRevision", "getBackupPlanRevision", "getBackupPlanRevisionCallable"] + }, + "GetBackupVault": { + "methods": ["getBackupVault", "getBackupVault", "getBackupVault", "getBackupVaultCallable"] + }, + "GetBindingMatchingResource": { + "methods": ["getBindingMatchingResource", "getBindingMatchingResource", "getBindingMatchingResource", "getBindingMatchingResourceCallable"] + }, + "GetDataSource": { + "methods": ["getDataSource", "getDataSource", "getDataSource", "getDataSourceCallable"] + }, + "GetDataSourceReference": { + "methods": ["getDataSourceReference", "getDataSourceReference", "getDataSourceReference", "getDataSourceReferenceCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetManagementServer": { + "methods": ["getManagementServer", "getManagementServer", "getManagementServer", "getManagementServerCallable"] + }, + "InitializeService": { + "methods": ["initializeServiceAsync", "initializeServiceOperationCallable", "initializeServiceCallable"] + }, + "InitiateDeleteAutoProtectionPolicyBinding": { + "methods": ["initiateDeleteAutoProtectionPolicyBindingAsync", "initiateDeleteAutoProtectionPolicyBindingAsync", "initiateDeleteAutoProtectionPolicyBindingAsync", "initiateDeleteAutoProtectionPolicyBindingOperationCallable", "initiateDeleteAutoProtectionPolicyBindingCallable"] + }, + "ListAppliedAutoProtectionPolicies": { + "methods": ["listAppliedAutoProtectionPolicies", "listAppliedAutoProtectionPolicies", "listAppliedAutoProtectionPolicies", "listAppliedAutoProtectionPoliciesPagedCallable", "listAppliedAutoProtectionPoliciesCallable"] + }, + "ListAutoProtectionPolicies": { + "methods": ["listAutoProtectionPolicies", "listAutoProtectionPolicies", "listAutoProtectionPolicies", "listAutoProtectionPoliciesPagedCallable", "listAutoProtectionPoliciesCallable"] + }, + "ListAutoProtectionPolicyBindings": { + "methods": ["listAutoProtectionPolicyBindings", "listAutoProtectionPolicyBindings", "listAutoProtectionPolicyBindings", "listAutoProtectionPolicyBindingsPagedCallable", "listAutoProtectionPolicyBindingsCallable"] + }, + "ListBackupPlanAssociations": { + "methods": ["listBackupPlanAssociations", "listBackupPlanAssociations", "listBackupPlanAssociations", "listBackupPlanAssociationsPagedCallable", "listBackupPlanAssociationsCallable"] + }, + "ListBackupPlanRevisions": { + "methods": ["listBackupPlanRevisions", "listBackupPlanRevisions", "listBackupPlanRevisions", "listBackupPlanRevisionsPagedCallable", "listBackupPlanRevisionsCallable"] + }, + "ListBackupPlans": { + "methods": ["listBackupPlans", "listBackupPlans", "listBackupPlans", "listBackupPlansPagedCallable", "listBackupPlansCallable"] + }, + "ListBackupVaults": { + "methods": ["listBackupVaults", "listBackupVaults", "listBackupVaults", "listBackupVaultsPagedCallable", "listBackupVaultsCallable"] + }, + "ListBackups": { + "methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"] + }, + "ListBindingMatchingResources": { + "methods": ["listBindingMatchingResources", "listBindingMatchingResources", "listBindingMatchingResources", "listBindingMatchingResourcesPagedCallable", "listBindingMatchingResourcesCallable"] + }, + "ListDataSourceReferences": { + "methods": ["listDataSourceReferences", "listDataSourceReferences", "listDataSourceReferences", "listDataSourceReferencesPagedCallable", "listDataSourceReferencesCallable"] + }, + "ListDataSources": { + "methods": ["listDataSources", "listDataSources", "listDataSources", "listDataSourcesPagedCallable", "listDataSourcesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListManagementServers": { + "methods": ["listManagementServers", "listManagementServers", "listManagementServers", "listManagementServersPagedCallable", "listManagementServersCallable"] + }, + "RestoreBackup": { + "methods": ["restoreBackupAsync", "restoreBackupAsync", "restoreBackupAsync", "restoreBackupOperationCallable", "restoreBackupCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "TriggerBackup": { + "methods": ["triggerBackupAsync", "triggerBackupAsync", "triggerBackupAsync", "triggerBackupOperationCallable", "triggerBackupCallable"] + }, + "UpdateAutoProtectionPolicy": { + "methods": ["updateAutoProtectionPolicyAsync", "updateAutoProtectionPolicyAsync", "updateAutoProtectionPolicyOperationCallable", "updateAutoProtectionPolicyCallable"] + }, + "UpdateBackup": { + "methods": ["updateBackupAsync", "updateBackupAsync", "updateBackupOperationCallable", "updateBackupCallable"] + }, + "UpdateBackupPlan": { + "methods": ["updateBackupPlanAsync", "updateBackupPlanAsync", "updateBackupPlanOperationCallable", "updateBackupPlanCallable"] + }, + "UpdateBackupPlanAssociation": { + "methods": ["updateBackupPlanAssociationAsync", "updateBackupPlanAssociationAsync", "updateBackupPlanAssociationOperationCallable", "updateBackupPlanAssociationCallable"] + }, + "UpdateBackupVault": { + "methods": ["updateBackupVaultAsync", "updateBackupVaultAsync", "updateBackupVaultOperationCallable", "updateBackupVaultCallable"] + }, + "UpdateDataSource": { + "methods": ["updateDataSourceAsync", "updateDataSourceAsync", "updateDataSourceOperationCallable", "updateDataSourceCallable"] + } + } + } + } + }, + "BackupDrProtectionSummary": { + "clients": { + "grpc": { + "libraryClient": "BackupDrProtectionSummaryClient", + "rpcs": { + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListResourceBackupConfigs": { + "methods": ["listResourceBackupConfigs", "listResourceBackupConfigs", "listResourceBackupConfigs", "listResourceBackupConfigsPagedCallable", "listResourceBackupConfigsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/package-info.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/package-info.java new file mode 100644 index 000000000000..6e8fcaccc006 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/package-info.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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. + */ + +/** + * A client to Backup and DR Service API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= BackupDRClient ======================= + * + *

Service Description: The BackupDR Service + * + *

Sample for BackupDRClient: + * + *

{@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 (BackupDRClient backupDRClient = BackupDRClient.create()) {
+ *   ManagementServerName name =
+ *       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
+ *   ManagementServer response = backupDRClient.getManagementServer(name);
+ * }
+ * }
+ * + *

======================= BackupDrProtectionSummaryClient ======================= + * + *

Service Description: The Protection Summary service. + * + *

Sample for BackupDrProtectionSummaryClient: + * + *

{@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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient =
+ *     BackupDrProtectionSummaryClient.create()) {
+ *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ *   Location response = backupDrProtectionSummaryClient.getLocation(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.backupdr.v1beta; + +import javax.annotation.Generated; diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDRStub.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDRStub.java new file mode 100644 index 000000000000..7d773828bfa6 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDRStub.java @@ -0,0 +1,661 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupPlanAssociationsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchDataSourceReferencesForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchUsableBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAppliedAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPolicyBindingsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanAssociationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanRevisionsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlansPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBindingMatchingResourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourceReferencesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListManagementServersPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.CreateManagementServerRequest; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest; +import com.google.cloud.backupdr.v1beta.GetBackupRequest; +import com.google.cloud.backupdr.v1beta.GetBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest; +import com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest; +import com.google.cloud.backupdr.v1beta.GetDataSourceRequest; +import com.google.cloud.backupdr.v1beta.GetManagementServerRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceResponse; +import com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlansRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlansResponse; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupsResponse; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse; +import com.google.cloud.backupdr.v1beta.ListDataSourcesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourcesResponse; +import com.google.cloud.backupdr.v1beta.ListManagementServersRequest; +import com.google.cloud.backupdr.v1beta.ListManagementServersResponse; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.RestoreBackupRequest; +import com.google.cloud.backupdr.v1beta.RestoreBackupResponse; +import com.google.cloud.backupdr.v1beta.TriggerBackupRequest; +import com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the BackupDR service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public abstract class BackupDRStub implements BackgroundResource { + + public @Nullable OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.@Nullable OperationsStub + getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listManagementServersPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listManagementServersPagedCallable()"); + } + + public UnaryCallable + listManagementServersCallable() { + throw new UnsupportedOperationException("Not implemented: listManagementServersCallable()"); + } + + public UnaryCallable getManagementServerCallable() { + throw new UnsupportedOperationException("Not implemented: getManagementServerCallable()"); + } + + public OperationCallable + createManagementServerOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createManagementServerOperationCallable()"); + } + + public UnaryCallable createManagementServerCallable() { + throw new UnsupportedOperationException("Not implemented: createManagementServerCallable()"); + } + + public OperationCallable + deleteManagementServerOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteManagementServerOperationCallable()"); + } + + public UnaryCallable deleteManagementServerCallable() { + throw new UnsupportedOperationException("Not implemented: deleteManagementServerCallable()"); + } + + public OperationCallable + createBackupVaultOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createBackupVaultOperationCallable()"); + } + + public UnaryCallable createBackupVaultCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupVaultCallable()"); + } + + public UnaryCallable + listBackupVaultsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupVaultsPagedCallable()"); + } + + public UnaryCallable + listBackupVaultsCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupVaultsCallable()"); + } + + public UnaryCallable + fetchUsableBackupVaultsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchUsableBackupVaultsPagedCallable()"); + } + + public UnaryCallable + fetchUsableBackupVaultsCallable() { + throw new UnsupportedOperationException("Not implemented: fetchUsableBackupVaultsCallable()"); + } + + public UnaryCallable getBackupVaultCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupVaultCallable()"); + } + + 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 UnaryCallable + listDataSourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataSourcesPagedCallable()"); + } + + public UnaryCallable listDataSourcesCallable() { + throw new UnsupportedOperationException("Not implemented: listDataSourcesCallable()"); + } + + public UnaryCallable getDataSourceCallable() { + throw new UnsupportedOperationException("Not implemented: getDataSourceCallable()"); + } + + public OperationCallable + updateDataSourceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataSourceOperationCallable()"); + } + + public UnaryCallable updateDataSourceCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataSourceCallable()"); + } + + public UnaryCallable listBackupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsPagedCallable()"); + } + + public UnaryCallable listBackupsCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupsCallable()"); + } + + public UnaryCallable + fetchBackupsForResourceTypePagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchBackupsForResourceTypePagedCallable()"); + } + + public UnaryCallable + fetchBackupsForResourceTypeCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchBackupsForResourceTypeCallable()"); + } + + public UnaryCallable getBackupCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupCallable()"); + } + + public OperationCallable + updateBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateBackupOperationCallable()"); + } + + public UnaryCallable updateBackupCallable() { + throw new UnsupportedOperationException("Not implemented: updateBackupCallable()"); + } + + public OperationCallable + deleteBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupOperationCallable()"); + } + + public UnaryCallable deleteBackupCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupCallable()"); + } + + public OperationCallable + restoreBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: restoreBackupOperationCallable()"); + } + + public UnaryCallable restoreBackupCallable() { + throw new UnsupportedOperationException("Not implemented: restoreBackupCallable()"); + } + + public OperationCallable + createBackupPlanOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupPlanOperationCallable()"); + } + + public UnaryCallable createBackupPlanCallable() { + throw new UnsupportedOperationException("Not implemented: createBackupPlanCallable()"); + } + + public OperationCallable + updateBackupPlanOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateBackupPlanOperationCallable()"); + } + + public UnaryCallable updateBackupPlanCallable() { + throw new UnsupportedOperationException("Not implemented: updateBackupPlanCallable()"); + } + + public UnaryCallable getBackupPlanCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupPlanCallable()"); + } + + public UnaryCallable + listBackupPlansPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupPlansPagedCallable()"); + } + + public UnaryCallable listBackupPlansCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupPlansCallable()"); + } + + public OperationCallable + deleteBackupPlanOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupPlanOperationCallable()"); + } + + public UnaryCallable deleteBackupPlanCallable() { + throw new UnsupportedOperationException("Not implemented: deleteBackupPlanCallable()"); + } + + public UnaryCallable + getBackupPlanRevisionCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupPlanRevisionCallable()"); + } + + public UnaryCallable + listBackupPlanRevisionsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listBackupPlanRevisionsPagedCallable()"); + } + + public UnaryCallable + listBackupPlanRevisionsCallable() { + throw new UnsupportedOperationException("Not implemented: listBackupPlanRevisionsCallable()"); + } + + public OperationCallable< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createBackupPlanAssociationOperationCallable()"); + } + + public UnaryCallable + createBackupPlanAssociationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createBackupPlanAssociationCallable()"); + } + + public OperationCallable< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateBackupPlanAssociationOperationCallable()"); + } + + public UnaryCallable + updateBackupPlanAssociationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateBackupPlanAssociationCallable()"); + } + + public UnaryCallable + getBackupPlanAssociationCallable() { + throw new UnsupportedOperationException("Not implemented: getBackupPlanAssociationCallable()"); + } + + public UnaryCallable + listBackupPlanAssociationsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listBackupPlanAssociationsPagedCallable()"); + } + + public UnaryCallable + listBackupPlanAssociationsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listBackupPlanAssociationsCallable()"); + } + + public UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypePagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchBackupPlanAssociationsForResourceTypePagedCallable()"); + } + + public UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchBackupPlanAssociationsForResourceTypeCallable()"); + } + + public OperationCallable + deleteBackupPlanAssociationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteBackupPlanAssociationOperationCallable()"); + } + + public UnaryCallable + deleteBackupPlanAssociationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteBackupPlanAssociationCallable()"); + } + + public OperationCallable + triggerBackupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: triggerBackupOperationCallable()"); + } + + public UnaryCallable triggerBackupCallable() { + throw new UnsupportedOperationException("Not implemented: triggerBackupCallable()"); + } + + public UnaryCallable + getDataSourceReferenceCallable() { + throw new UnsupportedOperationException("Not implemented: getDataSourceReferenceCallable()"); + } + + public UnaryCallable + listDataSourceReferencesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDataSourceReferencesPagedCallable()"); + } + + public UnaryCallable + listDataSourceReferencesCallable() { + throw new UnsupportedOperationException("Not implemented: listDataSourceReferencesCallable()"); + } + + public UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypePagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchDataSourceReferencesForResourceTypePagedCallable()"); + } + + public UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeCallable() { + throw new UnsupportedOperationException( + "Not implemented: fetchDataSourceReferencesForResourceTypeCallable()"); + } + + public OperationCallable + initializeServiceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: initializeServiceOperationCallable()"); + } + + public UnaryCallable initializeServiceCallable() { + throw new UnsupportedOperationException("Not implemented: initializeServiceCallable()"); + } + + public OperationCallable< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAutoProtectionPolicyOperationCallable()"); + } + + public UnaryCallable + createAutoProtectionPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAutoProtectionPolicyCallable()"); + } + + public UnaryCallable + listAutoProtectionPoliciesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAutoProtectionPoliciesPagedCallable()"); + } + + public UnaryCallable + listAutoProtectionPoliciesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAutoProtectionPoliciesCallable()"); + } + + public UnaryCallable + getAutoProtectionPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getAutoProtectionPolicyCallable()"); + } + + public OperationCallable< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAutoProtectionPolicyOperationCallable()"); + } + + public UnaryCallable + updateAutoProtectionPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAutoProtectionPolicyCallable()"); + } + + public OperationCallable + deleteAutoProtectionPolicyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAutoProtectionPolicyOperationCallable()"); + } + + public UnaryCallable + deleteAutoProtectionPolicyCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAutoProtectionPolicyCallable()"); + } + + public OperationCallable< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAutoProtectionPolicyBindingOperationCallable()"); + } + + public UnaryCallable + createAutoProtectionPolicyBindingCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAutoProtectionPolicyBindingCallable()"); + } + + public UnaryCallable + getAutoProtectionPolicyBindingCallable() { + throw new UnsupportedOperationException( + "Not implemented: getAutoProtectionPolicyBindingCallable()"); + } + + public UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAutoProtectionPolicyBindingsPagedCallable()"); + } + + public UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAutoProtectionPolicyBindingsCallable()"); + } + + public UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAppliedAutoProtectionPoliciesPagedCallable()"); + } + + public UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAppliedAutoProtectionPoliciesCallable()"); + } + + public OperationCallable< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: initiateDeleteAutoProtectionPolicyBindingOperationCallable()"); + } + + public UnaryCallable + initiateDeleteAutoProtectionPolicyBindingCallable() { + throw new UnsupportedOperationException( + "Not implemented: initiateDeleteAutoProtectionPolicyBindingCallable()"); + } + + public UnaryCallable + getBindingMatchingResourceCallable() { + throw new UnsupportedOperationException( + "Not implemented: getBindingMatchingResourceCallable()"); + } + + public UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listBindingMatchingResourcesPagedCallable()"); + } + + public UnaryCallable + listBindingMatchingResourcesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listBindingMatchingResourcesCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDRStubSettings.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDRStubSettings.java new file mode 100644 index 000000000000..2b91070687d6 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDRStubSettings.java @@ -0,0 +1,4280 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupPlanAssociationsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchDataSourceReferencesForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchUsableBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAppliedAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPolicyBindingsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanAssociationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanRevisionsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlansPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBindingMatchingResourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourceReferencesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListManagementServersPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.CreateManagementServerRequest; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest; +import com.google.cloud.backupdr.v1beta.GetBackupRequest; +import com.google.cloud.backupdr.v1beta.GetBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest; +import com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest; +import com.google.cloud.backupdr.v1beta.GetDataSourceRequest; +import com.google.cloud.backupdr.v1beta.GetManagementServerRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceResponse; +import com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlansRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlansResponse; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupsResponse; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse; +import com.google.cloud.backupdr.v1beta.ListDataSourcesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourcesResponse; +import com.google.cloud.backupdr.v1beta.ListManagementServersRequest; +import com.google.cloud.backupdr.v1beta.ListManagementServersResponse; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.RestoreBackupRequest; +import com.google.cloud.backupdr.v1beta.RestoreBackupResponse; +import com.google.cloud.backupdr.v1beta.TriggerBackupRequest; +import com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link BackupDRStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (backupdr.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getManagementServer: + * + *

{@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
+ * BackupDRStubSettings.Builder backupDRSettingsBuilder = BackupDRStubSettings.newBuilder();
+ * backupDRSettingsBuilder
+ *     .getManagementServerSettings()
+ *     .setRetrySettings(
+ *         backupDRSettingsBuilder
+ *             .getManagementServerSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * BackupDRStubSettings backupDRSettings = backupDRSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createManagementServer: + * + *

{@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
+ * BackupDRStubSettings.Builder backupDRSettingsBuilder = BackupDRStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * backupDRSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class BackupDRStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-backupdr") + .add("https://www.googleapis.com/auth/cloud-platform") + .build(); + + private final PagedCallSettings< + ListManagementServersRequest, + ListManagementServersResponse, + ListManagementServersPagedResponse> + listManagementServersSettings; + private final UnaryCallSettings + getManagementServerSettings; + private final UnaryCallSettings + createManagementServerSettings; + private final OperationCallSettings< + CreateManagementServerRequest, ManagementServer, OperationMetadata> + createManagementServerOperationSettings; + private final UnaryCallSettings + deleteManagementServerSettings; + private final OperationCallSettings + deleteManagementServerOperationSettings; + private final UnaryCallSettings createBackupVaultSettings; + private final OperationCallSettings + createBackupVaultOperationSettings; + private final PagedCallSettings< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings; + private final PagedCallSettings< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + FetchUsableBackupVaultsPagedResponse> + fetchUsableBackupVaultsSettings; + private final UnaryCallSettings getBackupVaultSettings; + private final UnaryCallSettings updateBackupVaultSettings; + private final OperationCallSettings + updateBackupVaultOperationSettings; + private final UnaryCallSettings deleteBackupVaultSettings; + private final OperationCallSettings + deleteBackupVaultOperationSettings; + private final PagedCallSettings< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings; + private final UnaryCallSettings getDataSourceSettings; + private final UnaryCallSettings updateDataSourceSettings; + private final OperationCallSettings + updateDataSourceOperationSettings; + private final PagedCallSettings + listBackupsSettings; + private final PagedCallSettings< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypeSettings; + private final UnaryCallSettings getBackupSettings; + private final UnaryCallSettings updateBackupSettings; + private final OperationCallSettings + updateBackupOperationSettings; + private final UnaryCallSettings deleteBackupSettings; + private final OperationCallSettings + deleteBackupOperationSettings; + private final UnaryCallSettings restoreBackupSettings; + private final OperationCallSettings< + RestoreBackupRequest, RestoreBackupResponse, OperationMetadata> + restoreBackupOperationSettings; + private final UnaryCallSettings createBackupPlanSettings; + private final OperationCallSettings + createBackupPlanOperationSettings; + private final UnaryCallSettings updateBackupPlanSettings; + private final OperationCallSettings + updateBackupPlanOperationSettings; + private final UnaryCallSettings getBackupPlanSettings; + private final PagedCallSettings< + ListBackupPlansRequest, ListBackupPlansResponse, ListBackupPlansPagedResponse> + listBackupPlansSettings; + private final UnaryCallSettings deleteBackupPlanSettings; + private final OperationCallSettings + deleteBackupPlanOperationSettings; + private final UnaryCallSettings + getBackupPlanRevisionSettings; + private final PagedCallSettings< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + ListBackupPlanRevisionsPagedResponse> + listBackupPlanRevisionsSettings; + private final UnaryCallSettings + createBackupPlanAssociationSettings; + private final OperationCallSettings< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationSettings; + private final UnaryCallSettings + updateBackupPlanAssociationSettings; + private final OperationCallSettings< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationSettings; + private final UnaryCallSettings + getBackupPlanAssociationSettings; + private final PagedCallSettings< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsSettings; + private final PagedCallSettings< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypeSettings; + private final UnaryCallSettings + deleteBackupPlanAssociationSettings; + private final OperationCallSettings + deleteBackupPlanAssociationOperationSettings; + private final UnaryCallSettings triggerBackupSettings; + private final OperationCallSettings< + TriggerBackupRequest, BackupPlanAssociation, OperationMetadata> + triggerBackupOperationSettings; + private final UnaryCallSettings + getDataSourceReferenceSettings; + private final PagedCallSettings< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + ListDataSourceReferencesPagedResponse> + listDataSourceReferencesSettings; + private final PagedCallSettings< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypeSettings; + private final UnaryCallSettings initializeServiceSettings; + private final OperationCallSettings< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationSettings; + private final UnaryCallSettings + createAutoProtectionPolicySettings; + private final OperationCallSettings< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationSettings; + private final PagedCallSettings< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesSettings; + private final UnaryCallSettings + getAutoProtectionPolicySettings; + private final UnaryCallSettings + updateAutoProtectionPolicySettings; + private final OperationCallSettings< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationSettings; + private final UnaryCallSettings + deleteAutoProtectionPolicySettings; + private final OperationCallSettings + deleteAutoProtectionPolicyOperationSettings; + private final UnaryCallSettings + createAutoProtectionPolicyBindingSettings; + private final OperationCallSettings< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationSettings; + private final UnaryCallSettings< + GetAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding> + getAutoProtectionPolicyBindingSettings; + private final PagedCallSettings< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsSettings; + private final PagedCallSettings< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesSettings; + private final UnaryCallSettings + initiateDeleteAutoProtectionPolicyBindingSettings; + private final OperationCallSettings< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationSettings; + private final UnaryCallSettings + getBindingMatchingResourceSettings; + private final PagedCallSettings< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListManagementServersRequest, ListManagementServersResponse, ManagementServer> + LIST_MANAGEMENT_SERVERS_PAGE_STR_DESC = + new PagedListDescriptor< + ListManagementServersRequest, ListManagementServersResponse, ManagementServer>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListManagementServersRequest injectToken( + ListManagementServersRequest payload, String token) { + return ListManagementServersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListManagementServersRequest injectPageSize( + ListManagementServersRequest payload, int pageSize) { + return ListManagementServersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListManagementServersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListManagementServersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListManagementServersResponse payload) { + return payload.getManagementServersList(); + } + }; + + 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(); + } + }; + + private static final PagedListDescriptor< + FetchUsableBackupVaultsRequest, FetchUsableBackupVaultsResponse, BackupVault> + FETCH_USABLE_BACKUP_VAULTS_PAGE_STR_DESC = + new PagedListDescriptor< + FetchUsableBackupVaultsRequest, FetchUsableBackupVaultsResponse, BackupVault>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public FetchUsableBackupVaultsRequest injectToken( + FetchUsableBackupVaultsRequest payload, String token) { + return FetchUsableBackupVaultsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public FetchUsableBackupVaultsRequest injectPageSize( + FetchUsableBackupVaultsRequest payload, int pageSize) { + return FetchUsableBackupVaultsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(FetchUsableBackupVaultsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(FetchUsableBackupVaultsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(FetchUsableBackupVaultsResponse payload) { + return payload.getBackupVaultsList(); + } + }; + + private static final PagedListDescriptor< + ListDataSourcesRequest, ListDataSourcesResponse, DataSource> + LIST_DATA_SOURCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataSourcesRequest injectToken( + ListDataSourcesRequest payload, String token) { + return ListDataSourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataSourcesRequest injectPageSize( + ListDataSourcesRequest payload, int pageSize) { + return ListDataSourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataSourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataSourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataSourcesResponse payload) { + return payload.getDataSourcesList(); + } + }; + + 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(); + } + }; + + private static final PagedListDescriptor< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse, Backup> + FETCH_BACKUPS_FOR_RESOURCE_TYPE_PAGE_STR_DESC = + new PagedListDescriptor< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse, Backup>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public FetchBackupsForResourceTypeRequest injectToken( + FetchBackupsForResourceTypeRequest payload, String token) { + return FetchBackupsForResourceTypeRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public FetchBackupsForResourceTypeRequest injectPageSize( + FetchBackupsForResourceTypeRequest payload, int pageSize) { + return FetchBackupsForResourceTypeRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(FetchBackupsForResourceTypeRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(FetchBackupsForResourceTypeResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(FetchBackupsForResourceTypeResponse payload) { + return payload.getBackupsList(); + } + }; + + private static final PagedListDescriptor< + ListBackupPlansRequest, ListBackupPlansResponse, BackupPlan> + LIST_BACKUP_PLANS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupPlansRequest injectToken( + ListBackupPlansRequest payload, String token) { + return ListBackupPlansRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBackupPlansRequest injectPageSize( + ListBackupPlansRequest payload, int pageSize) { + return ListBackupPlansRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListBackupPlansRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupPlansResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListBackupPlansResponse payload) { + return payload.getBackupPlansList(); + } + }; + + private static final PagedListDescriptor< + ListBackupPlanRevisionsRequest, ListBackupPlanRevisionsResponse, BackupPlanRevision> + LIST_BACKUP_PLAN_REVISIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + BackupPlanRevision>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupPlanRevisionsRequest injectToken( + ListBackupPlanRevisionsRequest payload, String token) { + return ListBackupPlanRevisionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListBackupPlanRevisionsRequest injectPageSize( + ListBackupPlanRevisionsRequest payload, int pageSize) { + return ListBackupPlanRevisionsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListBackupPlanRevisionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupPlanRevisionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListBackupPlanRevisionsResponse payload) { + return payload.getBackupPlanRevisionsList(); + } + }; + + private static final PagedListDescriptor< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation> + LIST_BACKUP_PLAN_ASSOCIATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBackupPlanAssociationsRequest injectToken( + ListBackupPlanAssociationsRequest payload, String token) { + return ListBackupPlanAssociationsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListBackupPlanAssociationsRequest injectPageSize( + ListBackupPlanAssociationsRequest payload, int pageSize) { + return ListBackupPlanAssociationsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListBackupPlanAssociationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBackupPlanAssociationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListBackupPlanAssociationsResponse payload) { + return payload.getBackupPlanAssociationsList(); + } + }; + + private static final PagedListDescriptor< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation> + FETCH_BACKUP_PLAN_ASSOCIATIONS_FOR_RESOURCE_TYPE_PAGE_STR_DESC = + new PagedListDescriptor< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public FetchBackupPlanAssociationsForResourceTypeRequest injectToken( + FetchBackupPlanAssociationsForResourceTypeRequest payload, String token) { + return FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public FetchBackupPlanAssociationsForResourceTypeRequest injectPageSize( + FetchBackupPlanAssociationsForResourceTypeRequest payload, int pageSize) { + return FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize( + FetchBackupPlanAssociationsForResourceTypeRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken( + FetchBackupPlanAssociationsForResourceTypeResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + FetchBackupPlanAssociationsForResourceTypeResponse payload) { + return payload.getBackupPlanAssociationsList(); + } + }; + + private static final PagedListDescriptor< + ListDataSourceReferencesRequest, ListDataSourceReferencesResponse, DataSourceReference> + LIST_DATA_SOURCE_REFERENCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataSourceReferencesRequest injectToken( + ListDataSourceReferencesRequest payload, String token) { + return ListDataSourceReferencesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListDataSourceReferencesRequest injectPageSize( + ListDataSourceReferencesRequest payload, int pageSize) { + return ListDataSourceReferencesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListDataSourceReferencesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataSourceReferencesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDataSourceReferencesResponse payload) { + return payload.getDataSourceReferencesList(); + } + }; + + private static final PagedListDescriptor< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference> + FETCH_DATA_SOURCE_REFERENCES_FOR_RESOURCE_TYPE_PAGE_STR_DESC = + new PagedListDescriptor< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public FetchDataSourceReferencesForResourceTypeRequest injectToken( + FetchDataSourceReferencesForResourceTypeRequest payload, String token) { + return FetchDataSourceReferencesForResourceTypeRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public FetchDataSourceReferencesForResourceTypeRequest injectPageSize( + FetchDataSourceReferencesForResourceTypeRequest payload, int pageSize) { + return FetchDataSourceReferencesForResourceTypeRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize( + FetchDataSourceReferencesForResourceTypeRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken( + FetchDataSourceReferencesForResourceTypeResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + FetchDataSourceReferencesForResourceTypeResponse payload) { + return payload.getDataSourceReferencesList(); + } + }; + + private static final PagedListDescriptor< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy> + LIST_AUTO_PROTECTION_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAutoProtectionPoliciesRequest injectToken( + ListAutoProtectionPoliciesRequest payload, String token) { + return ListAutoProtectionPoliciesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListAutoProtectionPoliciesRequest injectPageSize( + ListAutoProtectionPoliciesRequest payload, int pageSize) { + return ListAutoProtectionPoliciesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAutoProtectionPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAutoProtectionPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAutoProtectionPoliciesResponse payload) { + return payload.getAutoProtectionPoliciesList(); + } + }; + + private static final PagedListDescriptor< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding> + LIST_AUTO_PROTECTION_POLICY_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAutoProtectionPolicyBindingsRequest injectToken( + ListAutoProtectionPolicyBindingsRequest payload, String token) { + return ListAutoProtectionPolicyBindingsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListAutoProtectionPolicyBindingsRequest injectPageSize( + ListAutoProtectionPolicyBindingsRequest payload, int pageSize) { + return ListAutoProtectionPolicyBindingsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAutoProtectionPolicyBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAutoProtectionPolicyBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAutoProtectionPolicyBindingsResponse payload) { + return payload.getAutoProtectionPolicyBindingsList(); + } + }; + + private static final PagedListDescriptor< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy> + LIST_APPLIED_AUTO_PROTECTION_POLICIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAppliedAutoProtectionPoliciesRequest injectToken( + ListAppliedAutoProtectionPoliciesRequest payload, String token) { + return ListAppliedAutoProtectionPoliciesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListAppliedAutoProtectionPoliciesRequest injectPageSize( + ListAppliedAutoProtectionPoliciesRequest payload, int pageSize) { + return ListAppliedAutoProtectionPoliciesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAppliedAutoProtectionPoliciesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAppliedAutoProtectionPoliciesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAppliedAutoProtectionPoliciesResponse payload) { + return payload.getAppliedAutoProtectionPoliciesList(); + } + }; + + private static final PagedListDescriptor< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource> + LIST_BINDING_MATCHING_RESOURCES_PAGE_STR_DESC = + new PagedListDescriptor< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListBindingMatchingResourcesRequest injectToken( + ListBindingMatchingResourcesRequest payload, String token) { + return ListBindingMatchingResourcesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListBindingMatchingResourcesRequest injectPageSize( + ListBindingMatchingResourcesRequest payload, int pageSize) { + return ListBindingMatchingResourcesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListBindingMatchingResourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListBindingMatchingResourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListBindingMatchingResourcesResponse payload) { + return payload.getMatchingResourcesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListManagementServersRequest, + ListManagementServersResponse, + ListManagementServersPagedResponse> + LIST_MANAGEMENT_SERVERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListManagementServersRequest, + ListManagementServersResponse, + ListManagementServersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListManagementServersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListManagementServersRequest, ListManagementServersResponse, ManagementServer> + pageContext = + PageContext.create( + callable, LIST_MANAGEMENT_SERVERS_PAGE_STR_DESC, request, context); + return ListManagementServersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + 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< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + FetchUsableBackupVaultsPagedResponse> + FETCH_USABLE_BACKUP_VAULTS_PAGE_STR_FACT = + new PagedListResponseFactory< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + FetchUsableBackupVaultsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + FetchUsableBackupVaultsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + FetchUsableBackupVaultsRequest, FetchUsableBackupVaultsResponse, BackupVault> + pageContext = + PageContext.create( + callable, FETCH_USABLE_BACKUP_VAULTS_PAGE_STR_DESC, request, context); + return FetchUsableBackupVaultsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + LIST_DATA_SOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataSourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATA_SOURCES_PAGE_STR_DESC, request, context); + return ListDataSourcesPagedResponse.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< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + FetchBackupsForResourceTypePagedResponse> + FETCH_BACKUPS_FOR_RESOURCE_TYPE_PAGE_STR_FACT = + new PagedListResponseFactory< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + FetchBackupsForResourceTypePagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse> + callable, + FetchBackupsForResourceTypeRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + Backup> + pageContext = + PageContext.create( + callable, + FETCH_BACKUPS_FOR_RESOURCE_TYPE_PAGE_STR_DESC, + request, + context); + return FetchBackupsForResourceTypePagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBackupPlansRequest, ListBackupPlansResponse, ListBackupPlansPagedResponse> + LIST_BACKUP_PLANS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupPlansRequest, ListBackupPlansResponse, ListBackupPlansPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListBackupPlansRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_BACKUP_PLANS_PAGE_STR_DESC, request, context); + return ListBackupPlansPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + ListBackupPlanRevisionsPagedResponse> + LIST_BACKUP_PLAN_REVISIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + ListBackupPlanRevisionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListBackupPlanRevisionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + BackupPlanRevision> + pageContext = + PageContext.create( + callable, LIST_BACKUP_PLAN_REVISIONS_PAGE_STR_DESC, request, context); + return ListBackupPlanRevisionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + ListBackupPlanAssociationsPagedResponse> + LIST_BACKUP_PLAN_ASSOCIATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + ListBackupPlanAssociationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListBackupPlanAssociationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + BackupPlanAssociation> + pageContext = + PageContext.create( + callable, LIST_BACKUP_PLAN_ASSOCIATIONS_PAGE_STR_DESC, request, context); + return ListBackupPlanAssociationsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + FETCH_BACKUP_PLAN_ASSOCIATIONS_FOR_RESOURCE_TYPE_PAGE_STR_FACT = + new PagedListResponseFactory< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + FetchBackupPlanAssociationsForResourceTypePagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + callable, + FetchBackupPlanAssociationsForResourceTypeRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + BackupPlanAssociation> + pageContext = + PageContext.create( + callable, + FETCH_BACKUP_PLAN_ASSOCIATIONS_FOR_RESOURCE_TYPE_PAGE_STR_DESC, + request, + context); + return FetchBackupPlanAssociationsForResourceTypePagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + ListDataSourceReferencesPagedResponse> + LIST_DATA_SOURCE_REFERENCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + ListDataSourceReferencesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListDataSourceReferencesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + DataSourceReference> + pageContext = + PageContext.create( + callable, LIST_DATA_SOURCE_REFERENCES_PAGE_STR_DESC, request, context); + return ListDataSourceReferencesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + FetchDataSourceReferencesForResourceTypePagedResponse> + FETCH_DATA_SOURCE_REFERENCES_FOR_RESOURCE_TYPE_PAGE_STR_FACT = + new PagedListResponseFactory< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + FetchDataSourceReferencesForResourceTypePagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + callable, + FetchDataSourceReferencesForResourceTypeRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + DataSourceReference> + pageContext = + PageContext.create( + callable, + FETCH_DATA_SOURCE_REFERENCES_FOR_RESOURCE_TYPE_PAGE_STR_DESC, + request, + context); + return FetchDataSourceReferencesForResourceTypePagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + ListAutoProtectionPoliciesPagedResponse> + LIST_AUTO_PROTECTION_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + ListAutoProtectionPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListAutoProtectionPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + AutoProtectionPolicy> + pageContext = + PageContext.create( + callable, LIST_AUTO_PROTECTION_POLICIES_PAGE_STR_DESC, request, context); + return ListAutoProtectionPoliciesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + ListAutoProtectionPolicyBindingsPagedResponse> + LIST_AUTO_PROTECTION_POLICY_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + ListAutoProtectionPolicyBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse> + callable, + ListAutoProtectionPolicyBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + AutoProtectionPolicyBinding> + pageContext = + PageContext.create( + callable, + LIST_AUTO_PROTECTION_POLICY_BINDINGS_PAGE_STR_DESC, + request, + context); + return ListAutoProtectionPolicyBindingsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + ListAppliedAutoProtectionPoliciesPagedResponse> + LIST_APPLIED_AUTO_PROTECTION_POLICIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + ListAppliedAutoProtectionPoliciesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse> + callable, + ListAppliedAutoProtectionPoliciesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + AppliedAutoProtectionPolicy> + pageContext = + PageContext.create( + callable, + LIST_APPLIED_AUTO_PROTECTION_POLICIES_PAGE_STR_DESC, + request, + context); + return ListAppliedAutoProtectionPoliciesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + ListBindingMatchingResourcesPagedResponse> + LIST_BINDING_MATCHING_RESOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + ListBindingMatchingResourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesResponse> + callable, + ListBindingMatchingResourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + BindingMatchingResource> + pageContext = + PageContext.create( + callable, + LIST_BINDING_MATCHING_RESOURCES_PAGE_STR_DESC, + request, + context); + return ListBindingMatchingResourcesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listManagementServers. */ + public PagedCallSettings< + ListManagementServersRequest, + ListManagementServersResponse, + ListManagementServersPagedResponse> + listManagementServersSettings() { + return listManagementServersSettings; + } + + /** Returns the object with the settings used for calls to getManagementServer. */ + public UnaryCallSettings + getManagementServerSettings() { + return getManagementServerSettings; + } + + /** Returns the object with the settings used for calls to createManagementServer. */ + public UnaryCallSettings + createManagementServerSettings() { + return createManagementServerSettings; + } + + /** Returns the object with the settings used for calls to createManagementServer. */ + public OperationCallSettings + createManagementServerOperationSettings() { + return createManagementServerOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteManagementServer. */ + public UnaryCallSettings + deleteManagementServerSettings() { + return deleteManagementServerSettings; + } + + /** Returns the object with the settings used for calls to deleteManagementServer. */ + public OperationCallSettings + deleteManagementServerOperationSettings() { + return deleteManagementServerOperationSettings; + } + + /** 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 listBackupVaults. */ + public PagedCallSettings< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings() { + return listBackupVaultsSettings; + } + + /** Returns the object with the settings used for calls to fetchUsableBackupVaults. */ + public PagedCallSettings< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + FetchUsableBackupVaultsPagedResponse> + fetchUsableBackupVaultsSettings() { + return fetchUsableBackupVaultsSettings; + } + + /** 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 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 listDataSources. */ + public PagedCallSettings< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings() { + return listDataSourcesSettings; + } + + /** Returns the object with the settings used for calls to getDataSource. */ + public UnaryCallSettings getDataSourceSettings() { + return getDataSourceSettings; + } + + /** Returns the object with the settings used for calls to updateDataSource. */ + public UnaryCallSettings updateDataSourceSettings() { + return updateDataSourceSettings; + } + + /** Returns the object with the settings used for calls to updateDataSource. */ + public OperationCallSettings + updateDataSourceOperationSettings() { + return updateDataSourceOperationSettings; + } + + /** 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 fetchBackupsForResourceType. */ + public PagedCallSettings< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypeSettings() { + return fetchBackupsForResourceTypeSettings; + } + + /** 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 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 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 restoreBackup. */ + public UnaryCallSettings restoreBackupSettings() { + return restoreBackupSettings; + } + + /** Returns the object with the settings used for calls to restoreBackup. */ + public OperationCallSettings + restoreBackupOperationSettings() { + return restoreBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to createBackupPlan. */ + public UnaryCallSettings createBackupPlanSettings() { + return createBackupPlanSettings; + } + + /** Returns the object with the settings used for calls to createBackupPlan. */ + public OperationCallSettings + createBackupPlanOperationSettings() { + return createBackupPlanOperationSettings; + } + + /** Returns the object with the settings used for calls to updateBackupPlan. */ + public UnaryCallSettings updateBackupPlanSettings() { + return updateBackupPlanSettings; + } + + /** Returns the object with the settings used for calls to updateBackupPlan. */ + public OperationCallSettings + updateBackupPlanOperationSettings() { + return updateBackupPlanOperationSettings; + } + + /** Returns the object with the settings used for calls to getBackupPlan. */ + public UnaryCallSettings getBackupPlanSettings() { + return getBackupPlanSettings; + } + + /** Returns the object with the settings used for calls to listBackupPlans. */ + public PagedCallSettings< + ListBackupPlansRequest, ListBackupPlansResponse, ListBackupPlansPagedResponse> + listBackupPlansSettings() { + return listBackupPlansSettings; + } + + /** Returns the object with the settings used for calls to deleteBackupPlan. */ + public UnaryCallSettings deleteBackupPlanSettings() { + return deleteBackupPlanSettings; + } + + /** Returns the object with the settings used for calls to deleteBackupPlan. */ + public OperationCallSettings + deleteBackupPlanOperationSettings() { + return deleteBackupPlanOperationSettings; + } + + /** Returns the object with the settings used for calls to getBackupPlanRevision. */ + public UnaryCallSettings + getBackupPlanRevisionSettings() { + return getBackupPlanRevisionSettings; + } + + /** Returns the object with the settings used for calls to listBackupPlanRevisions. */ + public PagedCallSettings< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + ListBackupPlanRevisionsPagedResponse> + listBackupPlanRevisionsSettings() { + return listBackupPlanRevisionsSettings; + } + + /** Returns the object with the settings used for calls to createBackupPlanAssociation. */ + public UnaryCallSettings + createBackupPlanAssociationSettings() { + return createBackupPlanAssociationSettings; + } + + /** Returns the object with the settings used for calls to createBackupPlanAssociation. */ + public OperationCallSettings< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationSettings() { + return createBackupPlanAssociationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateBackupPlanAssociation. */ + public UnaryCallSettings + updateBackupPlanAssociationSettings() { + return updateBackupPlanAssociationSettings; + } + + /** Returns the object with the settings used for calls to updateBackupPlanAssociation. */ + public OperationCallSettings< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationSettings() { + return updateBackupPlanAssociationOperationSettings; + } + + /** Returns the object with the settings used for calls to getBackupPlanAssociation. */ + public UnaryCallSettings + getBackupPlanAssociationSettings() { + return getBackupPlanAssociationSettings; + } + + /** Returns the object with the settings used for calls to listBackupPlanAssociations. */ + public PagedCallSettings< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsSettings() { + return listBackupPlanAssociationsSettings; + } + + /** + * Returns the object with the settings used for calls to + * fetchBackupPlanAssociationsForResourceType. + */ + public PagedCallSettings< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypeSettings() { + return fetchBackupPlanAssociationsForResourceTypeSettings; + } + + /** Returns the object with the settings used for calls to deleteBackupPlanAssociation. */ + public UnaryCallSettings + deleteBackupPlanAssociationSettings() { + return deleteBackupPlanAssociationSettings; + } + + /** Returns the object with the settings used for calls to deleteBackupPlanAssociation. */ + public OperationCallSettings + deleteBackupPlanAssociationOperationSettings() { + return deleteBackupPlanAssociationOperationSettings; + } + + /** Returns the object with the settings used for calls to triggerBackup. */ + public UnaryCallSettings triggerBackupSettings() { + return triggerBackupSettings; + } + + /** Returns the object with the settings used for calls to triggerBackup. */ + public OperationCallSettings + triggerBackupOperationSettings() { + return triggerBackupOperationSettings; + } + + /** Returns the object with the settings used for calls to getDataSourceReference. */ + public UnaryCallSettings + getDataSourceReferenceSettings() { + return getDataSourceReferenceSettings; + } + + /** Returns the object with the settings used for calls to listDataSourceReferences. */ + public PagedCallSettings< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + ListDataSourceReferencesPagedResponse> + listDataSourceReferencesSettings() { + return listDataSourceReferencesSettings; + } + + /** + * Returns the object with the settings used for calls to + * fetchDataSourceReferencesForResourceType. + */ + public PagedCallSettings< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypeSettings() { + return fetchDataSourceReferencesForResourceTypeSettings; + } + + /** Returns the object with the settings used for calls to initializeService. */ + public UnaryCallSettings initializeServiceSettings() { + return initializeServiceSettings; + } + + /** Returns the object with the settings used for calls to initializeService. */ + public OperationCallSettings< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationSettings() { + return initializeServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to createAutoProtectionPolicy. */ + public UnaryCallSettings + createAutoProtectionPolicySettings() { + return createAutoProtectionPolicySettings; + } + + /** Returns the object with the settings used for calls to createAutoProtectionPolicy. */ + public OperationCallSettings< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationSettings() { + return createAutoProtectionPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to listAutoProtectionPolicies. */ + public PagedCallSettings< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesSettings() { + return listAutoProtectionPoliciesSettings; + } + + /** Returns the object with the settings used for calls to getAutoProtectionPolicy. */ + public UnaryCallSettings + getAutoProtectionPolicySettings() { + return getAutoProtectionPolicySettings; + } + + /** Returns the object with the settings used for calls to updateAutoProtectionPolicy. */ + public UnaryCallSettings + updateAutoProtectionPolicySettings() { + return updateAutoProtectionPolicySettings; + } + + /** Returns the object with the settings used for calls to updateAutoProtectionPolicy. */ + public OperationCallSettings< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationSettings() { + return updateAutoProtectionPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteAutoProtectionPolicy. */ + public UnaryCallSettings + deleteAutoProtectionPolicySettings() { + return deleteAutoProtectionPolicySettings; + } + + /** Returns the object with the settings used for calls to deleteAutoProtectionPolicy. */ + public OperationCallSettings + deleteAutoProtectionPolicyOperationSettings() { + return deleteAutoProtectionPolicyOperationSettings; + } + + /** Returns the object with the settings used for calls to createAutoProtectionPolicyBinding. */ + public UnaryCallSettings + createAutoProtectionPolicyBindingSettings() { + return createAutoProtectionPolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to createAutoProtectionPolicyBinding. */ + public OperationCallSettings< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationSettings() { + return createAutoProtectionPolicyBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to getAutoProtectionPolicyBinding. */ + public UnaryCallSettings + getAutoProtectionPolicyBindingSettings() { + return getAutoProtectionPolicyBindingSettings; + } + + /** Returns the object with the settings used for calls to listAutoProtectionPolicyBindings. */ + public PagedCallSettings< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsSettings() { + return listAutoProtectionPolicyBindingsSettings; + } + + /** Returns the object with the settings used for calls to listAppliedAutoProtectionPolicies. */ + public PagedCallSettings< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesSettings() { + return listAppliedAutoProtectionPoliciesSettings; + } + + /** + * Returns the object with the settings used for calls to + * initiateDeleteAutoProtectionPolicyBinding. + */ + public UnaryCallSettings + initiateDeleteAutoProtectionPolicyBindingSettings() { + return initiateDeleteAutoProtectionPolicyBindingSettings; + } + + /** + * Returns the object with the settings used for calls to + * initiateDeleteAutoProtectionPolicyBinding. + */ + public OperationCallSettings< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationSettings() { + return initiateDeleteAutoProtectionPolicyBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to getBindingMatchingResource. */ + public UnaryCallSettings + getBindingMatchingResourceSettings() { + return getBindingMatchingResourceSettings; + } + + /** Returns the object with the settings used for calls to listBindingMatchingResources. */ + public PagedCallSettings< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesSettings() { + return listBindingMatchingResourcesSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public BackupDRStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcBackupDRStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonBackupDRStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "backupdr"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "backupdr.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "backupdr.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(BackupDRStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(BackupDRStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BackupDRStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BackupDRStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listManagementServersSettings = settingsBuilder.listManagementServersSettings().build(); + getManagementServerSettings = settingsBuilder.getManagementServerSettings().build(); + createManagementServerSettings = settingsBuilder.createManagementServerSettings().build(); + createManagementServerOperationSettings = + settingsBuilder.createManagementServerOperationSettings().build(); + deleteManagementServerSettings = settingsBuilder.deleteManagementServerSettings().build(); + deleteManagementServerOperationSettings = + settingsBuilder.deleteManagementServerOperationSettings().build(); + createBackupVaultSettings = settingsBuilder.createBackupVaultSettings().build(); + createBackupVaultOperationSettings = + settingsBuilder.createBackupVaultOperationSettings().build(); + listBackupVaultsSettings = settingsBuilder.listBackupVaultsSettings().build(); + fetchUsableBackupVaultsSettings = settingsBuilder.fetchUsableBackupVaultsSettings().build(); + getBackupVaultSettings = settingsBuilder.getBackupVaultSettings().build(); + updateBackupVaultSettings = settingsBuilder.updateBackupVaultSettings().build(); + updateBackupVaultOperationSettings = + settingsBuilder.updateBackupVaultOperationSettings().build(); + deleteBackupVaultSettings = settingsBuilder.deleteBackupVaultSettings().build(); + deleteBackupVaultOperationSettings = + settingsBuilder.deleteBackupVaultOperationSettings().build(); + listDataSourcesSettings = settingsBuilder.listDataSourcesSettings().build(); + getDataSourceSettings = settingsBuilder.getDataSourceSettings().build(); + updateDataSourceSettings = settingsBuilder.updateDataSourceSettings().build(); + updateDataSourceOperationSettings = settingsBuilder.updateDataSourceOperationSettings().build(); + listBackupsSettings = settingsBuilder.listBackupsSettings().build(); + fetchBackupsForResourceTypeSettings = + settingsBuilder.fetchBackupsForResourceTypeSettings().build(); + getBackupSettings = settingsBuilder.getBackupSettings().build(); + updateBackupSettings = settingsBuilder.updateBackupSettings().build(); + updateBackupOperationSettings = settingsBuilder.updateBackupOperationSettings().build(); + deleteBackupSettings = settingsBuilder.deleteBackupSettings().build(); + deleteBackupOperationSettings = settingsBuilder.deleteBackupOperationSettings().build(); + restoreBackupSettings = settingsBuilder.restoreBackupSettings().build(); + restoreBackupOperationSettings = settingsBuilder.restoreBackupOperationSettings().build(); + createBackupPlanSettings = settingsBuilder.createBackupPlanSettings().build(); + createBackupPlanOperationSettings = settingsBuilder.createBackupPlanOperationSettings().build(); + updateBackupPlanSettings = settingsBuilder.updateBackupPlanSettings().build(); + updateBackupPlanOperationSettings = settingsBuilder.updateBackupPlanOperationSettings().build(); + getBackupPlanSettings = settingsBuilder.getBackupPlanSettings().build(); + listBackupPlansSettings = settingsBuilder.listBackupPlansSettings().build(); + deleteBackupPlanSettings = settingsBuilder.deleteBackupPlanSettings().build(); + deleteBackupPlanOperationSettings = settingsBuilder.deleteBackupPlanOperationSettings().build(); + getBackupPlanRevisionSettings = settingsBuilder.getBackupPlanRevisionSettings().build(); + listBackupPlanRevisionsSettings = settingsBuilder.listBackupPlanRevisionsSettings().build(); + createBackupPlanAssociationSettings = + settingsBuilder.createBackupPlanAssociationSettings().build(); + createBackupPlanAssociationOperationSettings = + settingsBuilder.createBackupPlanAssociationOperationSettings().build(); + updateBackupPlanAssociationSettings = + settingsBuilder.updateBackupPlanAssociationSettings().build(); + updateBackupPlanAssociationOperationSettings = + settingsBuilder.updateBackupPlanAssociationOperationSettings().build(); + getBackupPlanAssociationSettings = settingsBuilder.getBackupPlanAssociationSettings().build(); + listBackupPlanAssociationsSettings = + settingsBuilder.listBackupPlanAssociationsSettings().build(); + fetchBackupPlanAssociationsForResourceTypeSettings = + settingsBuilder.fetchBackupPlanAssociationsForResourceTypeSettings().build(); + deleteBackupPlanAssociationSettings = + settingsBuilder.deleteBackupPlanAssociationSettings().build(); + deleteBackupPlanAssociationOperationSettings = + settingsBuilder.deleteBackupPlanAssociationOperationSettings().build(); + triggerBackupSettings = settingsBuilder.triggerBackupSettings().build(); + triggerBackupOperationSettings = settingsBuilder.triggerBackupOperationSettings().build(); + getDataSourceReferenceSettings = settingsBuilder.getDataSourceReferenceSettings().build(); + listDataSourceReferencesSettings = settingsBuilder.listDataSourceReferencesSettings().build(); + fetchDataSourceReferencesForResourceTypeSettings = + settingsBuilder.fetchDataSourceReferencesForResourceTypeSettings().build(); + initializeServiceSettings = settingsBuilder.initializeServiceSettings().build(); + initializeServiceOperationSettings = + settingsBuilder.initializeServiceOperationSettings().build(); + createAutoProtectionPolicySettings = + settingsBuilder.createAutoProtectionPolicySettings().build(); + createAutoProtectionPolicyOperationSettings = + settingsBuilder.createAutoProtectionPolicyOperationSettings().build(); + listAutoProtectionPoliciesSettings = + settingsBuilder.listAutoProtectionPoliciesSettings().build(); + getAutoProtectionPolicySettings = settingsBuilder.getAutoProtectionPolicySettings().build(); + updateAutoProtectionPolicySettings = + settingsBuilder.updateAutoProtectionPolicySettings().build(); + updateAutoProtectionPolicyOperationSettings = + settingsBuilder.updateAutoProtectionPolicyOperationSettings().build(); + deleteAutoProtectionPolicySettings = + settingsBuilder.deleteAutoProtectionPolicySettings().build(); + deleteAutoProtectionPolicyOperationSettings = + settingsBuilder.deleteAutoProtectionPolicyOperationSettings().build(); + createAutoProtectionPolicyBindingSettings = + settingsBuilder.createAutoProtectionPolicyBindingSettings().build(); + createAutoProtectionPolicyBindingOperationSettings = + settingsBuilder.createAutoProtectionPolicyBindingOperationSettings().build(); + getAutoProtectionPolicyBindingSettings = + settingsBuilder.getAutoProtectionPolicyBindingSettings().build(); + listAutoProtectionPolicyBindingsSettings = + settingsBuilder.listAutoProtectionPolicyBindingsSettings().build(); + listAppliedAutoProtectionPoliciesSettings = + settingsBuilder.listAppliedAutoProtectionPoliciesSettings().build(); + initiateDeleteAutoProtectionPolicyBindingSettings = + settingsBuilder.initiateDeleteAutoProtectionPolicyBindingSettings().build(); + initiateDeleteAutoProtectionPolicyBindingOperationSettings = + settingsBuilder.initiateDeleteAutoProtectionPolicyBindingOperationSettings().build(); + getBindingMatchingResourceSettings = + settingsBuilder.getBindingMatchingResourceSettings().build(); + listBindingMatchingResourcesSettings = + settingsBuilder.listBindingMatchingResourcesSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-backupdr") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for BackupDRStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListManagementServersRequest, + ListManagementServersResponse, + ListManagementServersPagedResponse> + listManagementServersSettings; + private final UnaryCallSettings.Builder + getManagementServerSettings; + private final UnaryCallSettings.Builder + createManagementServerSettings; + private final OperationCallSettings.Builder< + CreateManagementServerRequest, ManagementServer, OperationMetadata> + createManagementServerOperationSettings; + private final UnaryCallSettings.Builder + deleteManagementServerSettings; + private final OperationCallSettings.Builder< + DeleteManagementServerRequest, Empty, OperationMetadata> + deleteManagementServerOperationSettings; + private final UnaryCallSettings.Builder + createBackupVaultSettings; + private final OperationCallSettings.Builder< + CreateBackupVaultRequest, BackupVault, OperationMetadata> + createBackupVaultOperationSettings; + private final PagedCallSettings.Builder< + ListBackupVaultsRequest, ListBackupVaultsResponse, ListBackupVaultsPagedResponse> + listBackupVaultsSettings; + private final PagedCallSettings.Builder< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + FetchUsableBackupVaultsPagedResponse> + fetchUsableBackupVaultsSettings; + private final UnaryCallSettings.Builder + getBackupVaultSettings; + 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 PagedCallSettings.Builder< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings; + private final UnaryCallSettings.Builder getDataSourceSettings; + private final UnaryCallSettings.Builder + updateDataSourceSettings; + private final OperationCallSettings.Builder< + UpdateDataSourceRequest, DataSource, OperationMetadata> + updateDataSourceOperationSettings; + private final PagedCallSettings.Builder< + ListBackupsRequest, ListBackupsResponse, ListBackupsPagedResponse> + listBackupsSettings; + private final PagedCallSettings.Builder< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypeSettings; + private final UnaryCallSettings.Builder getBackupSettings; + private final UnaryCallSettings.Builder updateBackupSettings; + private final OperationCallSettings.Builder + updateBackupOperationSettings; + private final UnaryCallSettings.Builder deleteBackupSettings; + private final OperationCallSettings.Builder + deleteBackupOperationSettings; + private final UnaryCallSettings.Builder restoreBackupSettings; + private final OperationCallSettings.Builder< + RestoreBackupRequest, RestoreBackupResponse, OperationMetadata> + restoreBackupOperationSettings; + private final UnaryCallSettings.Builder + createBackupPlanSettings; + private final OperationCallSettings.Builder< + CreateBackupPlanRequest, BackupPlan, OperationMetadata> + createBackupPlanOperationSettings; + private final UnaryCallSettings.Builder + updateBackupPlanSettings; + private final OperationCallSettings.Builder< + UpdateBackupPlanRequest, BackupPlan, OperationMetadata> + updateBackupPlanOperationSettings; + private final UnaryCallSettings.Builder getBackupPlanSettings; + private final PagedCallSettings.Builder< + ListBackupPlansRequest, ListBackupPlansResponse, ListBackupPlansPagedResponse> + listBackupPlansSettings; + private final UnaryCallSettings.Builder + deleteBackupPlanSettings; + private final OperationCallSettings.Builder + deleteBackupPlanOperationSettings; + private final UnaryCallSettings.Builder + getBackupPlanRevisionSettings; + private final PagedCallSettings.Builder< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + ListBackupPlanRevisionsPagedResponse> + listBackupPlanRevisionsSettings; + private final UnaryCallSettings.Builder + createBackupPlanAssociationSettings; + private final OperationCallSettings.Builder< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationSettings; + private final UnaryCallSettings.Builder + updateBackupPlanAssociationSettings; + private final OperationCallSettings.Builder< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationSettings; + private final UnaryCallSettings.Builder + getBackupPlanAssociationSettings; + private final PagedCallSettings.Builder< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsSettings; + private final PagedCallSettings.Builder< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypeSettings; + private final UnaryCallSettings.Builder + deleteBackupPlanAssociationSettings; + private final OperationCallSettings.Builder< + DeleteBackupPlanAssociationRequest, Empty, OperationMetadata> + deleteBackupPlanAssociationOperationSettings; + private final UnaryCallSettings.Builder triggerBackupSettings; + private final OperationCallSettings.Builder< + TriggerBackupRequest, BackupPlanAssociation, OperationMetadata> + triggerBackupOperationSettings; + private final UnaryCallSettings.Builder + getDataSourceReferenceSettings; + private final PagedCallSettings.Builder< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + ListDataSourceReferencesPagedResponse> + listDataSourceReferencesSettings; + private final PagedCallSettings.Builder< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypeSettings; + private final UnaryCallSettings.Builder + initializeServiceSettings; + private final OperationCallSettings.Builder< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationSettings; + private final UnaryCallSettings.Builder + createAutoProtectionPolicySettings; + private final OperationCallSettings.Builder< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationSettings; + private final PagedCallSettings.Builder< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesSettings; + private final UnaryCallSettings.Builder + getAutoProtectionPolicySettings; + private final UnaryCallSettings.Builder + updateAutoProtectionPolicySettings; + private final OperationCallSettings.Builder< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationSettings; + private final UnaryCallSettings.Builder + deleteAutoProtectionPolicySettings; + private final OperationCallSettings.Builder< + DeleteAutoProtectionPolicyRequest, Empty, OperationMetadata> + deleteAutoProtectionPolicyOperationSettings; + private final UnaryCallSettings.Builder + createAutoProtectionPolicyBindingSettings; + private final OperationCallSettings.Builder< + CreateAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + createAutoProtectionPolicyBindingOperationSettings; + private final UnaryCallSettings.Builder< + GetAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding> + getAutoProtectionPolicyBindingSettings; + private final PagedCallSettings.Builder< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsSettings; + private final PagedCallSettings.Builder< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesSettings; + private final UnaryCallSettings.Builder< + InitiateDeleteAutoProtectionPolicyBindingRequest, Operation> + initiateDeleteAutoProtectionPolicyBindingSettings; + private final OperationCallSettings.Builder< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationSettings; + private final UnaryCallSettings.Builder< + GetBindingMatchingResourceRequest, BindingMatchingResource> + getBindingMatchingResourceSettings; + private final PagedCallSettings.Builder< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(clientContext); + + listManagementServersSettings = + PagedCallSettings.newBuilder(LIST_MANAGEMENT_SERVERS_PAGE_STR_FACT); + getManagementServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createManagementServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createManagementServerOperationSettings = OperationCallSettings.newBuilder(); + deleteManagementServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteManagementServerOperationSettings = OperationCallSettings.newBuilder(); + createBackupVaultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupVaultOperationSettings = OperationCallSettings.newBuilder(); + listBackupVaultsSettings = PagedCallSettings.newBuilder(LIST_BACKUP_VAULTS_PAGE_STR_FACT); + fetchUsableBackupVaultsSettings = + PagedCallSettings.newBuilder(FETCH_USABLE_BACKUP_VAULTS_PAGE_STR_FACT); + getBackupVaultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupVaultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupVaultOperationSettings = OperationCallSettings.newBuilder(); + deleteBackupVaultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupVaultOperationSettings = OperationCallSettings.newBuilder(); + listDataSourcesSettings = PagedCallSettings.newBuilder(LIST_DATA_SOURCES_PAGE_STR_FACT); + getDataSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataSourceOperationSettings = OperationCallSettings.newBuilder(); + listBackupsSettings = PagedCallSettings.newBuilder(LIST_BACKUPS_PAGE_STR_FACT); + fetchBackupsForResourceTypeSettings = + PagedCallSettings.newBuilder(FETCH_BACKUPS_FOR_RESOURCE_TYPE_PAGE_STR_FACT); + getBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupOperationSettings = OperationCallSettings.newBuilder(); + deleteBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupOperationSettings = OperationCallSettings.newBuilder(); + restoreBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restoreBackupOperationSettings = OperationCallSettings.newBuilder(); + createBackupPlanSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupPlanOperationSettings = OperationCallSettings.newBuilder(); + updateBackupPlanSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupPlanOperationSettings = OperationCallSettings.newBuilder(); + getBackupPlanSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBackupPlansSettings = PagedCallSettings.newBuilder(LIST_BACKUP_PLANS_PAGE_STR_FACT); + deleteBackupPlanSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupPlanOperationSettings = OperationCallSettings.newBuilder(); + getBackupPlanRevisionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBackupPlanRevisionsSettings = + PagedCallSettings.newBuilder(LIST_BACKUP_PLAN_REVISIONS_PAGE_STR_FACT); + createBackupPlanAssociationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createBackupPlanAssociationOperationSettings = OperationCallSettings.newBuilder(); + updateBackupPlanAssociationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateBackupPlanAssociationOperationSettings = OperationCallSettings.newBuilder(); + getBackupPlanAssociationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBackupPlanAssociationsSettings = + PagedCallSettings.newBuilder(LIST_BACKUP_PLAN_ASSOCIATIONS_PAGE_STR_FACT); + fetchBackupPlanAssociationsForResourceTypeSettings = + PagedCallSettings.newBuilder( + FETCH_BACKUP_PLAN_ASSOCIATIONS_FOR_RESOURCE_TYPE_PAGE_STR_FACT); + deleteBackupPlanAssociationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteBackupPlanAssociationOperationSettings = OperationCallSettings.newBuilder(); + triggerBackupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + triggerBackupOperationSettings = OperationCallSettings.newBuilder(); + getDataSourceReferenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listDataSourceReferencesSettings = + PagedCallSettings.newBuilder(LIST_DATA_SOURCE_REFERENCES_PAGE_STR_FACT); + fetchDataSourceReferencesForResourceTypeSettings = + PagedCallSettings.newBuilder( + FETCH_DATA_SOURCE_REFERENCES_FOR_RESOURCE_TYPE_PAGE_STR_FACT); + initializeServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + initializeServiceOperationSettings = OperationCallSettings.newBuilder(); + createAutoProtectionPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAutoProtectionPolicyOperationSettings = OperationCallSettings.newBuilder(); + listAutoProtectionPoliciesSettings = + PagedCallSettings.newBuilder(LIST_AUTO_PROTECTION_POLICIES_PAGE_STR_FACT); + getAutoProtectionPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAutoProtectionPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAutoProtectionPolicyOperationSettings = OperationCallSettings.newBuilder(); + deleteAutoProtectionPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAutoProtectionPolicyOperationSettings = OperationCallSettings.newBuilder(); + createAutoProtectionPolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAutoProtectionPolicyBindingOperationSettings = OperationCallSettings.newBuilder(); + getAutoProtectionPolicyBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAutoProtectionPolicyBindingsSettings = + PagedCallSettings.newBuilder(LIST_AUTO_PROTECTION_POLICY_BINDINGS_PAGE_STR_FACT); + listAppliedAutoProtectionPoliciesSettings = + PagedCallSettings.newBuilder(LIST_APPLIED_AUTO_PROTECTION_POLICIES_PAGE_STR_FACT); + initiateDeleteAutoProtectionPolicyBindingSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + initiateDeleteAutoProtectionPolicyBindingOperationSettings = + OperationCallSettings.newBuilder(); + getBindingMatchingResourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listBindingMatchingResourcesSettings = + PagedCallSettings.newBuilder(LIST_BINDING_MATCHING_RESOURCES_PAGE_STR_FACT); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listManagementServersSettings, + getManagementServerSettings, + createManagementServerSettings, + deleteManagementServerSettings, + createBackupVaultSettings, + listBackupVaultsSettings, + fetchUsableBackupVaultsSettings, + getBackupVaultSettings, + updateBackupVaultSettings, + deleteBackupVaultSettings, + listDataSourcesSettings, + getDataSourceSettings, + updateDataSourceSettings, + listBackupsSettings, + fetchBackupsForResourceTypeSettings, + getBackupSettings, + updateBackupSettings, + deleteBackupSettings, + restoreBackupSettings, + createBackupPlanSettings, + updateBackupPlanSettings, + getBackupPlanSettings, + listBackupPlansSettings, + deleteBackupPlanSettings, + getBackupPlanRevisionSettings, + listBackupPlanRevisionsSettings, + createBackupPlanAssociationSettings, + updateBackupPlanAssociationSettings, + getBackupPlanAssociationSettings, + listBackupPlanAssociationsSettings, + fetchBackupPlanAssociationsForResourceTypeSettings, + deleteBackupPlanAssociationSettings, + triggerBackupSettings, + getDataSourceReferenceSettings, + listDataSourceReferencesSettings, + fetchDataSourceReferencesForResourceTypeSettings, + initializeServiceSettings, + createAutoProtectionPolicySettings, + listAutoProtectionPoliciesSettings, + getAutoProtectionPolicySettings, + updateAutoProtectionPolicySettings, + deleteAutoProtectionPolicySettings, + createAutoProtectionPolicyBindingSettings, + getAutoProtectionPolicyBindingSettings, + listAutoProtectionPolicyBindingsSettings, + listAppliedAutoProtectionPoliciesSettings, + initiateDeleteAutoProtectionPolicyBindingSettings, + getBindingMatchingResourceSettings, + listBindingMatchingResourcesSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(BackupDRStubSettings settings) { + super(settings); + + listManagementServersSettings = settings.listManagementServersSettings.toBuilder(); + getManagementServerSettings = settings.getManagementServerSettings.toBuilder(); + createManagementServerSettings = settings.createManagementServerSettings.toBuilder(); + createManagementServerOperationSettings = + settings.createManagementServerOperationSettings.toBuilder(); + deleteManagementServerSettings = settings.deleteManagementServerSettings.toBuilder(); + deleteManagementServerOperationSettings = + settings.deleteManagementServerOperationSettings.toBuilder(); + createBackupVaultSettings = settings.createBackupVaultSettings.toBuilder(); + createBackupVaultOperationSettings = settings.createBackupVaultOperationSettings.toBuilder(); + listBackupVaultsSettings = settings.listBackupVaultsSettings.toBuilder(); + fetchUsableBackupVaultsSettings = settings.fetchUsableBackupVaultsSettings.toBuilder(); + getBackupVaultSettings = settings.getBackupVaultSettings.toBuilder(); + updateBackupVaultSettings = settings.updateBackupVaultSettings.toBuilder(); + updateBackupVaultOperationSettings = settings.updateBackupVaultOperationSettings.toBuilder(); + deleteBackupVaultSettings = settings.deleteBackupVaultSettings.toBuilder(); + deleteBackupVaultOperationSettings = settings.deleteBackupVaultOperationSettings.toBuilder(); + listDataSourcesSettings = settings.listDataSourcesSettings.toBuilder(); + getDataSourceSettings = settings.getDataSourceSettings.toBuilder(); + updateDataSourceSettings = settings.updateDataSourceSettings.toBuilder(); + updateDataSourceOperationSettings = settings.updateDataSourceOperationSettings.toBuilder(); + listBackupsSettings = settings.listBackupsSettings.toBuilder(); + fetchBackupsForResourceTypeSettings = + settings.fetchBackupsForResourceTypeSettings.toBuilder(); + getBackupSettings = settings.getBackupSettings.toBuilder(); + updateBackupSettings = settings.updateBackupSettings.toBuilder(); + updateBackupOperationSettings = settings.updateBackupOperationSettings.toBuilder(); + deleteBackupSettings = settings.deleteBackupSettings.toBuilder(); + deleteBackupOperationSettings = settings.deleteBackupOperationSettings.toBuilder(); + restoreBackupSettings = settings.restoreBackupSettings.toBuilder(); + restoreBackupOperationSettings = settings.restoreBackupOperationSettings.toBuilder(); + createBackupPlanSettings = settings.createBackupPlanSettings.toBuilder(); + createBackupPlanOperationSettings = settings.createBackupPlanOperationSettings.toBuilder(); + updateBackupPlanSettings = settings.updateBackupPlanSettings.toBuilder(); + updateBackupPlanOperationSettings = settings.updateBackupPlanOperationSettings.toBuilder(); + getBackupPlanSettings = settings.getBackupPlanSettings.toBuilder(); + listBackupPlansSettings = settings.listBackupPlansSettings.toBuilder(); + deleteBackupPlanSettings = settings.deleteBackupPlanSettings.toBuilder(); + deleteBackupPlanOperationSettings = settings.deleteBackupPlanOperationSettings.toBuilder(); + getBackupPlanRevisionSettings = settings.getBackupPlanRevisionSettings.toBuilder(); + listBackupPlanRevisionsSettings = settings.listBackupPlanRevisionsSettings.toBuilder(); + createBackupPlanAssociationSettings = + settings.createBackupPlanAssociationSettings.toBuilder(); + createBackupPlanAssociationOperationSettings = + settings.createBackupPlanAssociationOperationSettings.toBuilder(); + updateBackupPlanAssociationSettings = + settings.updateBackupPlanAssociationSettings.toBuilder(); + updateBackupPlanAssociationOperationSettings = + settings.updateBackupPlanAssociationOperationSettings.toBuilder(); + getBackupPlanAssociationSettings = settings.getBackupPlanAssociationSettings.toBuilder(); + listBackupPlanAssociationsSettings = settings.listBackupPlanAssociationsSettings.toBuilder(); + fetchBackupPlanAssociationsForResourceTypeSettings = + settings.fetchBackupPlanAssociationsForResourceTypeSettings.toBuilder(); + deleteBackupPlanAssociationSettings = + settings.deleteBackupPlanAssociationSettings.toBuilder(); + deleteBackupPlanAssociationOperationSettings = + settings.deleteBackupPlanAssociationOperationSettings.toBuilder(); + triggerBackupSettings = settings.triggerBackupSettings.toBuilder(); + triggerBackupOperationSettings = settings.triggerBackupOperationSettings.toBuilder(); + getDataSourceReferenceSettings = settings.getDataSourceReferenceSettings.toBuilder(); + listDataSourceReferencesSettings = settings.listDataSourceReferencesSettings.toBuilder(); + fetchDataSourceReferencesForResourceTypeSettings = + settings.fetchDataSourceReferencesForResourceTypeSettings.toBuilder(); + initializeServiceSettings = settings.initializeServiceSettings.toBuilder(); + initializeServiceOperationSettings = settings.initializeServiceOperationSettings.toBuilder(); + createAutoProtectionPolicySettings = settings.createAutoProtectionPolicySettings.toBuilder(); + createAutoProtectionPolicyOperationSettings = + settings.createAutoProtectionPolicyOperationSettings.toBuilder(); + listAutoProtectionPoliciesSettings = settings.listAutoProtectionPoliciesSettings.toBuilder(); + getAutoProtectionPolicySettings = settings.getAutoProtectionPolicySettings.toBuilder(); + updateAutoProtectionPolicySettings = settings.updateAutoProtectionPolicySettings.toBuilder(); + updateAutoProtectionPolicyOperationSettings = + settings.updateAutoProtectionPolicyOperationSettings.toBuilder(); + deleteAutoProtectionPolicySettings = settings.deleteAutoProtectionPolicySettings.toBuilder(); + deleteAutoProtectionPolicyOperationSettings = + settings.deleteAutoProtectionPolicyOperationSettings.toBuilder(); + createAutoProtectionPolicyBindingSettings = + settings.createAutoProtectionPolicyBindingSettings.toBuilder(); + createAutoProtectionPolicyBindingOperationSettings = + settings.createAutoProtectionPolicyBindingOperationSettings.toBuilder(); + getAutoProtectionPolicyBindingSettings = + settings.getAutoProtectionPolicyBindingSettings.toBuilder(); + listAutoProtectionPolicyBindingsSettings = + settings.listAutoProtectionPolicyBindingsSettings.toBuilder(); + listAppliedAutoProtectionPoliciesSettings = + settings.listAppliedAutoProtectionPoliciesSettings.toBuilder(); + initiateDeleteAutoProtectionPolicyBindingSettings = + settings.initiateDeleteAutoProtectionPolicyBindingSettings.toBuilder(); + initiateDeleteAutoProtectionPolicyBindingOperationSettings = + settings.initiateDeleteAutoProtectionPolicyBindingOperationSettings.toBuilder(); + getBindingMatchingResourceSettings = settings.getBindingMatchingResourceSettings.toBuilder(); + listBindingMatchingResourcesSettings = + settings.listBindingMatchingResourcesSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listManagementServersSettings, + getManagementServerSettings, + createManagementServerSettings, + deleteManagementServerSettings, + createBackupVaultSettings, + listBackupVaultsSettings, + fetchUsableBackupVaultsSettings, + getBackupVaultSettings, + updateBackupVaultSettings, + deleteBackupVaultSettings, + listDataSourcesSettings, + getDataSourceSettings, + updateDataSourceSettings, + listBackupsSettings, + fetchBackupsForResourceTypeSettings, + getBackupSettings, + updateBackupSettings, + deleteBackupSettings, + restoreBackupSettings, + createBackupPlanSettings, + updateBackupPlanSettings, + getBackupPlanSettings, + listBackupPlansSettings, + deleteBackupPlanSettings, + getBackupPlanRevisionSettings, + listBackupPlanRevisionsSettings, + createBackupPlanAssociationSettings, + updateBackupPlanAssociationSettings, + getBackupPlanAssociationSettings, + listBackupPlanAssociationsSettings, + fetchBackupPlanAssociationsForResourceTypeSettings, + deleteBackupPlanAssociationSettings, + triggerBackupSettings, + getDataSourceReferenceSettings, + listDataSourceReferencesSettings, + fetchDataSourceReferencesForResourceTypeSettings, + initializeServiceSettings, + createAutoProtectionPolicySettings, + listAutoProtectionPoliciesSettings, + getAutoProtectionPolicySettings, + updateAutoProtectionPolicySettings, + deleteAutoProtectionPolicySettings, + createAutoProtectionPolicyBindingSettings, + getAutoProtectionPolicyBindingSettings, + listAutoProtectionPolicyBindingsSettings, + listAppliedAutoProtectionPoliciesSettings, + initiateDeleteAutoProtectionPolicyBindingSettings, + getBindingMatchingResourceSettings, + listBindingMatchingResourcesSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listManagementServersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getManagementServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createManagementServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteManagementServerSettings() + .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("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 + .fetchUsableBackupVaultsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getBackupVaultSettings() + .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("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listDataSourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getDataSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateDataSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listBackupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .fetchBackupsForResourceTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .restoreBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createBackupPlanSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateBackupPlanSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getBackupPlanSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listBackupPlansSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteBackupPlanSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getBackupPlanRevisionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listBackupPlanRevisionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createBackupPlanAssociationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateBackupPlanAssociationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getBackupPlanAssociationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listBackupPlanAssociationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .fetchBackupPlanAssociationsForResourceTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteBackupPlanAssociationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .triggerBackupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDataSourceReferenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDataSourceReferencesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .fetchDataSourceReferencesForResourceTypeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .initializeServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createAutoProtectionPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listAutoProtectionPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getAutoProtectionPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateAutoProtectionPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteAutoProtectionPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createAutoProtectionPolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getAutoProtectionPolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listAutoProtectionPolicyBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listAppliedAutoProtectionPoliciesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .initiateDeleteAutoProtectionPolicyBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getBindingMatchingResourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listBindingMatchingResourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createManagementServerOperationSettings() + .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(ManagementServer.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteManagementServerOperationSettings() + .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() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createBackupVaultOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupVault.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(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() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteBackupVaultOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateDataSourceOperationSettings() + .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(DataSource.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(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() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Backup.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .restoreBackupOperationSettings() + .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(RestoreBackupResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createBackupPlanOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupPlan.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateBackupPlanOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupPlan.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteBackupPlanOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createBackupPlanAssociationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupPlanAssociation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateBackupPlanAssociationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupPlanAssociation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteBackupPlanAssociationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .triggerBackupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(BackupPlanAssociation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .initializeServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + InitializeServiceResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createAutoProtectionPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AutoProtectionPolicy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAutoProtectionPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AutoProtectionPolicy.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAutoProtectionPolicyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createAutoProtectionPolicyBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AutoProtectionPolicyBinding.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .initiateDeleteAutoProtectionPolicyBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AutoProtectionPolicyBinding.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listManagementServers. */ + public PagedCallSettings.Builder< + ListManagementServersRequest, + ListManagementServersResponse, + ListManagementServersPagedResponse> + listManagementServersSettings() { + return listManagementServersSettings; + } + + /** Returns the builder for the settings used for calls to getManagementServer. */ + public UnaryCallSettings.Builder + getManagementServerSettings() { + return getManagementServerSettings; + } + + /** Returns the builder for the settings used for calls to createManagementServer. */ + public UnaryCallSettings.Builder + createManagementServerSettings() { + return createManagementServerSettings; + } + + /** Returns the builder for the settings used for calls to createManagementServer. */ + public OperationCallSettings.Builder< + CreateManagementServerRequest, ManagementServer, OperationMetadata> + createManagementServerOperationSettings() { + return createManagementServerOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteManagementServer. */ + public UnaryCallSettings.Builder + deleteManagementServerSettings() { + return deleteManagementServerSettings; + } + + /** Returns the builder for the settings used for calls to deleteManagementServer. */ + public OperationCallSettings.Builder + deleteManagementServerOperationSettings() { + return deleteManagementServerOperationSettings; + } + + /** 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. */ + public OperationCallSettings.Builder + createBackupVaultOperationSettings() { + return createBackupVaultOperationSettings; + } + + /** 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 fetchUsableBackupVaults. */ + public PagedCallSettings.Builder< + FetchUsableBackupVaultsRequest, + FetchUsableBackupVaultsResponse, + FetchUsableBackupVaultsPagedResponse> + fetchUsableBackupVaultsSettings() { + return fetchUsableBackupVaultsSettings; + } + + /** 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 updateBackupVault. */ + public UnaryCallSettings.Builder + updateBackupVaultSettings() { + return updateBackupVaultSettings; + } + + /** Returns the builder for the settings used for calls to updateBackupVault. */ + 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. */ + public OperationCallSettings.Builder + deleteBackupVaultOperationSettings() { + return deleteBackupVaultOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDataSources. */ + public PagedCallSettings.Builder< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings() { + return listDataSourcesSettings; + } + + /** Returns the builder for the settings used for calls to getDataSource. */ + public UnaryCallSettings.Builder getDataSourceSettings() { + return getDataSourceSettings; + } + + /** Returns the builder for the settings used for calls to updateDataSource. */ + public UnaryCallSettings.Builder + updateDataSourceSettings() { + return updateDataSourceSettings; + } + + /** Returns the builder for the settings used for calls to updateDataSource. */ + public OperationCallSettings.Builder + updateDataSourceOperationSettings() { + return updateDataSourceOperationSettings; + } + + /** 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 fetchBackupsForResourceType. */ + public PagedCallSettings.Builder< + FetchBackupsForResourceTypeRequest, + FetchBackupsForResourceTypeResponse, + FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypeSettings() { + return fetchBackupsForResourceTypeSettings; + } + + /** 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 updateBackup. */ + public UnaryCallSettings.Builder updateBackupSettings() { + return updateBackupSettings; + } + + /** Returns the builder for the settings used for calls to updateBackup. */ + public OperationCallSettings.Builder + updateBackupOperationSettings() { + return updateBackupOperationSettings; + } + + /** 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. */ + public OperationCallSettings.Builder + deleteBackupOperationSettings() { + return deleteBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to restoreBackup. */ + public UnaryCallSettings.Builder restoreBackupSettings() { + return restoreBackupSettings; + } + + /** Returns the builder for the settings used for calls to restoreBackup. */ + public OperationCallSettings.Builder< + RestoreBackupRequest, RestoreBackupResponse, OperationMetadata> + restoreBackupOperationSettings() { + return restoreBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to createBackupPlan. */ + public UnaryCallSettings.Builder + createBackupPlanSettings() { + return createBackupPlanSettings; + } + + /** Returns the builder for the settings used for calls to createBackupPlan. */ + public OperationCallSettings.Builder + createBackupPlanOperationSettings() { + return createBackupPlanOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateBackupPlan. */ + public UnaryCallSettings.Builder + updateBackupPlanSettings() { + return updateBackupPlanSettings; + } + + /** Returns the builder for the settings used for calls to updateBackupPlan. */ + public OperationCallSettings.Builder + updateBackupPlanOperationSettings() { + return updateBackupPlanOperationSettings; + } + + /** Returns the builder for the settings used for calls to getBackupPlan. */ + public UnaryCallSettings.Builder getBackupPlanSettings() { + return getBackupPlanSettings; + } + + /** Returns the builder for the settings used for calls to listBackupPlans. */ + public PagedCallSettings.Builder< + ListBackupPlansRequest, ListBackupPlansResponse, ListBackupPlansPagedResponse> + listBackupPlansSettings() { + return listBackupPlansSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackupPlan. */ + public UnaryCallSettings.Builder + deleteBackupPlanSettings() { + return deleteBackupPlanSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackupPlan. */ + public OperationCallSettings.Builder + deleteBackupPlanOperationSettings() { + return deleteBackupPlanOperationSettings; + } + + /** Returns the builder for the settings used for calls to getBackupPlanRevision. */ + public UnaryCallSettings.Builder + getBackupPlanRevisionSettings() { + return getBackupPlanRevisionSettings; + } + + /** Returns the builder for the settings used for calls to listBackupPlanRevisions. */ + public PagedCallSettings.Builder< + ListBackupPlanRevisionsRequest, + ListBackupPlanRevisionsResponse, + ListBackupPlanRevisionsPagedResponse> + listBackupPlanRevisionsSettings() { + return listBackupPlanRevisionsSettings; + } + + /** Returns the builder for the settings used for calls to createBackupPlanAssociation. */ + public UnaryCallSettings.Builder + createBackupPlanAssociationSettings() { + return createBackupPlanAssociationSettings; + } + + /** Returns the builder for the settings used for calls to createBackupPlanAssociation. */ + public OperationCallSettings.Builder< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationSettings() { + return createBackupPlanAssociationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateBackupPlanAssociation. */ + public UnaryCallSettings.Builder + updateBackupPlanAssociationSettings() { + return updateBackupPlanAssociationSettings; + } + + /** Returns the builder for the settings used for calls to updateBackupPlanAssociation. */ + public OperationCallSettings.Builder< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationSettings() { + return updateBackupPlanAssociationOperationSettings; + } + + /** Returns the builder for the settings used for calls to getBackupPlanAssociation. */ + public UnaryCallSettings.Builder + getBackupPlanAssociationSettings() { + return getBackupPlanAssociationSettings; + } + + /** Returns the builder for the settings used for calls to listBackupPlanAssociations. */ + public PagedCallSettings.Builder< + ListBackupPlanAssociationsRequest, + ListBackupPlanAssociationsResponse, + ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsSettings() { + return listBackupPlanAssociationsSettings; + } + + /** + * Returns the builder for the settings used for calls to + * fetchBackupPlanAssociationsForResourceType. + */ + public PagedCallSettings.Builder< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypeSettings() { + return fetchBackupPlanAssociationsForResourceTypeSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackupPlanAssociation. */ + public UnaryCallSettings.Builder + deleteBackupPlanAssociationSettings() { + return deleteBackupPlanAssociationSettings; + } + + /** Returns the builder for the settings used for calls to deleteBackupPlanAssociation. */ + public OperationCallSettings.Builder< + DeleteBackupPlanAssociationRequest, Empty, OperationMetadata> + deleteBackupPlanAssociationOperationSettings() { + return deleteBackupPlanAssociationOperationSettings; + } + + /** Returns the builder for the settings used for calls to triggerBackup. */ + public UnaryCallSettings.Builder triggerBackupSettings() { + return triggerBackupSettings; + } + + /** Returns the builder for the settings used for calls to triggerBackup. */ + public OperationCallSettings.Builder< + TriggerBackupRequest, BackupPlanAssociation, OperationMetadata> + triggerBackupOperationSettings() { + return triggerBackupOperationSettings; + } + + /** Returns the builder for the settings used for calls to getDataSourceReference. */ + public UnaryCallSettings.Builder + getDataSourceReferenceSettings() { + return getDataSourceReferenceSettings; + } + + /** Returns the builder for the settings used for calls to listDataSourceReferences. */ + public PagedCallSettings.Builder< + ListDataSourceReferencesRequest, + ListDataSourceReferencesResponse, + ListDataSourceReferencesPagedResponse> + listDataSourceReferencesSettings() { + return listDataSourceReferencesSettings; + } + + /** + * Returns the builder for the settings used for calls to + * fetchDataSourceReferencesForResourceType. + */ + public PagedCallSettings.Builder< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypeSettings() { + return fetchDataSourceReferencesForResourceTypeSettings; + } + + /** Returns the builder for the settings used for calls to initializeService. */ + public UnaryCallSettings.Builder + initializeServiceSettings() { + return initializeServiceSettings; + } + + /** Returns the builder for the settings used for calls to initializeService. */ + public OperationCallSettings.Builder< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationSettings() { + return initializeServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to createAutoProtectionPolicy. */ + public UnaryCallSettings.Builder + createAutoProtectionPolicySettings() { + return createAutoProtectionPolicySettings; + } + + /** Returns the builder for the settings used for calls to createAutoProtectionPolicy. */ + public OperationCallSettings.Builder< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationSettings() { + return createAutoProtectionPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to listAutoProtectionPolicies. */ + public PagedCallSettings.Builder< + ListAutoProtectionPoliciesRequest, + ListAutoProtectionPoliciesResponse, + ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesSettings() { + return listAutoProtectionPoliciesSettings; + } + + /** Returns the builder for the settings used for calls to getAutoProtectionPolicy. */ + public UnaryCallSettings.Builder + getAutoProtectionPolicySettings() { + return getAutoProtectionPolicySettings; + } + + /** Returns the builder for the settings used for calls to updateAutoProtectionPolicy. */ + public UnaryCallSettings.Builder + updateAutoProtectionPolicySettings() { + return updateAutoProtectionPolicySettings; + } + + /** Returns the builder for the settings used for calls to updateAutoProtectionPolicy. */ + public OperationCallSettings.Builder< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationSettings() { + return updateAutoProtectionPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteAutoProtectionPolicy. */ + public UnaryCallSettings.Builder + deleteAutoProtectionPolicySettings() { + return deleteAutoProtectionPolicySettings; + } + + /** Returns the builder for the settings used for calls to deleteAutoProtectionPolicy. */ + public OperationCallSettings.Builder< + DeleteAutoProtectionPolicyRequest, Empty, OperationMetadata> + deleteAutoProtectionPolicyOperationSettings() { + return deleteAutoProtectionPolicyOperationSettings; + } + + /** Returns the builder for the settings used for calls to createAutoProtectionPolicyBinding. */ + public UnaryCallSettings.Builder + createAutoProtectionPolicyBindingSettings() { + return createAutoProtectionPolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to createAutoProtectionPolicyBinding. */ + public OperationCallSettings.Builder< + CreateAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + createAutoProtectionPolicyBindingOperationSettings() { + return createAutoProtectionPolicyBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAutoProtectionPolicyBinding. */ + public UnaryCallSettings.Builder< + GetAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding> + getAutoProtectionPolicyBindingSettings() { + return getAutoProtectionPolicyBindingSettings; + } + + /** Returns the builder for the settings used for calls to listAutoProtectionPolicyBindings. */ + public PagedCallSettings.Builder< + ListAutoProtectionPolicyBindingsRequest, + ListAutoProtectionPolicyBindingsResponse, + ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsSettings() { + return listAutoProtectionPolicyBindingsSettings; + } + + /** Returns the builder for the settings used for calls to listAppliedAutoProtectionPolicies. */ + public PagedCallSettings.Builder< + ListAppliedAutoProtectionPoliciesRequest, + ListAppliedAutoProtectionPoliciesResponse, + ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesSettings() { + return listAppliedAutoProtectionPoliciesSettings; + } + + /** + * Returns the builder for the settings used for calls to + * initiateDeleteAutoProtectionPolicyBinding. + */ + public UnaryCallSettings.Builder + initiateDeleteAutoProtectionPolicyBindingSettings() { + return initiateDeleteAutoProtectionPolicyBindingSettings; + } + + /** + * Returns the builder for the settings used for calls to + * initiateDeleteAutoProtectionPolicyBinding. + */ + public OperationCallSettings.Builder< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationSettings() { + return initiateDeleteAutoProtectionPolicyBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to getBindingMatchingResource. */ + public UnaryCallSettings.Builder + getBindingMatchingResourceSettings() { + return getBindingMatchingResourceSettings; + } + + /** Returns the builder for the settings used for calls to listBindingMatchingResources. */ + public PagedCallSettings.Builder< + ListBindingMatchingResourcesRequest, + ListBindingMatchingResourcesResponse, + ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesSettings() { + return listBindingMatchingResourcesSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public BackupDRStubSettings build() throws IOException { + return new BackupDRStubSettings(this); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDrProtectionSummaryStub.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDrProtectionSummaryStub.java new file mode 100644 index 000000000000..647190cf643e --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDrProtectionSummaryStub.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListResourceBackupConfigsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the BackupDrProtectionSummary service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public abstract class BackupDrProtectionSummaryStub implements BackgroundResource { + + public UnaryCallable + listResourceBackupConfigsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listResourceBackupConfigsPagedCallable()"); + } + + public UnaryCallable + listResourceBackupConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listResourceBackupConfigsCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDrProtectionSummaryStubSettings.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDrProtectionSummaryStubSettings.java new file mode 100644 index 000000000000..06b335aa6cea --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/BackupDrProtectionSummaryStubSettings.java @@ -0,0 +1,650 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListResourceBackupConfigsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse; +import com.google.cloud.backupdr.v1beta.ResourceBackupConfig; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link BackupDrProtectionSummaryStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (backupdr.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getLocation: + * + *

{@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
+ * BackupDrProtectionSummaryStubSettings.Builder backupDrProtectionSummarySettingsBuilder =
+ *     BackupDrProtectionSummaryStubSettings.newBuilder();
+ * backupDrProtectionSummarySettingsBuilder
+ *     .getLocationSettings()
+ *     .setRetrySettings(
+ *         backupDrProtectionSummarySettingsBuilder
+ *             .getLocationSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * BackupDrProtectionSummaryStubSettings backupDrProtectionSummarySettings =
+ *     backupDrProtectionSummarySettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class BackupDrProtectionSummaryStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-backupdr") + .add("https://www.googleapis.com/auth/cloud-platform") + .build(); + + private final PagedCallSettings< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor< + ListResourceBackupConfigsRequest, ListResourceBackupConfigsResponse, ResourceBackupConfig> + LIST_RESOURCE_BACKUP_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListResourceBackupConfigsRequest injectToken( + ListResourceBackupConfigsRequest payload, String token) { + return ListResourceBackupConfigsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListResourceBackupConfigsRequest injectPageSize( + ListResourceBackupConfigsRequest payload, int pageSize) { + return ListResourceBackupConfigsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListResourceBackupConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListResourceBackupConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListResourceBackupConfigsResponse payload) { + return payload.getResourceBackupConfigsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ListResourceBackupConfigsPagedResponse> + LIST_RESOURCE_BACKUP_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ListResourceBackupConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListResourceBackupConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ResourceBackupConfig> + pageContext = + PageContext.create( + callable, LIST_RESOURCE_BACKUP_CONFIGS_PAGE_STR_DESC, request, context); + return ListResourceBackupConfigsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listResourceBackupConfigs. */ + public PagedCallSettings< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsSettings() { + return listResourceBackupConfigsSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public BackupDrProtectionSummaryStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcBackupDrProtectionSummaryStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonBackupDrProtectionSummaryStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "backupdr"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "backupdr.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "backupdr.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BackupDrProtectionSummaryStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BackupDrProtectionSummaryStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BackupDrProtectionSummaryStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BackupDrProtectionSummaryStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listResourceBackupConfigsSettings = settingsBuilder.listResourceBackupConfigsSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-backupdr") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for BackupDrProtectionSummaryStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(clientContext); + + listResourceBackupConfigsSettings = + PagedCallSettings.newBuilder(LIST_RESOURCE_BACKUP_CONFIGS_PAGE_STR_FACT); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listResourceBackupConfigsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(BackupDrProtectionSummaryStubSettings settings) { + super(settings); + + listResourceBackupConfigsSettings = settings.listResourceBackupConfigsSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listResourceBackupConfigsSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listResourceBackupConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listResourceBackupConfigs. */ + public PagedCallSettings.Builder< + ListResourceBackupConfigsRequest, + ListResourceBackupConfigsResponse, + ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsSettings() { + return listResourceBackupConfigsSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public BackupDrProtectionSummaryStubSettings build() throws IOException { + return new BackupDrProtectionSummaryStubSettings(this); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDRCallableFactory.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDRCallableFactory.java new file mode 100644 index 000000000000..e4eee3fa4f1b --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDRCallableFactory.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the BackupDR service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcBackupDRCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDRStub.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDRStub.java new file mode 100644 index 000000000000..b5ce23b23151 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDRStub.java @@ -0,0 +1,2738 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupPlanAssociationsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchDataSourceReferencesForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchUsableBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAppliedAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPolicyBindingsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanAssociationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanRevisionsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlansPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBindingMatchingResourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourceReferencesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListManagementServersPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.CreateManagementServerRequest; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest; +import com.google.cloud.backupdr.v1beta.GetBackupRequest; +import com.google.cloud.backupdr.v1beta.GetBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest; +import com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest; +import com.google.cloud.backupdr.v1beta.GetDataSourceRequest; +import com.google.cloud.backupdr.v1beta.GetManagementServerRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceResponse; +import com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlansRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlansResponse; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupsResponse; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse; +import com.google.cloud.backupdr.v1beta.ListDataSourcesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourcesResponse; +import com.google.cloud.backupdr.v1beta.ListManagementServersRequest; +import com.google.cloud.backupdr.v1beta.ListManagementServersResponse; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.RestoreBackupRequest; +import com.google.cloud.backupdr.v1beta.RestoreBackupResponse; +import com.google.cloud.backupdr.v1beta.TriggerBackupRequest; +import com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the BackupDR service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcBackupDRStub extends BackupDRStub { + private static final MethodDescriptor + listManagementServersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListManagementServers") + .setRequestMarshaller( + ProtoUtils.marshaller(ListManagementServersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListManagementServersResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getManagementServerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetManagementServer") + .setRequestMarshaller( + ProtoUtils.marshaller(GetManagementServerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ManagementServer.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createManagementServerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/CreateManagementServer") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateManagementServerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteManagementServerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteManagementServer") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteManagementServerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createBackupVaultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/CreateBackupVault") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateBackupVaultRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listBackupVaultsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackupVaults") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBackupVaultsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupVaultsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + FetchUsableBackupVaultsRequest, FetchUsableBackupVaultsResponse> + fetchUsableBackupVaultsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/FetchUsableBackupVaults") + .setRequestMarshaller( + ProtoUtils.marshaller(FetchUsableBackupVaultsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FetchUsableBackupVaultsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getBackupVaultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackupVault") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBackupVaultRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BackupVault.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateBackupVaultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateBackupVault") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateBackupVaultRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteBackupVaultMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteBackupVault") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteBackupVaultRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listDataSourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListDataSources") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataSourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataSourcesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getDataSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetDataSource") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataSource.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateDataSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateDataSource") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listBackupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackups") + .setRequestMarshaller(ProtoUtils.marshaller(ListBackupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse> + fetchBackupsForResourceTypeMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/FetchBackupsForResourceType") + .setRequestMarshaller( + ProtoUtils.marshaller(FetchBackupsForResourceTypeRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FetchBackupsForResourceTypeResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackup") + .setRequestMarshaller(ProtoUtils.marshaller(GetBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Backup.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateBackup") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteBackup") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + restoreBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/RestoreBackup") + .setRequestMarshaller( + ProtoUtils.marshaller(RestoreBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createBackupPlanMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/CreateBackupPlan") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateBackupPlanRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateBackupPlanMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateBackupPlan") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateBackupPlanRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getBackupPlanMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackupPlan") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBackupPlanRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BackupPlan.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listBackupPlansMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackupPlans") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBackupPlansRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupPlansResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteBackupPlanMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteBackupPlan") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteBackupPlanRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getBackupPlanRevisionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackupPlanRevision") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBackupPlanRevisionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(BackupPlanRevision.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListBackupPlanRevisionsRequest, ListBackupPlanRevisionsResponse> + listBackupPlanRevisionsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackupPlanRevisions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBackupPlanRevisionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupPlanRevisionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createBackupPlanAssociationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/CreateBackupPlanAssociation") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateBackupPlanAssociationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateBackupPlanAssociationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/UpdateBackupPlanAssociation") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateBackupPlanAssociationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getBackupPlanAssociationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackupPlanAssociation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBackupPlanAssociationRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BackupPlanAssociation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListBackupPlanAssociationsRequest, ListBackupPlanAssociationsResponse> + listBackupPlanAssociationsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackupPlanAssociations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBackupPlanAssociationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBackupPlanAssociationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/FetchBackupPlanAssociationsForResourceType") + .setRequestMarshaller( + ProtoUtils.marshaller( + FetchBackupPlanAssociationsForResourceTypeRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + FetchBackupPlanAssociationsForResourceTypeResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteBackupPlanAssociationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/DeleteBackupPlanAssociation") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteBackupPlanAssociationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + triggerBackupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/TriggerBackup") + .setRequestMarshaller( + ProtoUtils.marshaller(TriggerBackupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getDataSourceReferenceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetDataSourceReference") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataSourceReferenceRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DataSourceReference.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListDataSourceReferencesRequest, ListDataSourceReferencesResponse> + listDataSourceReferencesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListDataSourceReferences") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataSourceReferencesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataSourceReferencesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/FetchDataSourceReferencesForResourceType") + .setRequestMarshaller( + ProtoUtils.marshaller( + FetchDataSourceReferencesForResourceTypeRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + FetchDataSourceReferencesForResourceTypeResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + initializeServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/InitializeService") + .setRequestMarshaller( + ProtoUtils.marshaller(InitializeServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createAutoProtectionPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/CreateAutoProtectionPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAutoProtectionPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListAutoProtectionPoliciesRequest, ListAutoProtectionPoliciesResponse> + listAutoProtectionPoliciesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListAutoProtectionPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAutoProtectionPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAutoProtectionPoliciesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getAutoProtectionPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetAutoProtectionPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAutoProtectionPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AutoProtectionPolicy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateAutoProtectionPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateAutoProtectionPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAutoProtectionPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteAutoProtectionPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteAutoProtectionPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAutoProtectionPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createAutoProtectionPolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/CreateAutoProtectionPolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller( + CreateAutoProtectionPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + GetAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding> + getAutoProtectionPolicyBindingMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/GetAutoProtectionPolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAutoProtectionPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AutoProtectionPolicyBinding.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/ListAutoProtectionPolicyBindings") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListAutoProtectionPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListAutoProtectionPolicyBindingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/ListAppliedAutoProtectionPolicies") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListAppliedAutoProtectionPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListAppliedAutoProtectionPoliciesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + initiateDeleteAutoProtectionPolicyBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/InitiateDeleteAutoProtectionPolicyBinding") + .setRequestMarshaller( + ProtoUtils.marshaller( + InitiateDeleteAutoProtectionPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getBindingMatchingResourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBindingMatchingResource") + .setRequestMarshaller( + ProtoUtils.marshaller(GetBindingMatchingResourceRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BindingMatchingResource.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesResponse> + listBindingMatchingResourcesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/ListBindingMatchingResources") + .setRequestMarshaller( + ProtoUtils.marshaller(ListBindingMatchingResourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListBindingMatchingResourcesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + listManagementServersCallable; + private final UnaryCallable + listManagementServersPagedCallable; + private final UnaryCallable + getManagementServerCallable; + private final UnaryCallable + createManagementServerCallable; + private final OperationCallable< + CreateManagementServerRequest, ManagementServer, OperationMetadata> + createManagementServerOperationCallable; + private final UnaryCallable + deleteManagementServerCallable; + private final OperationCallable + deleteManagementServerOperationCallable; + private final UnaryCallable createBackupVaultCallable; + private final OperationCallable + createBackupVaultOperationCallable; + private final UnaryCallable + listBackupVaultsCallable; + private final UnaryCallable + listBackupVaultsPagedCallable; + private final UnaryCallable + fetchUsableBackupVaultsCallable; + private final UnaryCallable + fetchUsableBackupVaultsPagedCallable; + private final UnaryCallable getBackupVaultCallable; + private final UnaryCallable updateBackupVaultCallable; + private final OperationCallable + updateBackupVaultOperationCallable; + private final UnaryCallable deleteBackupVaultCallable; + private final OperationCallable + deleteBackupVaultOperationCallable; + private final UnaryCallable + listDataSourcesCallable; + private final UnaryCallable + listDataSourcesPagedCallable; + private final UnaryCallable getDataSourceCallable; + private final UnaryCallable updateDataSourceCallable; + private final OperationCallable + updateDataSourceOperationCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse> + fetchBackupsForResourceTypeCallable; + private final UnaryCallable< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypePagedCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable updateBackupCallable; + private final OperationCallable + updateBackupOperationCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable restoreBackupCallable; + private final OperationCallable + restoreBackupOperationCallable; + private final UnaryCallable createBackupPlanCallable; + private final OperationCallable + createBackupPlanOperationCallable; + private final UnaryCallable updateBackupPlanCallable; + private final OperationCallable + updateBackupPlanOperationCallable; + private final UnaryCallable getBackupPlanCallable; + private final UnaryCallable + listBackupPlansCallable; + private final UnaryCallable + listBackupPlansPagedCallable; + private final UnaryCallable deleteBackupPlanCallable; + private final OperationCallable + deleteBackupPlanOperationCallable; + private final UnaryCallable + getBackupPlanRevisionCallable; + private final UnaryCallable + listBackupPlanRevisionsCallable; + private final UnaryCallable + listBackupPlanRevisionsPagedCallable; + private final UnaryCallable + createBackupPlanAssociationCallable; + private final OperationCallable< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationCallable; + private final UnaryCallable + updateBackupPlanAssociationCallable; + private final OperationCallable< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationCallable; + private final UnaryCallable + getBackupPlanAssociationCallable; + private final UnaryCallable + listBackupPlanAssociationsCallable; + private final UnaryCallable< + ListBackupPlanAssociationsRequest, ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsPagedCallable; + private final UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeCallable; + private final UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypePagedCallable; + private final UnaryCallable + deleteBackupPlanAssociationCallable; + private final OperationCallable + deleteBackupPlanAssociationOperationCallable; + private final UnaryCallable triggerBackupCallable; + private final OperationCallable + triggerBackupOperationCallable; + private final UnaryCallable + getDataSourceReferenceCallable; + private final UnaryCallable + listDataSourceReferencesCallable; + private final UnaryCallable< + ListDataSourceReferencesRequest, ListDataSourceReferencesPagedResponse> + listDataSourceReferencesPagedCallable; + private final UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeCallable; + private final UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypePagedCallable; + private final UnaryCallable initializeServiceCallable; + private final OperationCallable< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationCallable; + private final UnaryCallable + createAutoProtectionPolicyCallable; + private final OperationCallable< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationCallable; + private final UnaryCallable + listAutoProtectionPoliciesCallable; + private final UnaryCallable< + ListAutoProtectionPoliciesRequest, ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesPagedCallable; + private final UnaryCallable + getAutoProtectionPolicyCallable; + private final UnaryCallable + updateAutoProtectionPolicyCallable; + private final OperationCallable< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationCallable; + private final UnaryCallable + deleteAutoProtectionPolicyCallable; + private final OperationCallable + deleteAutoProtectionPolicyOperationCallable; + private final UnaryCallable + createAutoProtectionPolicyBindingCallable; + private final OperationCallable< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationCallable; + private final UnaryCallable + getAutoProtectionPolicyBindingCallable; + private final UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsCallable; + private final UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsPagedCallable; + private final UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesCallable; + private final UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesPagedCallable; + private final UnaryCallable + initiateDeleteAutoProtectionPolicyBindingCallable; + private final OperationCallable< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationCallable; + private final UnaryCallable + getBindingMatchingResourceCallable; + private final UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesResponse> + listBindingMatchingResourcesCallable; + private final UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcBackupDRStub create(BackupDRStubSettings settings) throws IOException { + return new GrpcBackupDRStub(settings, ClientContext.create(settings)); + } + + public static final GrpcBackupDRStub create(ClientContext clientContext) throws IOException { + return new GrpcBackupDRStub(BackupDRStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcBackupDRStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcBackupDRStub( + BackupDRStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcBackupDRStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcBackupDRStub(BackupDRStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcBackupDRCallableFactory()); + } + + /** + * Constructs an instance of GrpcBackupDRStub, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected GrpcBackupDRStub( + BackupDRStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listManagementServersTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listManagementServersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + getManagementServerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getManagementServerMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + createManagementServerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createManagementServerMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + deleteManagementServerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteManagementServerMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createBackupVaultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupVaultMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + listBackupVaultsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBackupVaultsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + fetchUsableBackupVaultsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(fetchUsableBackupVaultsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getBackupVaultTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupVaultMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .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(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listDataSourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataSourcesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getDataSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updateDataSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataSourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_source.name", String.valueOf(request.getDataSource().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(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + fetchBackupsForResourceTypeTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(fetchBackupsForResourceTypeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .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 deleteBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings restoreBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restoreBackupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createBackupPlanTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupPlanMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateBackupPlanTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateBackupPlanMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "backup_plan.name", String.valueOf(request.getBackupPlan().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getBackupPlanTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupPlanMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listBackupPlansTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listBackupPlansMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings deleteBackupPlanTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupPlanMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + getBackupPlanRevisionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupPlanRevisionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listBackupPlanRevisionsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listBackupPlanRevisionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + createBackupPlanAssociationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createBackupPlanAssociationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + updateBackupPlanAssociationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateBackupPlanAssociationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "backup_plan_association.name", + String.valueOf(request.getBackupPlanAssociation().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getBackupPlanAssociationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getBackupPlanAssociationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listBackupPlanAssociationsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listBackupPlanAssociationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(fetchBackupPlanAssociationsForResourceTypeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + deleteBackupPlanAssociationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupPlanAssociationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings triggerBackupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(triggerBackupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + getDataSourceReferenceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataSourceReferenceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listDataSourceReferencesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listDataSourceReferencesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(fetchDataSourceReferencesForResourceTypeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings initializeServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(initializeServiceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createAutoProtectionPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAutoProtectionPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + listAutoProtectionPoliciesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAutoProtectionPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + getAutoProtectionPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAutoProtectionPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + updateAutoProtectionPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAutoProtectionPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "auto_protection_policy.name", + String.valueOf(request.getAutoProtectionPolicy().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteAutoProtectionPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAutoProtectionPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + createAutoProtectionPolicyBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAutoProtectionPolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + getAutoProtectionPolicyBindingTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getAutoProtectionPolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listAutoProtectionPolicyBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listAppliedAutoProtectionPoliciesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + initiateDeleteAutoProtectionPolicyBindingTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(initiateDeleteAutoProtectionPolicyBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + getBindingMatchingResourceTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getBindingMatchingResourceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listBindingMatchingResourcesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listBindingMatchingResourcesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + + this.listManagementServersCallable = + callableFactory.createUnaryCallable( + listManagementServersTransportSettings, + settings.listManagementServersSettings(), + clientContext); + this.listManagementServersPagedCallable = + callableFactory.createPagedCallable( + listManagementServersTransportSettings, + settings.listManagementServersSettings(), + clientContext); + this.getManagementServerCallable = + callableFactory.createUnaryCallable( + getManagementServerTransportSettings, + settings.getManagementServerSettings(), + clientContext); + this.createManagementServerCallable = + callableFactory.createUnaryCallable( + createManagementServerTransportSettings, + settings.createManagementServerSettings(), + clientContext); + this.createManagementServerOperationCallable = + callableFactory.createOperationCallable( + createManagementServerTransportSettings, + settings.createManagementServerOperationSettings(), + clientContext, + operationsStub); + this.deleteManagementServerCallable = + callableFactory.createUnaryCallable( + deleteManagementServerTransportSettings, + settings.deleteManagementServerSettings(), + clientContext); + this.deleteManagementServerOperationCallable = + callableFactory.createOperationCallable( + deleteManagementServerTransportSettings, + settings.deleteManagementServerOperationSettings(), + clientContext, + operationsStub); + this.createBackupVaultCallable = + callableFactory.createUnaryCallable( + createBackupVaultTransportSettings, + settings.createBackupVaultSettings(), + clientContext); + this.createBackupVaultOperationCallable = + callableFactory.createOperationCallable( + createBackupVaultTransportSettings, + settings.createBackupVaultOperationSettings(), + clientContext, + operationsStub); + this.listBackupVaultsCallable = + callableFactory.createUnaryCallable( + listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); + this.listBackupVaultsPagedCallable = + callableFactory.createPagedCallable( + listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); + this.fetchUsableBackupVaultsCallable = + callableFactory.createUnaryCallable( + fetchUsableBackupVaultsTransportSettings, + settings.fetchUsableBackupVaultsSettings(), + clientContext); + this.fetchUsableBackupVaultsPagedCallable = + callableFactory.createPagedCallable( + fetchUsableBackupVaultsTransportSettings, + settings.fetchUsableBackupVaultsSettings(), + clientContext); + this.getBackupVaultCallable = + callableFactory.createUnaryCallable( + getBackupVaultTransportSettings, settings.getBackupVaultSettings(), 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.listDataSourcesCallable = + callableFactory.createUnaryCallable( + listDataSourcesTransportSettings, settings.listDataSourcesSettings(), clientContext); + this.listDataSourcesPagedCallable = + callableFactory.createPagedCallable( + listDataSourcesTransportSettings, settings.listDataSourcesSettings(), clientContext); + this.getDataSourceCallable = + callableFactory.createUnaryCallable( + getDataSourceTransportSettings, settings.getDataSourceSettings(), clientContext); + this.updateDataSourceCallable = + callableFactory.createUnaryCallable( + updateDataSourceTransportSettings, settings.updateDataSourceSettings(), clientContext); + this.updateDataSourceOperationCallable = + callableFactory.createOperationCallable( + updateDataSourceTransportSettings, + settings.updateDataSourceOperationSettings(), + clientContext, + operationsStub); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.fetchBackupsForResourceTypeCallable = + callableFactory.createUnaryCallable( + fetchBackupsForResourceTypeTransportSettings, + settings.fetchBackupsForResourceTypeSettings(), + clientContext); + this.fetchBackupsForResourceTypePagedCallable = + callableFactory.createPagedCallable( + fetchBackupsForResourceTypeTransportSettings, + settings.fetchBackupsForResourceTypeSettings(), + clientContext); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.updateBackupCallable = + callableFactory.createUnaryCallable( + updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); + this.updateBackupOperationCallable = + callableFactory.createOperationCallable( + updateBackupTransportSettings, + settings.updateBackupOperationSettings(), + clientContext, + operationsStub); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + operationsStub); + this.restoreBackupCallable = + callableFactory.createUnaryCallable( + restoreBackupTransportSettings, settings.restoreBackupSettings(), clientContext); + this.restoreBackupOperationCallable = + callableFactory.createOperationCallable( + restoreBackupTransportSettings, + settings.restoreBackupOperationSettings(), + clientContext, + operationsStub); + this.createBackupPlanCallable = + callableFactory.createUnaryCallable( + createBackupPlanTransportSettings, settings.createBackupPlanSettings(), clientContext); + this.createBackupPlanOperationCallable = + callableFactory.createOperationCallable( + createBackupPlanTransportSettings, + settings.createBackupPlanOperationSettings(), + clientContext, + operationsStub); + this.updateBackupPlanCallable = + callableFactory.createUnaryCallable( + updateBackupPlanTransportSettings, settings.updateBackupPlanSettings(), clientContext); + this.updateBackupPlanOperationCallable = + callableFactory.createOperationCallable( + updateBackupPlanTransportSettings, + settings.updateBackupPlanOperationSettings(), + clientContext, + operationsStub); + this.getBackupPlanCallable = + callableFactory.createUnaryCallable( + getBackupPlanTransportSettings, settings.getBackupPlanSettings(), clientContext); + this.listBackupPlansCallable = + callableFactory.createUnaryCallable( + listBackupPlansTransportSettings, settings.listBackupPlansSettings(), clientContext); + this.listBackupPlansPagedCallable = + callableFactory.createPagedCallable( + listBackupPlansTransportSettings, settings.listBackupPlansSettings(), clientContext); + this.deleteBackupPlanCallable = + callableFactory.createUnaryCallable( + deleteBackupPlanTransportSettings, settings.deleteBackupPlanSettings(), clientContext); + this.deleteBackupPlanOperationCallable = + callableFactory.createOperationCallable( + deleteBackupPlanTransportSettings, + settings.deleteBackupPlanOperationSettings(), + clientContext, + operationsStub); + this.getBackupPlanRevisionCallable = + callableFactory.createUnaryCallable( + getBackupPlanRevisionTransportSettings, + settings.getBackupPlanRevisionSettings(), + clientContext); + this.listBackupPlanRevisionsCallable = + callableFactory.createUnaryCallable( + listBackupPlanRevisionsTransportSettings, + settings.listBackupPlanRevisionsSettings(), + clientContext); + this.listBackupPlanRevisionsPagedCallable = + callableFactory.createPagedCallable( + listBackupPlanRevisionsTransportSettings, + settings.listBackupPlanRevisionsSettings(), + clientContext); + this.createBackupPlanAssociationCallable = + callableFactory.createUnaryCallable( + createBackupPlanAssociationTransportSettings, + settings.createBackupPlanAssociationSettings(), + clientContext); + this.createBackupPlanAssociationOperationCallable = + callableFactory.createOperationCallable( + createBackupPlanAssociationTransportSettings, + settings.createBackupPlanAssociationOperationSettings(), + clientContext, + operationsStub); + this.updateBackupPlanAssociationCallable = + callableFactory.createUnaryCallable( + updateBackupPlanAssociationTransportSettings, + settings.updateBackupPlanAssociationSettings(), + clientContext); + this.updateBackupPlanAssociationOperationCallable = + callableFactory.createOperationCallable( + updateBackupPlanAssociationTransportSettings, + settings.updateBackupPlanAssociationOperationSettings(), + clientContext, + operationsStub); + this.getBackupPlanAssociationCallable = + callableFactory.createUnaryCallable( + getBackupPlanAssociationTransportSettings, + settings.getBackupPlanAssociationSettings(), + clientContext); + this.listBackupPlanAssociationsCallable = + callableFactory.createUnaryCallable( + listBackupPlanAssociationsTransportSettings, + settings.listBackupPlanAssociationsSettings(), + clientContext); + this.listBackupPlanAssociationsPagedCallable = + callableFactory.createPagedCallable( + listBackupPlanAssociationsTransportSettings, + settings.listBackupPlanAssociationsSettings(), + clientContext); + this.fetchBackupPlanAssociationsForResourceTypeCallable = + callableFactory.createUnaryCallable( + fetchBackupPlanAssociationsForResourceTypeTransportSettings, + settings.fetchBackupPlanAssociationsForResourceTypeSettings(), + clientContext); + this.fetchBackupPlanAssociationsForResourceTypePagedCallable = + callableFactory.createPagedCallable( + fetchBackupPlanAssociationsForResourceTypeTransportSettings, + settings.fetchBackupPlanAssociationsForResourceTypeSettings(), + clientContext); + this.deleteBackupPlanAssociationCallable = + callableFactory.createUnaryCallable( + deleteBackupPlanAssociationTransportSettings, + settings.deleteBackupPlanAssociationSettings(), + clientContext); + this.deleteBackupPlanAssociationOperationCallable = + callableFactory.createOperationCallable( + deleteBackupPlanAssociationTransportSettings, + settings.deleteBackupPlanAssociationOperationSettings(), + clientContext, + operationsStub); + this.triggerBackupCallable = + callableFactory.createUnaryCallable( + triggerBackupTransportSettings, settings.triggerBackupSettings(), clientContext); + this.triggerBackupOperationCallable = + callableFactory.createOperationCallable( + triggerBackupTransportSettings, + settings.triggerBackupOperationSettings(), + clientContext, + operationsStub); + this.getDataSourceReferenceCallable = + callableFactory.createUnaryCallable( + getDataSourceReferenceTransportSettings, + settings.getDataSourceReferenceSettings(), + clientContext); + this.listDataSourceReferencesCallable = + callableFactory.createUnaryCallable( + listDataSourceReferencesTransportSettings, + settings.listDataSourceReferencesSettings(), + clientContext); + this.listDataSourceReferencesPagedCallable = + callableFactory.createPagedCallable( + listDataSourceReferencesTransportSettings, + settings.listDataSourceReferencesSettings(), + clientContext); + this.fetchDataSourceReferencesForResourceTypeCallable = + callableFactory.createUnaryCallable( + fetchDataSourceReferencesForResourceTypeTransportSettings, + settings.fetchDataSourceReferencesForResourceTypeSettings(), + clientContext); + this.fetchDataSourceReferencesForResourceTypePagedCallable = + callableFactory.createPagedCallable( + fetchDataSourceReferencesForResourceTypeTransportSettings, + settings.fetchDataSourceReferencesForResourceTypeSettings(), + clientContext); + this.initializeServiceCallable = + callableFactory.createUnaryCallable( + initializeServiceTransportSettings, + settings.initializeServiceSettings(), + clientContext); + this.initializeServiceOperationCallable = + callableFactory.createOperationCallable( + initializeServiceTransportSettings, + settings.initializeServiceOperationSettings(), + clientContext, + operationsStub); + this.createAutoProtectionPolicyCallable = + callableFactory.createUnaryCallable( + createAutoProtectionPolicyTransportSettings, + settings.createAutoProtectionPolicySettings(), + clientContext); + this.createAutoProtectionPolicyOperationCallable = + callableFactory.createOperationCallable( + createAutoProtectionPolicyTransportSettings, + settings.createAutoProtectionPolicyOperationSettings(), + clientContext, + operationsStub); + this.listAutoProtectionPoliciesCallable = + callableFactory.createUnaryCallable( + listAutoProtectionPoliciesTransportSettings, + settings.listAutoProtectionPoliciesSettings(), + clientContext); + this.listAutoProtectionPoliciesPagedCallable = + callableFactory.createPagedCallable( + listAutoProtectionPoliciesTransportSettings, + settings.listAutoProtectionPoliciesSettings(), + clientContext); + this.getAutoProtectionPolicyCallable = + callableFactory.createUnaryCallable( + getAutoProtectionPolicyTransportSettings, + settings.getAutoProtectionPolicySettings(), + clientContext); + this.updateAutoProtectionPolicyCallable = + callableFactory.createUnaryCallable( + updateAutoProtectionPolicyTransportSettings, + settings.updateAutoProtectionPolicySettings(), + clientContext); + this.updateAutoProtectionPolicyOperationCallable = + callableFactory.createOperationCallable( + updateAutoProtectionPolicyTransportSettings, + settings.updateAutoProtectionPolicyOperationSettings(), + clientContext, + operationsStub); + this.deleteAutoProtectionPolicyCallable = + callableFactory.createUnaryCallable( + deleteAutoProtectionPolicyTransportSettings, + settings.deleteAutoProtectionPolicySettings(), + clientContext); + this.deleteAutoProtectionPolicyOperationCallable = + callableFactory.createOperationCallable( + deleteAutoProtectionPolicyTransportSettings, + settings.deleteAutoProtectionPolicyOperationSettings(), + clientContext, + operationsStub); + this.createAutoProtectionPolicyBindingCallable = + callableFactory.createUnaryCallable( + createAutoProtectionPolicyBindingTransportSettings, + settings.createAutoProtectionPolicyBindingSettings(), + clientContext); + this.createAutoProtectionPolicyBindingOperationCallable = + callableFactory.createOperationCallable( + createAutoProtectionPolicyBindingTransportSettings, + settings.createAutoProtectionPolicyBindingOperationSettings(), + clientContext, + operationsStub); + this.getAutoProtectionPolicyBindingCallable = + callableFactory.createUnaryCallable( + getAutoProtectionPolicyBindingTransportSettings, + settings.getAutoProtectionPolicyBindingSettings(), + clientContext); + this.listAutoProtectionPolicyBindingsCallable = + callableFactory.createUnaryCallable( + listAutoProtectionPolicyBindingsTransportSettings, + settings.listAutoProtectionPolicyBindingsSettings(), + clientContext); + this.listAutoProtectionPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + listAutoProtectionPolicyBindingsTransportSettings, + settings.listAutoProtectionPolicyBindingsSettings(), + clientContext); + this.listAppliedAutoProtectionPoliciesCallable = + callableFactory.createUnaryCallable( + listAppliedAutoProtectionPoliciesTransportSettings, + settings.listAppliedAutoProtectionPoliciesSettings(), + clientContext); + this.listAppliedAutoProtectionPoliciesPagedCallable = + callableFactory.createPagedCallable( + listAppliedAutoProtectionPoliciesTransportSettings, + settings.listAppliedAutoProtectionPoliciesSettings(), + clientContext); + this.initiateDeleteAutoProtectionPolicyBindingCallable = + callableFactory.createUnaryCallable( + initiateDeleteAutoProtectionPolicyBindingTransportSettings, + settings.initiateDeleteAutoProtectionPolicyBindingSettings(), + clientContext); + this.initiateDeleteAutoProtectionPolicyBindingOperationCallable = + callableFactory.createOperationCallable( + initiateDeleteAutoProtectionPolicyBindingTransportSettings, + settings.initiateDeleteAutoProtectionPolicyBindingOperationSettings(), + clientContext, + operationsStub); + this.getBindingMatchingResourceCallable = + callableFactory.createUnaryCallable( + getBindingMatchingResourceTransportSettings, + settings.getBindingMatchingResourceSettings(), + clientContext); + this.listBindingMatchingResourcesCallable = + callableFactory.createUnaryCallable( + listBindingMatchingResourcesTransportSettings, + settings.listBindingMatchingResourcesSettings(), + clientContext); + this.listBindingMatchingResourcesPagedCallable = + callableFactory.createPagedCallable( + listBindingMatchingResourcesTransportSettings, + settings.listBindingMatchingResourcesSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listManagementServersCallable() { + return listManagementServersCallable; + } + + @Override + public UnaryCallable + listManagementServersPagedCallable() { + return listManagementServersPagedCallable; + } + + @Override + public UnaryCallable getManagementServerCallable() { + return getManagementServerCallable; + } + + @Override + public UnaryCallable createManagementServerCallable() { + return createManagementServerCallable; + } + + @Override + public OperationCallable + createManagementServerOperationCallable() { + return createManagementServerOperationCallable; + } + + @Override + public UnaryCallable deleteManagementServerCallable() { + return deleteManagementServerCallable; + } + + @Override + public OperationCallable + deleteManagementServerOperationCallable() { + return deleteManagementServerOperationCallable; + } + + @Override + public UnaryCallable createBackupVaultCallable() { + return createBackupVaultCallable; + } + + @Override + public OperationCallable + createBackupVaultOperationCallable() { + return createBackupVaultOperationCallable; + } + + @Override + public UnaryCallable + listBackupVaultsCallable() { + return listBackupVaultsCallable; + } + + @Override + public UnaryCallable + listBackupVaultsPagedCallable() { + return listBackupVaultsPagedCallable; + } + + @Override + public UnaryCallable + fetchUsableBackupVaultsCallable() { + return fetchUsableBackupVaultsCallable; + } + + @Override + public UnaryCallable + fetchUsableBackupVaultsPagedCallable() { + return fetchUsableBackupVaultsPagedCallable; + } + + @Override + public UnaryCallable getBackupVaultCallable() { + return getBackupVaultCallable; + } + + @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 listDataSourcesCallable() { + return listDataSourcesCallable; + } + + @Override + public UnaryCallable + listDataSourcesPagedCallable() { + return listDataSourcesPagedCallable; + } + + @Override + public UnaryCallable getDataSourceCallable() { + return getDataSourceCallable; + } + + @Override + public UnaryCallable updateDataSourceCallable() { + return updateDataSourceCallable; + } + + @Override + public OperationCallable + updateDataSourceOperationCallable() { + return updateDataSourceOperationCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable + fetchBackupsForResourceTypeCallable() { + return fetchBackupsForResourceTypeCallable; + } + + @Override + public UnaryCallable + fetchBackupsForResourceTypePagedCallable() { + return fetchBackupsForResourceTypePagedCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable updateBackupCallable() { + return updateBackupCallable; + } + + @Override + public OperationCallable + updateBackupOperationCallable() { + return updateBackupOperationCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable restoreBackupCallable() { + return restoreBackupCallable; + } + + @Override + public OperationCallable + restoreBackupOperationCallable() { + return restoreBackupOperationCallable; + } + + @Override + public UnaryCallable createBackupPlanCallable() { + return createBackupPlanCallable; + } + + @Override + public OperationCallable + createBackupPlanOperationCallable() { + return createBackupPlanOperationCallable; + } + + @Override + public UnaryCallable updateBackupPlanCallable() { + return updateBackupPlanCallable; + } + + @Override + public OperationCallable + updateBackupPlanOperationCallable() { + return updateBackupPlanOperationCallable; + } + + @Override + public UnaryCallable getBackupPlanCallable() { + return getBackupPlanCallable; + } + + @Override + public UnaryCallable listBackupPlansCallable() { + return listBackupPlansCallable; + } + + @Override + public UnaryCallable + listBackupPlansPagedCallable() { + return listBackupPlansPagedCallable; + } + + @Override + public UnaryCallable deleteBackupPlanCallable() { + return deleteBackupPlanCallable; + } + + @Override + public OperationCallable + deleteBackupPlanOperationCallable() { + return deleteBackupPlanOperationCallable; + } + + @Override + public UnaryCallable + getBackupPlanRevisionCallable() { + return getBackupPlanRevisionCallable; + } + + @Override + public UnaryCallable + listBackupPlanRevisionsCallable() { + return listBackupPlanRevisionsCallable; + } + + @Override + public UnaryCallable + listBackupPlanRevisionsPagedCallable() { + return listBackupPlanRevisionsPagedCallable; + } + + @Override + public UnaryCallable + createBackupPlanAssociationCallable() { + return createBackupPlanAssociationCallable; + } + + @Override + public OperationCallable< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationCallable() { + return createBackupPlanAssociationOperationCallable; + } + + @Override + public UnaryCallable + updateBackupPlanAssociationCallable() { + return updateBackupPlanAssociationCallable; + } + + @Override + public OperationCallable< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationCallable() { + return updateBackupPlanAssociationOperationCallable; + } + + @Override + public UnaryCallable + getBackupPlanAssociationCallable() { + return getBackupPlanAssociationCallable; + } + + @Override + public UnaryCallable + listBackupPlanAssociationsCallable() { + return listBackupPlanAssociationsCallable; + } + + @Override + public UnaryCallable + listBackupPlanAssociationsPagedCallable() { + return listBackupPlanAssociationsPagedCallable; + } + + @Override + public UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeCallable() { + return fetchBackupPlanAssociationsForResourceTypeCallable; + } + + @Override + public UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypePagedCallable() { + return fetchBackupPlanAssociationsForResourceTypePagedCallable; + } + + @Override + public UnaryCallable + deleteBackupPlanAssociationCallable() { + return deleteBackupPlanAssociationCallable; + } + + @Override + public OperationCallable + deleteBackupPlanAssociationOperationCallable() { + return deleteBackupPlanAssociationOperationCallable; + } + + @Override + public UnaryCallable triggerBackupCallable() { + return triggerBackupCallable; + } + + @Override + public OperationCallable + triggerBackupOperationCallable() { + return triggerBackupOperationCallable; + } + + @Override + public UnaryCallable + getDataSourceReferenceCallable() { + return getDataSourceReferenceCallable; + } + + @Override + public UnaryCallable + listDataSourceReferencesCallable() { + return listDataSourceReferencesCallable; + } + + @Override + public UnaryCallable + listDataSourceReferencesPagedCallable() { + return listDataSourceReferencesPagedCallable; + } + + @Override + public UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeCallable() { + return fetchDataSourceReferencesForResourceTypeCallable; + } + + @Override + public UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypePagedCallable() { + return fetchDataSourceReferencesForResourceTypePagedCallable; + } + + @Override + public UnaryCallable initializeServiceCallable() { + return initializeServiceCallable; + } + + @Override + public OperationCallable + initializeServiceOperationCallable() { + return initializeServiceOperationCallable; + } + + @Override + public UnaryCallable + createAutoProtectionPolicyCallable() { + return createAutoProtectionPolicyCallable; + } + + @Override + public OperationCallable< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationCallable() { + return createAutoProtectionPolicyOperationCallable; + } + + @Override + public UnaryCallable + listAutoProtectionPoliciesCallable() { + return listAutoProtectionPoliciesCallable; + } + + @Override + public UnaryCallable + listAutoProtectionPoliciesPagedCallable() { + return listAutoProtectionPoliciesPagedCallable; + } + + @Override + public UnaryCallable + getAutoProtectionPolicyCallable() { + return getAutoProtectionPolicyCallable; + } + + @Override + public UnaryCallable + updateAutoProtectionPolicyCallable() { + return updateAutoProtectionPolicyCallable; + } + + @Override + public OperationCallable< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationCallable() { + return updateAutoProtectionPolicyOperationCallable; + } + + @Override + public UnaryCallable + deleteAutoProtectionPolicyCallable() { + return deleteAutoProtectionPolicyCallable; + } + + @Override + public OperationCallable + deleteAutoProtectionPolicyOperationCallable() { + return deleteAutoProtectionPolicyOperationCallable; + } + + @Override + public UnaryCallable + createAutoProtectionPolicyBindingCallable() { + return createAutoProtectionPolicyBindingCallable; + } + + @Override + public OperationCallable< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationCallable() { + return createAutoProtectionPolicyBindingOperationCallable; + } + + @Override + public UnaryCallable + getAutoProtectionPolicyBindingCallable() { + return getAutoProtectionPolicyBindingCallable; + } + + @Override + public UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsCallable() { + return listAutoProtectionPolicyBindingsCallable; + } + + @Override + public UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsPagedCallable() { + return listAutoProtectionPolicyBindingsPagedCallable; + } + + @Override + public UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesCallable() { + return listAppliedAutoProtectionPoliciesCallable; + } + + @Override + public UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesPagedCallable() { + return listAppliedAutoProtectionPoliciesPagedCallable; + } + + @Override + public UnaryCallable + initiateDeleteAutoProtectionPolicyBindingCallable() { + return initiateDeleteAutoProtectionPolicyBindingCallable; + } + + @Override + public OperationCallable< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationCallable() { + return initiateDeleteAutoProtectionPolicyBindingOperationCallable; + } + + @Override + public UnaryCallable + getBindingMatchingResourceCallable() { + return getBindingMatchingResourceCallable; + } + + @Override + public UnaryCallable + listBindingMatchingResourcesCallable() { + return listBindingMatchingResourcesCallable; + } + + @Override + public UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesPagedCallable() { + return listBindingMatchingResourcesPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDrProtectionSummaryCallableFactory.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDrProtectionSummaryCallableFactory.java new file mode 100644 index 000000000000..d47a5684cf58 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDrProtectionSummaryCallableFactory.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the BackupDrProtectionSummary service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcBackupDrProtectionSummaryCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDrProtectionSummaryStub.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDrProtectionSummaryStub.java new file mode 100644 index 000000000000..9ca731b8d122 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/GrpcBackupDrProtectionSummaryStub.java @@ -0,0 +1,370 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListResourceBackupConfigsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the BackupDrProtectionSummary service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcBackupDrProtectionSummaryStub extends BackupDrProtectionSummaryStub { + private static final MethodDescriptor< + ListResourceBackupConfigsRequest, ListResourceBackupConfigsResponse> + listResourceBackupConfigsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDrProtectionSummary/ListResourceBackupConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListResourceBackupConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListResourceBackupConfigsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + listResourceBackupConfigsCallable; + private final UnaryCallable< + ListResourceBackupConfigsRequest, ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcBackupDrProtectionSummaryStub create( + BackupDrProtectionSummaryStubSettings settings) throws IOException { + return new GrpcBackupDrProtectionSummaryStub(settings, ClientContext.create(settings)); + } + + public static final GrpcBackupDrProtectionSummaryStub create(ClientContext clientContext) + throws IOException { + return new GrpcBackupDrProtectionSummaryStub( + BackupDrProtectionSummaryStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcBackupDrProtectionSummaryStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcBackupDrProtectionSummaryStub( + BackupDrProtectionSummaryStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcBackupDrProtectionSummaryStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcBackupDrProtectionSummaryStub( + BackupDrProtectionSummaryStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcBackupDrProtectionSummaryCallableFactory()); + } + + /** + * Constructs an instance of GrpcBackupDrProtectionSummaryStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcBackupDrProtectionSummaryStub( + BackupDrProtectionSummaryStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listResourceBackupConfigsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listResourceBackupConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + + this.listResourceBackupConfigsCallable = + callableFactory.createUnaryCallable( + listResourceBackupConfigsTransportSettings, + settings.listResourceBackupConfigsSettings(), + clientContext); + this.listResourceBackupConfigsPagedCallable = + callableFactory.createPagedCallable( + listResourceBackupConfigsTransportSettings, + settings.listResourceBackupConfigsSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listResourceBackupConfigsCallable() { + return listResourceBackupConfigsCallable; + } + + @Override + public UnaryCallable + listResourceBackupConfigsPagedCallable() { + return listResourceBackupConfigsPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDRCallableFactory.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDRCallableFactory.java new file mode 100644 index 000000000000..ebd9dc3e10e1 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDRCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the BackupDR service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBackupDRCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDRStub.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDRStub.java new file mode 100644 index 000000000000..536b8c9eb52d --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDRStub.java @@ -0,0 +1,4432 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupPlanAssociationsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchDataSourceReferencesForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchUsableBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAppliedAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPolicyBindingsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanAssociationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanRevisionsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlansPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBindingMatchingResourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourceReferencesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListManagementServersPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.CreateManagementServerRequest; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupRequest; +import com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest; +import com.google.cloud.backupdr.v1beta.GetBackupRequest; +import com.google.cloud.backupdr.v1beta.GetBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest; +import com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest; +import com.google.cloud.backupdr.v1beta.GetDataSourceRequest; +import com.google.cloud.backupdr.v1beta.GetManagementServerRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceResponse; +import com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupPlansRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlansResponse; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.ListBackupsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupsResponse; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse; +import com.google.cloud.backupdr.v1beta.ListDataSourcesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourcesResponse; +import com.google.cloud.backupdr.v1beta.ListManagementServersRequest; +import com.google.cloud.backupdr.v1beta.ListManagementServersResponse; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.RestoreBackupRequest; +import com.google.cloud.backupdr.v1beta.RestoreBackupResponse; +import com.google.cloud.backupdr.v1beta.TriggerBackupRequest; +import com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupRequest; +import com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the BackupDR service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBackupDRStub extends BackupDRStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(RestoreBackupResponse.getDescriptor()) + .add(AutoProtectionPolicyBinding.getDescriptor()) + .add(InitializeServiceResponse.getDescriptor()) + .add(BackupPlanAssociation.getDescriptor()) + .add(ManagementServer.getDescriptor()) + .add(Backup.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(BackupVault.getDescriptor()) + .add(AutoProtectionPolicy.getDescriptor()) + .add(DataSource.getDescriptor()) + .add(BackupPlan.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor< + ListManagementServersRequest, ListManagementServersResponse> + listManagementServersMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListManagementServers") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/managementServers", + 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(); + if (request.hasFilter()) { + serializer.putQueryParam(fields, "filter", request.getFilter()); + } + if (request.hasOrderBy()) { + 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(ListManagementServersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getManagementServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetManagementServer") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/managementServers/*}", + 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(ManagementServer.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createManagementServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/CreateManagementServer") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/managementServers", + 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, "managementServerId", request.getManagementServerId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("managementServer", request.getManagementServer(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateManagementServerRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteManagementServerMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteManagementServer") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/managementServers/*}", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteManagementServerRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createBackupVaultMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/CreateBackupVault") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{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, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + 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 + listBackupVaultsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackupVaults") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{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, "view", request.getViewValue()); + 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< + FetchUsableBackupVaultsRequest, FetchUsableBackupVaultsResponse> + fetchUsableBackupVaultsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/FetchUsableBackupVaults") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/backupVaults:fetchUsable", + 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(FetchUsableBackupVaultsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getBackupVaultMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackupVault") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{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, "view", request.getViewValue()); + 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 + updateBackupVaultMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateBackupVault") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{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, "force", request.getForce()); + serializer.putQueryParam( + fields, + "forceUpdateAccessRestriction", + request.getForceUpdateAccessRestriction()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + 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.backupdr.v1beta.BackupDR/DeleteBackupVault") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{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, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam( + fields, + "ignoreBackupPlanReferences", + request.getIgnoreBackupPlanReferences()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + 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 + listDataSourcesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListDataSources") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/backupVaults/*}/dataSources", + 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(ListDataSourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetDataSource") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", + 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(DataSource.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateDataSourceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateDataSource") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{dataSource.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "dataSource.name", request.getDataSource().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataSource", request.getDataSource(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateDataSourceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listBackupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/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, "view", request.getViewValue()); + 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< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse> + fetchBackupsForResourceTypeMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/FetchBackupsForResourceType") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType", + 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, "resourceType", request.getResourceType()); + serializer.putQueryParam(fields, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(FetchBackupsForResourceTypeResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackup") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/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, "view", request.getViewValue()); + 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 + updateBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateBackup") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/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, "requestId", request.getRequestId()); + 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 + deleteBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteBackup") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/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, "requestId", request.getRequestId()); + 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 + restoreBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/RestoreBackup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + 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 -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (RestoreBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createBackupPlanMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/CreateBackupPlan") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/backupPlans", + 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, "backupPlanId", request.getBackupPlanId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backupPlan", request.getBackupPlan(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBackupPlanRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateBackupPlanMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateBackupPlan") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{backupPlan.name=projects/*/locations/*/backupPlans/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "backupPlan.name", request.getBackupPlan().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("backupPlan", request.getBackupPlan(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateBackupPlanRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getBackupPlanMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackupPlan") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupPlans/*}", + 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(BackupPlan.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listBackupPlansMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackupPlans") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/backupPlans", + 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(ListBackupPlansResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteBackupPlanMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteBackupPlan") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupPlans/*}", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBackupPlanRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getBackupPlanRevisionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackupPlanRevision") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupPlans/*/revisions/*}", + 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(BackupPlanRevision.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListBackupPlanRevisionsRequest, ListBackupPlanRevisionsResponse> + listBackupPlanRevisionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackupPlanRevisions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/backupPlans/*}/revisions", + 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, "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(ListBackupPlanRevisionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createBackupPlanAssociationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/CreateBackupPlanAssociation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations", + 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, + "backupPlanAssociationId", + request.getBackupPlanAssociationId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "backupPlanAssociation", + request.getBackupPlanAssociation(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateBackupPlanAssociationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateBackupPlanAssociationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/UpdateBackupPlanAssociation") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{backupPlanAssociation.name=projects/*/locations/*/backupPlanAssociations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "backupPlanAssociation.name", + request.getBackupPlanAssociation().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "backupPlanAssociation", + request.getBackupPlanAssociation(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateBackupPlanAssociationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getBackupPlanAssociationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBackupPlanAssociation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}", + 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(BackupPlanAssociation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListBackupPlanAssociationsRequest, ListBackupPlanAssociationsResponse> + listBackupPlanAssociationsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListBackupPlanAssociations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations", + 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, "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(ListBackupPlanAssociationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/FetchBackupPlanAssociationsForResourceType") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType", + 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, "resourceType", request.getResourceType()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + FetchBackupPlanAssociationsForResourceTypeResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteBackupPlanAssociationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/DeleteBackupPlanAssociation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}", + 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, + "autoProtectionPolicyBinding", + request.getAutoProtectionPolicyBinding()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteBackupPlanAssociationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + triggerBackupMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/TriggerBackup") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + 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 -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (TriggerBackupRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getDataSourceReferenceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetDataSourceReference") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/dataSourceReferences/*}", + 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(DataSourceReference.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListDataSourceReferencesRequest, ListDataSourceReferencesResponse> + listDataSourceReferencesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListDataSourceReferences") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences", + 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(ListDataSourceReferencesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/FetchDataSourceReferencesForResourceType") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType", + 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, "resourceType", request.getResourceType()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + FetchDataSourceReferencesForResourceTypeResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + initializeServiceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/InitializeService") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/serviceConfig}:initialize", + 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 -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (InitializeServiceRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createAutoProtectionPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/CreateAutoProtectionPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies", + 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, + "autoProtectionPolicyId", + request.getAutoProtectionPolicyId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "autoProtectionPolicy", + request.getAutoProtectionPolicy(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateAutoProtectionPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListAutoProtectionPoliciesRequest, ListAutoProtectionPoliciesResponse> + listAutoProtectionPoliciesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/ListAutoProtectionPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies", + 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(ListAutoProtectionPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAutoProtectionPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetAutoProtectionPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}", + 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(AutoProtectionPolicy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateAutoProtectionPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/UpdateAutoProtectionPolicy") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{autoProtectionPolicy.name=projects/*/locations/*/autoProtectionPolicies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "autoProtectionPolicy.name", + request.getAutoProtectionPolicy().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( + "autoProtectionPolicy", + request.getAutoProtectionPolicy(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateAutoProtectionPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteAutoProtectionPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/DeleteAutoProtectionPolicy") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}", + 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, "etag", request.getEtag()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteAutoProtectionPolicyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + createAutoProtectionPolicyBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/CreateAutoProtectionPolicyBinding") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings", + 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, + "autoProtectionPolicyBindingId", + request.getAutoProtectionPolicyBindingId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "autoProtectionPolicyBinding", + request.getAutoProtectionPolicyBinding(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateAutoProtectionPolicyBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + GetAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding> + getAutoProtectionPolicyBindingMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/GetAutoProtectionPolicyBinding") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}", + 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(AutoProtectionPolicyBinding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/ListAutoProtectionPolicyBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings", + 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( + ListAutoProtectionPolicyBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/ListAppliedAutoProtectionPolicies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/appliedAutoProtectionPolicies", + 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( + ListAppliedAutoProtectionPoliciesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + InitiateDeleteAutoProtectionPolicyBindingRequest, Operation> + initiateDeleteAutoProtectionPolicyBindingMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/InitiateDeleteAutoProtectionPolicyBinding") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}:initiateDelete", + 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 -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (InitiateDeleteAutoProtectionPolicyBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + GetBindingMatchingResourceRequest, BindingMatchingResource> + getBindingMatchingResourceMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName("google.cloud.backupdr.v1beta.BackupDR/GetBindingMatchingResource") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*/matchingResources/*}", + 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(BindingMatchingResource.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesResponse> + listBindingMatchingResourcesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDR/ListBindingMatchingResources") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}/matchingResources", + 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(ListBindingMatchingResourcesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*}/locations", + 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(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*}", + 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(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/managementServers/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/managementServers/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + 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(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/managementServers/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + listManagementServersCallable; + private final UnaryCallable + listManagementServersPagedCallable; + private final UnaryCallable + getManagementServerCallable; + private final UnaryCallable + createManagementServerCallable; + private final OperationCallable< + CreateManagementServerRequest, ManagementServer, OperationMetadata> + createManagementServerOperationCallable; + private final UnaryCallable + deleteManagementServerCallable; + private final OperationCallable + deleteManagementServerOperationCallable; + private final UnaryCallable createBackupVaultCallable; + private final OperationCallable + createBackupVaultOperationCallable; + private final UnaryCallable + listBackupVaultsCallable; + private final UnaryCallable + listBackupVaultsPagedCallable; + private final UnaryCallable + fetchUsableBackupVaultsCallable; + private final UnaryCallable + fetchUsableBackupVaultsPagedCallable; + private final UnaryCallable getBackupVaultCallable; + private final UnaryCallable updateBackupVaultCallable; + private final OperationCallable + updateBackupVaultOperationCallable; + private final UnaryCallable deleteBackupVaultCallable; + private final OperationCallable + deleteBackupVaultOperationCallable; + private final UnaryCallable + listDataSourcesCallable; + private final UnaryCallable + listDataSourcesPagedCallable; + private final UnaryCallable getDataSourceCallable; + private final UnaryCallable updateDataSourceCallable; + private final OperationCallable + updateDataSourceOperationCallable; + private final UnaryCallable listBackupsCallable; + private final UnaryCallable + listBackupsPagedCallable; + private final UnaryCallable< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypeResponse> + fetchBackupsForResourceTypeCallable; + private final UnaryCallable< + FetchBackupsForResourceTypeRequest, FetchBackupsForResourceTypePagedResponse> + fetchBackupsForResourceTypePagedCallable; + private final UnaryCallable getBackupCallable; + private final UnaryCallable updateBackupCallable; + private final OperationCallable + updateBackupOperationCallable; + private final UnaryCallable deleteBackupCallable; + private final OperationCallable + deleteBackupOperationCallable; + private final UnaryCallable restoreBackupCallable; + private final OperationCallable + restoreBackupOperationCallable; + private final UnaryCallable createBackupPlanCallable; + private final OperationCallable + createBackupPlanOperationCallable; + private final UnaryCallable updateBackupPlanCallable; + private final OperationCallable + updateBackupPlanOperationCallable; + private final UnaryCallable getBackupPlanCallable; + private final UnaryCallable + listBackupPlansCallable; + private final UnaryCallable + listBackupPlansPagedCallable; + private final UnaryCallable deleteBackupPlanCallable; + private final OperationCallable + deleteBackupPlanOperationCallable; + private final UnaryCallable + getBackupPlanRevisionCallable; + private final UnaryCallable + listBackupPlanRevisionsCallable; + private final UnaryCallable + listBackupPlanRevisionsPagedCallable; + private final UnaryCallable + createBackupPlanAssociationCallable; + private final OperationCallable< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationCallable; + private final UnaryCallable + updateBackupPlanAssociationCallable; + private final OperationCallable< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationCallable; + private final UnaryCallable + getBackupPlanAssociationCallable; + private final UnaryCallable + listBackupPlanAssociationsCallable; + private final UnaryCallable< + ListBackupPlanAssociationsRequest, ListBackupPlanAssociationsPagedResponse> + listBackupPlanAssociationsPagedCallable; + private final UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeCallable; + private final UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypePagedCallable; + private final UnaryCallable + deleteBackupPlanAssociationCallable; + private final OperationCallable + deleteBackupPlanAssociationOperationCallable; + private final UnaryCallable triggerBackupCallable; + private final OperationCallable + triggerBackupOperationCallable; + private final UnaryCallable + getDataSourceReferenceCallable; + private final UnaryCallable + listDataSourceReferencesCallable; + private final UnaryCallable< + ListDataSourceReferencesRequest, ListDataSourceReferencesPagedResponse> + listDataSourceReferencesPagedCallable; + private final UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeCallable; + private final UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypePagedCallable; + private final UnaryCallable initializeServiceCallable; + private final OperationCallable< + InitializeServiceRequest, InitializeServiceResponse, OperationMetadata> + initializeServiceOperationCallable; + private final UnaryCallable + createAutoProtectionPolicyCallable; + private final OperationCallable< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationCallable; + private final UnaryCallable + listAutoProtectionPoliciesCallable; + private final UnaryCallable< + ListAutoProtectionPoliciesRequest, ListAutoProtectionPoliciesPagedResponse> + listAutoProtectionPoliciesPagedCallable; + private final UnaryCallable + getAutoProtectionPolicyCallable; + private final UnaryCallable + updateAutoProtectionPolicyCallable; + private final OperationCallable< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationCallable; + private final UnaryCallable + deleteAutoProtectionPolicyCallable; + private final OperationCallable + deleteAutoProtectionPolicyOperationCallable; + private final UnaryCallable + createAutoProtectionPolicyBindingCallable; + private final OperationCallable< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationCallable; + private final UnaryCallable + getAutoProtectionPolicyBindingCallable; + private final UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsCallable; + private final UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsPagedCallable; + private final UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesCallable; + private final UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesPagedCallable; + private final UnaryCallable + initiateDeleteAutoProtectionPolicyBindingCallable; + private final OperationCallable< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationCallable; + private final UnaryCallable + getBindingMatchingResourceCallable; + private final UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesResponse> + listBindingMatchingResourcesCallable; + private final UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonBackupDRStub create(BackupDRStubSettings settings) + throws IOException { + return new HttpJsonBackupDRStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonBackupDRStub create(ClientContext clientContext) throws IOException { + return new HttpJsonBackupDRStub( + BackupDRStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonBackupDRStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonBackupDRStub( + BackupDRStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonBackupDRStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonBackupDRStub(BackupDRStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonBackupDRCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonBackupDRStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonBackupDRStub( + BackupDRStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1beta/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listManagementServersTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listManagementServersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + getManagementServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getManagementServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + createManagementServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createManagementServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + deleteManagementServerTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteManagementServerMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .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(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .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(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + fetchUsableBackupVaultsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(fetchUsableBackupVaultsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .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(); + }) + .setResourceNameExtractor(request -> request.getName()) + .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(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listDataSourcesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDataSourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getDataSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings updateDataSourceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataSourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_source.name", String.valueOf(request.getDataSource().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(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + fetchBackupsForResourceTypeTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(fetchBackupsForResourceTypeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .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(); + }) + .setResourceNameExtractor(request -> request.getName()) + .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 deleteBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings restoreBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(restoreBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createBackupPlanTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBackupPlanMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateBackupPlanTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateBackupPlanMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "backup_plan.name", String.valueOf(request.getBackupPlan().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getBackupPlanTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBackupPlanMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listBackupPlansTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listBackupPlansMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings deleteBackupPlanTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupPlanMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + getBackupPlanRevisionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getBackupPlanRevisionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listBackupPlanRevisionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listBackupPlanRevisionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + createBackupPlanAssociationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createBackupPlanAssociationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + updateBackupPlanAssociationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateBackupPlanAssociationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "backup_plan_association.name", + String.valueOf(request.getBackupPlanAssociation().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getBackupPlanAssociationTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getBackupPlanAssociationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listBackupPlanAssociationsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listBackupPlanAssociationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(fetchBackupPlanAssociationsForResourceTypeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + deleteBackupPlanAssociationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteBackupPlanAssociationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings triggerBackupTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(triggerBackupMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + getDataSourceReferenceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataSourceReferenceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listDataSourceReferencesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listDataSourceReferencesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(fetchDataSourceReferencesForResourceTypeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings initializeServiceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(initializeServiceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createAutoProtectionPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAutoProtectionPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + listAutoProtectionPoliciesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAutoProtectionPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + getAutoProtectionPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAutoProtectionPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + updateAutoProtectionPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAutoProtectionPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "auto_protection_policy.name", + String.valueOf(request.getAutoProtectionPolicy().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteAutoProtectionPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAutoProtectionPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + createAutoProtectionPolicyBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAutoProtectionPolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + getAutoProtectionPolicyBindingTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getAutoProtectionPolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listAutoProtectionPolicyBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listAppliedAutoProtectionPoliciesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + initiateDeleteAutoProtectionPolicyBindingTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(initiateDeleteAutoProtectionPolicyBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + getBindingMatchingResourceTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getBindingMatchingResourceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listBindingMatchingResourcesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listBindingMatchingResourcesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + + this.listManagementServersCallable = + callableFactory.createUnaryCallable( + listManagementServersTransportSettings, + settings.listManagementServersSettings(), + clientContext); + this.listManagementServersPagedCallable = + callableFactory.createPagedCallable( + listManagementServersTransportSettings, + settings.listManagementServersSettings(), + clientContext); + this.getManagementServerCallable = + callableFactory.createUnaryCallable( + getManagementServerTransportSettings, + settings.getManagementServerSettings(), + clientContext); + this.createManagementServerCallable = + callableFactory.createUnaryCallable( + createManagementServerTransportSettings, + settings.createManagementServerSettings(), + clientContext); + this.createManagementServerOperationCallable = + callableFactory.createOperationCallable( + createManagementServerTransportSettings, + settings.createManagementServerOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteManagementServerCallable = + callableFactory.createUnaryCallable( + deleteManagementServerTransportSettings, + settings.deleteManagementServerSettings(), + clientContext); + this.deleteManagementServerOperationCallable = + callableFactory.createOperationCallable( + deleteManagementServerTransportSettings, + settings.deleteManagementServerOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createBackupVaultCallable = + callableFactory.createUnaryCallable( + createBackupVaultTransportSettings, + settings.createBackupVaultSettings(), + clientContext); + this.createBackupVaultOperationCallable = + callableFactory.createOperationCallable( + createBackupVaultTransportSettings, + settings.createBackupVaultOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listBackupVaultsCallable = + callableFactory.createUnaryCallable( + listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); + this.listBackupVaultsPagedCallable = + callableFactory.createPagedCallable( + listBackupVaultsTransportSettings, settings.listBackupVaultsSettings(), clientContext); + this.fetchUsableBackupVaultsCallable = + callableFactory.createUnaryCallable( + fetchUsableBackupVaultsTransportSettings, + settings.fetchUsableBackupVaultsSettings(), + clientContext); + this.fetchUsableBackupVaultsPagedCallable = + callableFactory.createPagedCallable( + fetchUsableBackupVaultsTransportSettings, + settings.fetchUsableBackupVaultsSettings(), + clientContext); + this.getBackupVaultCallable = + callableFactory.createUnaryCallable( + getBackupVaultTransportSettings, settings.getBackupVaultSettings(), 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.listDataSourcesCallable = + callableFactory.createUnaryCallable( + listDataSourcesTransportSettings, settings.listDataSourcesSettings(), clientContext); + this.listDataSourcesPagedCallable = + callableFactory.createPagedCallable( + listDataSourcesTransportSettings, settings.listDataSourcesSettings(), clientContext); + this.getDataSourceCallable = + callableFactory.createUnaryCallable( + getDataSourceTransportSettings, settings.getDataSourceSettings(), clientContext); + this.updateDataSourceCallable = + callableFactory.createUnaryCallable( + updateDataSourceTransportSettings, settings.updateDataSourceSettings(), clientContext); + this.updateDataSourceOperationCallable = + callableFactory.createOperationCallable( + updateDataSourceTransportSettings, + settings.updateDataSourceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listBackupsCallable = + callableFactory.createUnaryCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.listBackupsPagedCallable = + callableFactory.createPagedCallable( + listBackupsTransportSettings, settings.listBackupsSettings(), clientContext); + this.fetchBackupsForResourceTypeCallable = + callableFactory.createUnaryCallable( + fetchBackupsForResourceTypeTransportSettings, + settings.fetchBackupsForResourceTypeSettings(), + clientContext); + this.fetchBackupsForResourceTypePagedCallable = + callableFactory.createPagedCallable( + fetchBackupsForResourceTypeTransportSettings, + settings.fetchBackupsForResourceTypeSettings(), + clientContext); + this.getBackupCallable = + callableFactory.createUnaryCallable( + getBackupTransportSettings, settings.getBackupSettings(), clientContext); + this.updateBackupCallable = + callableFactory.createUnaryCallable( + updateBackupTransportSettings, settings.updateBackupSettings(), clientContext); + this.updateBackupOperationCallable = + callableFactory.createOperationCallable( + updateBackupTransportSettings, + settings.updateBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteBackupCallable = + callableFactory.createUnaryCallable( + deleteBackupTransportSettings, settings.deleteBackupSettings(), clientContext); + this.deleteBackupOperationCallable = + callableFactory.createOperationCallable( + deleteBackupTransportSettings, + settings.deleteBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.restoreBackupCallable = + callableFactory.createUnaryCallable( + restoreBackupTransportSettings, settings.restoreBackupSettings(), clientContext); + this.restoreBackupOperationCallable = + callableFactory.createOperationCallable( + restoreBackupTransportSettings, + settings.restoreBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createBackupPlanCallable = + callableFactory.createUnaryCallable( + createBackupPlanTransportSettings, settings.createBackupPlanSettings(), clientContext); + this.createBackupPlanOperationCallable = + callableFactory.createOperationCallable( + createBackupPlanTransportSettings, + settings.createBackupPlanOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateBackupPlanCallable = + callableFactory.createUnaryCallable( + updateBackupPlanTransportSettings, settings.updateBackupPlanSettings(), clientContext); + this.updateBackupPlanOperationCallable = + callableFactory.createOperationCallable( + updateBackupPlanTransportSettings, + settings.updateBackupPlanOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getBackupPlanCallable = + callableFactory.createUnaryCallable( + getBackupPlanTransportSettings, settings.getBackupPlanSettings(), clientContext); + this.listBackupPlansCallable = + callableFactory.createUnaryCallable( + listBackupPlansTransportSettings, settings.listBackupPlansSettings(), clientContext); + this.listBackupPlansPagedCallable = + callableFactory.createPagedCallable( + listBackupPlansTransportSettings, settings.listBackupPlansSettings(), clientContext); + this.deleteBackupPlanCallable = + callableFactory.createUnaryCallable( + deleteBackupPlanTransportSettings, settings.deleteBackupPlanSettings(), clientContext); + this.deleteBackupPlanOperationCallable = + callableFactory.createOperationCallable( + deleteBackupPlanTransportSettings, + settings.deleteBackupPlanOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getBackupPlanRevisionCallable = + callableFactory.createUnaryCallable( + getBackupPlanRevisionTransportSettings, + settings.getBackupPlanRevisionSettings(), + clientContext); + this.listBackupPlanRevisionsCallable = + callableFactory.createUnaryCallable( + listBackupPlanRevisionsTransportSettings, + settings.listBackupPlanRevisionsSettings(), + clientContext); + this.listBackupPlanRevisionsPagedCallable = + callableFactory.createPagedCallable( + listBackupPlanRevisionsTransportSettings, + settings.listBackupPlanRevisionsSettings(), + clientContext); + this.createBackupPlanAssociationCallable = + callableFactory.createUnaryCallable( + createBackupPlanAssociationTransportSettings, + settings.createBackupPlanAssociationSettings(), + clientContext); + this.createBackupPlanAssociationOperationCallable = + callableFactory.createOperationCallable( + createBackupPlanAssociationTransportSettings, + settings.createBackupPlanAssociationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateBackupPlanAssociationCallable = + callableFactory.createUnaryCallable( + updateBackupPlanAssociationTransportSettings, + settings.updateBackupPlanAssociationSettings(), + clientContext); + this.updateBackupPlanAssociationOperationCallable = + callableFactory.createOperationCallable( + updateBackupPlanAssociationTransportSettings, + settings.updateBackupPlanAssociationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getBackupPlanAssociationCallable = + callableFactory.createUnaryCallable( + getBackupPlanAssociationTransportSettings, + settings.getBackupPlanAssociationSettings(), + clientContext); + this.listBackupPlanAssociationsCallable = + callableFactory.createUnaryCallable( + listBackupPlanAssociationsTransportSettings, + settings.listBackupPlanAssociationsSettings(), + clientContext); + this.listBackupPlanAssociationsPagedCallable = + callableFactory.createPagedCallable( + listBackupPlanAssociationsTransportSettings, + settings.listBackupPlanAssociationsSettings(), + clientContext); + this.fetchBackupPlanAssociationsForResourceTypeCallable = + callableFactory.createUnaryCallable( + fetchBackupPlanAssociationsForResourceTypeTransportSettings, + settings.fetchBackupPlanAssociationsForResourceTypeSettings(), + clientContext); + this.fetchBackupPlanAssociationsForResourceTypePagedCallable = + callableFactory.createPagedCallable( + fetchBackupPlanAssociationsForResourceTypeTransportSettings, + settings.fetchBackupPlanAssociationsForResourceTypeSettings(), + clientContext); + this.deleteBackupPlanAssociationCallable = + callableFactory.createUnaryCallable( + deleteBackupPlanAssociationTransportSettings, + settings.deleteBackupPlanAssociationSettings(), + clientContext); + this.deleteBackupPlanAssociationOperationCallable = + callableFactory.createOperationCallable( + deleteBackupPlanAssociationTransportSettings, + settings.deleteBackupPlanAssociationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.triggerBackupCallable = + callableFactory.createUnaryCallable( + triggerBackupTransportSettings, settings.triggerBackupSettings(), clientContext); + this.triggerBackupOperationCallable = + callableFactory.createOperationCallable( + triggerBackupTransportSettings, + settings.triggerBackupOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getDataSourceReferenceCallable = + callableFactory.createUnaryCallable( + getDataSourceReferenceTransportSettings, + settings.getDataSourceReferenceSettings(), + clientContext); + this.listDataSourceReferencesCallable = + callableFactory.createUnaryCallable( + listDataSourceReferencesTransportSettings, + settings.listDataSourceReferencesSettings(), + clientContext); + this.listDataSourceReferencesPagedCallable = + callableFactory.createPagedCallable( + listDataSourceReferencesTransportSettings, + settings.listDataSourceReferencesSettings(), + clientContext); + this.fetchDataSourceReferencesForResourceTypeCallable = + callableFactory.createUnaryCallable( + fetchDataSourceReferencesForResourceTypeTransportSettings, + settings.fetchDataSourceReferencesForResourceTypeSettings(), + clientContext); + this.fetchDataSourceReferencesForResourceTypePagedCallable = + callableFactory.createPagedCallable( + fetchDataSourceReferencesForResourceTypeTransportSettings, + settings.fetchDataSourceReferencesForResourceTypeSettings(), + clientContext); + this.initializeServiceCallable = + callableFactory.createUnaryCallable( + initializeServiceTransportSettings, + settings.initializeServiceSettings(), + clientContext); + this.initializeServiceOperationCallable = + callableFactory.createOperationCallable( + initializeServiceTransportSettings, + settings.initializeServiceOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createAutoProtectionPolicyCallable = + callableFactory.createUnaryCallable( + createAutoProtectionPolicyTransportSettings, + settings.createAutoProtectionPolicySettings(), + clientContext); + this.createAutoProtectionPolicyOperationCallable = + callableFactory.createOperationCallable( + createAutoProtectionPolicyTransportSettings, + settings.createAutoProtectionPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listAutoProtectionPoliciesCallable = + callableFactory.createUnaryCallable( + listAutoProtectionPoliciesTransportSettings, + settings.listAutoProtectionPoliciesSettings(), + clientContext); + this.listAutoProtectionPoliciesPagedCallable = + callableFactory.createPagedCallable( + listAutoProtectionPoliciesTransportSettings, + settings.listAutoProtectionPoliciesSettings(), + clientContext); + this.getAutoProtectionPolicyCallable = + callableFactory.createUnaryCallable( + getAutoProtectionPolicyTransportSettings, + settings.getAutoProtectionPolicySettings(), + clientContext); + this.updateAutoProtectionPolicyCallable = + callableFactory.createUnaryCallable( + updateAutoProtectionPolicyTransportSettings, + settings.updateAutoProtectionPolicySettings(), + clientContext); + this.updateAutoProtectionPolicyOperationCallable = + callableFactory.createOperationCallable( + updateAutoProtectionPolicyTransportSettings, + settings.updateAutoProtectionPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteAutoProtectionPolicyCallable = + callableFactory.createUnaryCallable( + deleteAutoProtectionPolicyTransportSettings, + settings.deleteAutoProtectionPolicySettings(), + clientContext); + this.deleteAutoProtectionPolicyOperationCallable = + callableFactory.createOperationCallable( + deleteAutoProtectionPolicyTransportSettings, + settings.deleteAutoProtectionPolicyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.createAutoProtectionPolicyBindingCallable = + callableFactory.createUnaryCallable( + createAutoProtectionPolicyBindingTransportSettings, + settings.createAutoProtectionPolicyBindingSettings(), + clientContext); + this.createAutoProtectionPolicyBindingOperationCallable = + callableFactory.createOperationCallable( + createAutoProtectionPolicyBindingTransportSettings, + settings.createAutoProtectionPolicyBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getAutoProtectionPolicyBindingCallable = + callableFactory.createUnaryCallable( + getAutoProtectionPolicyBindingTransportSettings, + settings.getAutoProtectionPolicyBindingSettings(), + clientContext); + this.listAutoProtectionPolicyBindingsCallable = + callableFactory.createUnaryCallable( + listAutoProtectionPolicyBindingsTransportSettings, + settings.listAutoProtectionPolicyBindingsSettings(), + clientContext); + this.listAutoProtectionPolicyBindingsPagedCallable = + callableFactory.createPagedCallable( + listAutoProtectionPolicyBindingsTransportSettings, + settings.listAutoProtectionPolicyBindingsSettings(), + clientContext); + this.listAppliedAutoProtectionPoliciesCallable = + callableFactory.createUnaryCallable( + listAppliedAutoProtectionPoliciesTransportSettings, + settings.listAppliedAutoProtectionPoliciesSettings(), + clientContext); + this.listAppliedAutoProtectionPoliciesPagedCallable = + callableFactory.createPagedCallable( + listAppliedAutoProtectionPoliciesTransportSettings, + settings.listAppliedAutoProtectionPoliciesSettings(), + clientContext); + this.initiateDeleteAutoProtectionPolicyBindingCallable = + callableFactory.createUnaryCallable( + initiateDeleteAutoProtectionPolicyBindingTransportSettings, + settings.initiateDeleteAutoProtectionPolicyBindingSettings(), + clientContext); + this.initiateDeleteAutoProtectionPolicyBindingOperationCallable = + callableFactory.createOperationCallable( + initiateDeleteAutoProtectionPolicyBindingTransportSettings, + settings.initiateDeleteAutoProtectionPolicyBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getBindingMatchingResourceCallable = + callableFactory.createUnaryCallable( + getBindingMatchingResourceTransportSettings, + settings.getBindingMatchingResourceSettings(), + clientContext); + this.listBindingMatchingResourcesCallable = + callableFactory.createUnaryCallable( + listBindingMatchingResourcesTransportSettings, + settings.listBindingMatchingResourcesSettings(), + clientContext); + this.listBindingMatchingResourcesPagedCallable = + callableFactory.createPagedCallable( + listBindingMatchingResourcesTransportSettings, + settings.listBindingMatchingResourcesSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listManagementServersMethodDescriptor); + methodDescriptors.add(getManagementServerMethodDescriptor); + methodDescriptors.add(createManagementServerMethodDescriptor); + methodDescriptors.add(deleteManagementServerMethodDescriptor); + methodDescriptors.add(createBackupVaultMethodDescriptor); + methodDescriptors.add(listBackupVaultsMethodDescriptor); + methodDescriptors.add(fetchUsableBackupVaultsMethodDescriptor); + methodDescriptors.add(getBackupVaultMethodDescriptor); + methodDescriptors.add(updateBackupVaultMethodDescriptor); + methodDescriptors.add(deleteBackupVaultMethodDescriptor); + methodDescriptors.add(listDataSourcesMethodDescriptor); + methodDescriptors.add(getDataSourceMethodDescriptor); + methodDescriptors.add(updateDataSourceMethodDescriptor); + methodDescriptors.add(listBackupsMethodDescriptor); + methodDescriptors.add(fetchBackupsForResourceTypeMethodDescriptor); + methodDescriptors.add(getBackupMethodDescriptor); + methodDescriptors.add(updateBackupMethodDescriptor); + methodDescriptors.add(deleteBackupMethodDescriptor); + methodDescriptors.add(restoreBackupMethodDescriptor); + methodDescriptors.add(createBackupPlanMethodDescriptor); + methodDescriptors.add(updateBackupPlanMethodDescriptor); + methodDescriptors.add(getBackupPlanMethodDescriptor); + methodDescriptors.add(listBackupPlansMethodDescriptor); + methodDescriptors.add(deleteBackupPlanMethodDescriptor); + methodDescriptors.add(getBackupPlanRevisionMethodDescriptor); + methodDescriptors.add(listBackupPlanRevisionsMethodDescriptor); + methodDescriptors.add(createBackupPlanAssociationMethodDescriptor); + methodDescriptors.add(updateBackupPlanAssociationMethodDescriptor); + methodDescriptors.add(getBackupPlanAssociationMethodDescriptor); + methodDescriptors.add(listBackupPlanAssociationsMethodDescriptor); + methodDescriptors.add(fetchBackupPlanAssociationsForResourceTypeMethodDescriptor); + methodDescriptors.add(deleteBackupPlanAssociationMethodDescriptor); + methodDescriptors.add(triggerBackupMethodDescriptor); + methodDescriptors.add(getDataSourceReferenceMethodDescriptor); + methodDescriptors.add(listDataSourceReferencesMethodDescriptor); + methodDescriptors.add(fetchDataSourceReferencesForResourceTypeMethodDescriptor); + methodDescriptors.add(initializeServiceMethodDescriptor); + methodDescriptors.add(createAutoProtectionPolicyMethodDescriptor); + methodDescriptors.add(listAutoProtectionPoliciesMethodDescriptor); + methodDescriptors.add(getAutoProtectionPolicyMethodDescriptor); + methodDescriptors.add(updateAutoProtectionPolicyMethodDescriptor); + methodDescriptors.add(deleteAutoProtectionPolicyMethodDescriptor); + methodDescriptors.add(createAutoProtectionPolicyBindingMethodDescriptor); + methodDescriptors.add(getAutoProtectionPolicyBindingMethodDescriptor); + methodDescriptors.add(listAutoProtectionPolicyBindingsMethodDescriptor); + methodDescriptors.add(listAppliedAutoProtectionPoliciesMethodDescriptor); + methodDescriptors.add(initiateDeleteAutoProtectionPolicyBindingMethodDescriptor); + methodDescriptors.add(getBindingMatchingResourceMethodDescriptor); + methodDescriptors.add(listBindingMatchingResourcesMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + listManagementServersCallable() { + return listManagementServersCallable; + } + + @Override + public UnaryCallable + listManagementServersPagedCallable() { + return listManagementServersPagedCallable; + } + + @Override + public UnaryCallable getManagementServerCallable() { + return getManagementServerCallable; + } + + @Override + public UnaryCallable createManagementServerCallable() { + return createManagementServerCallable; + } + + @Override + public OperationCallable + createManagementServerOperationCallable() { + return createManagementServerOperationCallable; + } + + @Override + public UnaryCallable deleteManagementServerCallable() { + return deleteManagementServerCallable; + } + + @Override + public OperationCallable + deleteManagementServerOperationCallable() { + return deleteManagementServerOperationCallable; + } + + @Override + public UnaryCallable createBackupVaultCallable() { + return createBackupVaultCallable; + } + + @Override + public OperationCallable + createBackupVaultOperationCallable() { + return createBackupVaultOperationCallable; + } + + @Override + public UnaryCallable + listBackupVaultsCallable() { + return listBackupVaultsCallable; + } + + @Override + public UnaryCallable + listBackupVaultsPagedCallable() { + return listBackupVaultsPagedCallable; + } + + @Override + public UnaryCallable + fetchUsableBackupVaultsCallable() { + return fetchUsableBackupVaultsCallable; + } + + @Override + public UnaryCallable + fetchUsableBackupVaultsPagedCallable() { + return fetchUsableBackupVaultsPagedCallable; + } + + @Override + public UnaryCallable getBackupVaultCallable() { + return getBackupVaultCallable; + } + + @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 listDataSourcesCallable() { + return listDataSourcesCallable; + } + + @Override + public UnaryCallable + listDataSourcesPagedCallable() { + return listDataSourcesPagedCallable; + } + + @Override + public UnaryCallable getDataSourceCallable() { + return getDataSourceCallable; + } + + @Override + public UnaryCallable updateDataSourceCallable() { + return updateDataSourceCallable; + } + + @Override + public OperationCallable + updateDataSourceOperationCallable() { + return updateDataSourceOperationCallable; + } + + @Override + public UnaryCallable listBackupsCallable() { + return listBackupsCallable; + } + + @Override + public UnaryCallable listBackupsPagedCallable() { + return listBackupsPagedCallable; + } + + @Override + public UnaryCallable + fetchBackupsForResourceTypeCallable() { + return fetchBackupsForResourceTypeCallable; + } + + @Override + public UnaryCallable + fetchBackupsForResourceTypePagedCallable() { + return fetchBackupsForResourceTypePagedCallable; + } + + @Override + public UnaryCallable getBackupCallable() { + return getBackupCallable; + } + + @Override + public UnaryCallable updateBackupCallable() { + return updateBackupCallable; + } + + @Override + public OperationCallable + updateBackupOperationCallable() { + return updateBackupOperationCallable; + } + + @Override + public UnaryCallable deleteBackupCallable() { + return deleteBackupCallable; + } + + @Override + public OperationCallable + deleteBackupOperationCallable() { + return deleteBackupOperationCallable; + } + + @Override + public UnaryCallable restoreBackupCallable() { + return restoreBackupCallable; + } + + @Override + public OperationCallable + restoreBackupOperationCallable() { + return restoreBackupOperationCallable; + } + + @Override + public UnaryCallable createBackupPlanCallable() { + return createBackupPlanCallable; + } + + @Override + public OperationCallable + createBackupPlanOperationCallable() { + return createBackupPlanOperationCallable; + } + + @Override + public UnaryCallable updateBackupPlanCallable() { + return updateBackupPlanCallable; + } + + @Override + public OperationCallable + updateBackupPlanOperationCallable() { + return updateBackupPlanOperationCallable; + } + + @Override + public UnaryCallable getBackupPlanCallable() { + return getBackupPlanCallable; + } + + @Override + public UnaryCallable listBackupPlansCallable() { + return listBackupPlansCallable; + } + + @Override + public UnaryCallable + listBackupPlansPagedCallable() { + return listBackupPlansPagedCallable; + } + + @Override + public UnaryCallable deleteBackupPlanCallable() { + return deleteBackupPlanCallable; + } + + @Override + public OperationCallable + deleteBackupPlanOperationCallable() { + return deleteBackupPlanOperationCallable; + } + + @Override + public UnaryCallable + getBackupPlanRevisionCallable() { + return getBackupPlanRevisionCallable; + } + + @Override + public UnaryCallable + listBackupPlanRevisionsCallable() { + return listBackupPlanRevisionsCallable; + } + + @Override + public UnaryCallable + listBackupPlanRevisionsPagedCallable() { + return listBackupPlanRevisionsPagedCallable; + } + + @Override + public UnaryCallable + createBackupPlanAssociationCallable() { + return createBackupPlanAssociationCallable; + } + + @Override + public OperationCallable< + CreateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + createBackupPlanAssociationOperationCallable() { + return createBackupPlanAssociationOperationCallable; + } + + @Override + public UnaryCallable + updateBackupPlanAssociationCallable() { + return updateBackupPlanAssociationCallable; + } + + @Override + public OperationCallable< + UpdateBackupPlanAssociationRequest, BackupPlanAssociation, OperationMetadata> + updateBackupPlanAssociationOperationCallable() { + return updateBackupPlanAssociationOperationCallable; + } + + @Override + public UnaryCallable + getBackupPlanAssociationCallable() { + return getBackupPlanAssociationCallable; + } + + @Override + public UnaryCallable + listBackupPlanAssociationsCallable() { + return listBackupPlanAssociationsCallable; + } + + @Override + public UnaryCallable + listBackupPlanAssociationsPagedCallable() { + return listBackupPlanAssociationsPagedCallable; + } + + @Override + public UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceTypeCallable() { + return fetchBackupPlanAssociationsForResourceTypeCallable; + } + + @Override + public UnaryCallable< + FetchBackupPlanAssociationsForResourceTypeRequest, + FetchBackupPlanAssociationsForResourceTypePagedResponse> + fetchBackupPlanAssociationsForResourceTypePagedCallable() { + return fetchBackupPlanAssociationsForResourceTypePagedCallable; + } + + @Override + public UnaryCallable + deleteBackupPlanAssociationCallable() { + return deleteBackupPlanAssociationCallable; + } + + @Override + public OperationCallable + deleteBackupPlanAssociationOperationCallable() { + return deleteBackupPlanAssociationOperationCallable; + } + + @Override + public UnaryCallable triggerBackupCallable() { + return triggerBackupCallable; + } + + @Override + public OperationCallable + triggerBackupOperationCallable() { + return triggerBackupOperationCallable; + } + + @Override + public UnaryCallable + getDataSourceReferenceCallable() { + return getDataSourceReferenceCallable; + } + + @Override + public UnaryCallable + listDataSourceReferencesCallable() { + return listDataSourceReferencesCallable; + } + + @Override + public UnaryCallable + listDataSourceReferencesPagedCallable() { + return listDataSourceReferencesPagedCallable; + } + + @Override + public UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceTypeCallable() { + return fetchDataSourceReferencesForResourceTypeCallable; + } + + @Override + public UnaryCallable< + FetchDataSourceReferencesForResourceTypeRequest, + FetchDataSourceReferencesForResourceTypePagedResponse> + fetchDataSourceReferencesForResourceTypePagedCallable() { + return fetchDataSourceReferencesForResourceTypePagedCallable; + } + + @Override + public UnaryCallable initializeServiceCallable() { + return initializeServiceCallable; + } + + @Override + public OperationCallable + initializeServiceOperationCallable() { + return initializeServiceOperationCallable; + } + + @Override + public UnaryCallable + createAutoProtectionPolicyCallable() { + return createAutoProtectionPolicyCallable; + } + + @Override + public OperationCallable< + CreateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + createAutoProtectionPolicyOperationCallable() { + return createAutoProtectionPolicyOperationCallable; + } + + @Override + public UnaryCallable + listAutoProtectionPoliciesCallable() { + return listAutoProtectionPoliciesCallable; + } + + @Override + public UnaryCallable + listAutoProtectionPoliciesPagedCallable() { + return listAutoProtectionPoliciesPagedCallable; + } + + @Override + public UnaryCallable + getAutoProtectionPolicyCallable() { + return getAutoProtectionPolicyCallable; + } + + @Override + public UnaryCallable + updateAutoProtectionPolicyCallable() { + return updateAutoProtectionPolicyCallable; + } + + @Override + public OperationCallable< + UpdateAutoProtectionPolicyRequest, AutoProtectionPolicy, OperationMetadata> + updateAutoProtectionPolicyOperationCallable() { + return updateAutoProtectionPolicyOperationCallable; + } + + @Override + public UnaryCallable + deleteAutoProtectionPolicyCallable() { + return deleteAutoProtectionPolicyCallable; + } + + @Override + public OperationCallable + deleteAutoProtectionPolicyOperationCallable() { + return deleteAutoProtectionPolicyOperationCallable; + } + + @Override + public UnaryCallable + createAutoProtectionPolicyBindingCallable() { + return createAutoProtectionPolicyBindingCallable; + } + + @Override + public OperationCallable< + CreateAutoProtectionPolicyBindingRequest, AutoProtectionPolicyBinding, OperationMetadata> + createAutoProtectionPolicyBindingOperationCallable() { + return createAutoProtectionPolicyBindingOperationCallable; + } + + @Override + public UnaryCallable + getAutoProtectionPolicyBindingCallable() { + return getAutoProtectionPolicyBindingCallable; + } + + @Override + public UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindingsCallable() { + return listAutoProtectionPolicyBindingsCallable; + } + + @Override + public UnaryCallable< + ListAutoProtectionPolicyBindingsRequest, ListAutoProtectionPolicyBindingsPagedResponse> + listAutoProtectionPolicyBindingsPagedCallable() { + return listAutoProtectionPolicyBindingsPagedCallable; + } + + @Override + public UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPoliciesCallable() { + return listAppliedAutoProtectionPoliciesCallable; + } + + @Override + public UnaryCallable< + ListAppliedAutoProtectionPoliciesRequest, ListAppliedAutoProtectionPoliciesPagedResponse> + listAppliedAutoProtectionPoliciesPagedCallable() { + return listAppliedAutoProtectionPoliciesPagedCallable; + } + + @Override + public UnaryCallable + initiateDeleteAutoProtectionPolicyBindingCallable() { + return initiateDeleteAutoProtectionPolicyBindingCallable; + } + + @Override + public OperationCallable< + InitiateDeleteAutoProtectionPolicyBindingRequest, + AutoProtectionPolicyBinding, + OperationMetadata> + initiateDeleteAutoProtectionPolicyBindingOperationCallable() { + return initiateDeleteAutoProtectionPolicyBindingOperationCallable; + } + + @Override + public UnaryCallable + getBindingMatchingResourceCallable() { + return getBindingMatchingResourceCallable; + } + + @Override + public UnaryCallable + listBindingMatchingResourcesCallable() { + return listBindingMatchingResourcesCallable; + } + + @Override + public UnaryCallable< + ListBindingMatchingResourcesRequest, ListBindingMatchingResourcesPagedResponse> + listBindingMatchingResourcesPagedCallable() { + return listBindingMatchingResourcesPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDrProtectionSummaryCallableFactory.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDrProtectionSummaryCallableFactory.java new file mode 100644 index 000000000000..ab8d6c9257bf --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDrProtectionSummaryCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the BackupDrProtectionSummary service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBackupDrProtectionSummaryCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDrProtectionSummaryStub.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDrProtectionSummaryStub.java new file mode 100644 index 000000000000..38586855ee3e --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/HttpJsonBackupDrProtectionSummaryStub.java @@ -0,0 +1,545 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListResourceBackupConfigsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the BackupDrProtectionSummary service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBackupDrProtectionSummaryStub extends BackupDrProtectionSummaryStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor< + ListResourceBackupConfigsRequest, ListResourceBackupConfigsResponse> + listResourceBackupConfigsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.backupdr.v1beta.BackupDrProtectionSummary/ListResourceBackupConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/resourceBackupConfigs", + 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(ListResourceBackupConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*}/locations", + 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(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*}", + 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(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/managementServers/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/managementServers/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + 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(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/managementServers/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + listResourceBackupConfigsCallable; + private final UnaryCallable< + ListResourceBackupConfigsRequest, ListResourceBackupConfigsPagedResponse> + listResourceBackupConfigsPagedCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonBackupDrProtectionSummaryStub create( + BackupDrProtectionSummaryStubSettings settings) throws IOException { + return new HttpJsonBackupDrProtectionSummaryStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonBackupDrProtectionSummaryStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonBackupDrProtectionSummaryStub( + BackupDrProtectionSummaryStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonBackupDrProtectionSummaryStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonBackupDrProtectionSummaryStub( + BackupDrProtectionSummaryStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonBackupDrProtectionSummaryStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonBackupDrProtectionSummaryStub( + BackupDrProtectionSummaryStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonBackupDrProtectionSummaryCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonBackupDrProtectionSummaryStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonBackupDrProtectionSummaryStub( + BackupDrProtectionSummaryStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + listResourceBackupConfigsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listResourceBackupConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + + this.listResourceBackupConfigsCallable = + callableFactory.createUnaryCallable( + listResourceBackupConfigsTransportSettings, + settings.listResourceBackupConfigsSettings(), + clientContext); + this.listResourceBackupConfigsPagedCallable = + callableFactory.createPagedCallable( + listResourceBackupConfigsTransportSettings, + settings.listResourceBackupConfigsSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listResourceBackupConfigsMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + listResourceBackupConfigsCallable() { + return listResourceBackupConfigsCallable; + } + + @Override + public UnaryCallable + listResourceBackupConfigsPagedCallable() { + return listResourceBackupConfigsPagedCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/Version.java b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/Version.java new file mode 100644 index 000000000000..2343e4a3aecf --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/java/com/google/cloud/backupdr/v1beta/stub/Version.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-backupdr:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-backupdr/google-cloud-backupdr/src/main/resources/META-INF/native-image/com.google.cloud.backupdr.v1beta/reflect-config.json b/java-backupdr/google-cloud-backupdr/src/main/resources/META-INF/native-image/com.google.cloud.backupdr.v1beta/reflect-config.json new file mode 100644 index 000000000000..41e2ff2a4211 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/main/resources/META-INF/native-image/com.google.cloud.backupdr.v1beta/reflect-config.json @@ -0,0 +1,5492 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AcceleratorConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AcceleratorConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AccessConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AccessConfig$AccessType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AccessConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AccessConfig$NetworkTier", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AliasIpRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AliasIpRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AllocationAffinity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AllocationAffinity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AllocationAffinity$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AttachedDisk", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AttachedDisk$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AttachedDisk$DiskInterface", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AttachedDisk$DiskMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AttachedDisk$DiskSavedState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AttachedDisk$DiskType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AttachedDisk$InitializeParams", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AttachedDisk$InitializeParams$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionDetails$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionPolicy$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Backup", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Backup$BackupType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Backup$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Backup$GCPBackupPlanInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Backup$GCPBackupPlanInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Backup$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupConfigDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupConfigDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupConfigDetails$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupConfigDetails$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupConfigInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupConfigInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupConfigInfo$LastBackupState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupConfigState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupDrPlanConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupDrPlanConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupDrPlanRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupDrPlanRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupGcpResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupGcpResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupLocation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupLocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupLocation$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupLock", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupLock$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlan", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlan$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlan$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlanAssociation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlanAssociation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlanAssociation$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlanDetail", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlanDetail$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlanRevision", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlanRevision$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupPlanRevision$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupVault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupVault$AccessRestriction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupVault$BackupRetentionInheritance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupVault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupVault$EncryptionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupVault$EncryptionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupVault$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupVaultView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupWindow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BackupWindow$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BindingEvaluationSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BindingEvaluationSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BindingMatchingResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BindingMatchingResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BindingSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.BindingSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties$InstancePrivateIpv6GoogleAccess", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateManagementServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CreateManagementServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Criteria", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Criteria$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CustomerEncryptionKey", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.CustomerEncryptionKey$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSource$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceGcpResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceGcpResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DataSourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskBackupProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskBackupProperties$Architecture", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskBackupProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskDataSourceProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskDataSourceProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskRestoreProperties", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskRestoreProperties$AccessMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskRestoreProperties$Architecture", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskRestoreProperties$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskTargetEnvironment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DiskTargetEnvironment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DisplayDevice", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.DisplayDevice$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Entry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Entry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GcpBackupConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GcpBackupConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GcpResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GcpResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupPlanRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupPlanRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupVaultRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBackupVaultRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetDataSourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetDataSourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetManagementServerRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GetManagementServerRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GuestOsFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GuestOsFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.GuestOsFeature$FeatureType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.InitializeServiceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.InitializeServiceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.InitializeServiceResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.InitializeServiceResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.InstanceParams", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.InstanceParams$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.KeyRevocationActionType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.KeyValuePair", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.KeyValuePair$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlansRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlansRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlansResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupPlansResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBackupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListDataSourcesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListDataSourcesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListDataSourcesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListDataSourcesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListManagementServersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListManagementServersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListManagementServersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListManagementServersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ManagementServer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ManagementServer$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ManagementServer$InstanceState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ManagementServer$InstanceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ManagementURI", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ManagementURI$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.MatchingCondition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.MatchingCondition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Metadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Metadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkConfig$PeeringMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkInterface", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkInterface$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkInterface$Ipv6AccessType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkInterface$NicType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkInterface$StackType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig$Tier", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.PitrSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.PitrSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ResourceBackupConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ResourceBackupConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ResourceBackupConfig$ResourceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RestoreBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RestoreBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RestoreBackupResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RestoreBackupResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RuleConfigInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RuleConfigInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.RuleConfigInfo$LastBackupState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Scheduling", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Scheduling$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Scheduling$InstanceTerminationAction", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Scheduling$NodeAffinity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Scheduling$NodeAffinity$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Scheduling$NodeAffinity$Operator", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Scheduling$OnHostMaintenance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Scheduling$ProvisioningModel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.SchedulingDuration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.SchedulingDuration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ServiceAccount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ServiceAccount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ServiceLockInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.ServiceLockInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.StandardSchedule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.StandardSchedule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.StandardSchedule$RecurrenceType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Tags", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.Tags$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.TargetResource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.TargetResource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.TriggerBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.TriggerBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateBackupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateBackupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.WeekDayOfMonth", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.WeekDayOfMonth$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.WeekDayOfMonth$WeekOfMonth", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditConfigDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.AuditLogConfig$LogType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Binding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.BindingDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.GetPolicyOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.Policy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.PolicyDelta$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.iam.v1.TestIamPermissionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BoolValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BoolValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BytesValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.BytesValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DoubleValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DoubleValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FloatValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FloatValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int32Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int32Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int64Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Int64Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.StringValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.StringValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt32Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt32Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt64Value", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.UInt64Value$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.DayOfWeek", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Month", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDRClientHttpJsonTest.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDRClientHttpJsonTest.java new file mode 100644 index 000000000000..2bf5a43b563b --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDRClientHttpJsonTest.java @@ -0,0 +1,5816 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupPlanAssociationsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchDataSourceReferencesForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchUsableBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAppliedAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPolicyBindingsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanAssociationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanRevisionsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlansPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBindingMatchingResourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourceReferencesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListManagementServersPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.backupdr.v1beta.stub.HttpJsonBackupDRStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.BoolValue; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BackupDRClientHttpJsonTest { + private static MockHttpService mockService; + private static BackupDRClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonBackupDRStub.getMethodDescriptors(), BackupDRSettings.getDefaultEndpoint()); + BackupDRSettings settings = + BackupDRSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + BackupDRSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BackupDRClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listManagementServersTest() throws Exception { + ManagementServer responsesElement = ManagementServer.newBuilder().build(); + ListManagementServersResponse expectedResponse = + ListManagementServersResponse.newBuilder() + .setNextPageToken("") + .addAllManagementServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListManagementServersPagedResponse pagedListResponse = client.listManagementServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getManagementServersList().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 listManagementServersExceptionTest() 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.listManagementServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listManagementServersTest2() throws Exception { + ManagementServer responsesElement = ManagementServer.newBuilder().build(); + ListManagementServersResponse expectedResponse = + ListManagementServersResponse.newBuilder() + .setNextPageToken("") + .addAllManagementServers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListManagementServersPagedResponse pagedListResponse = client.listManagementServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getManagementServersList().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 listManagementServersExceptionTest2() 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.listManagementServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getManagementServerTest() throws Exception { + ManagementServer expectedResponse = + ManagementServer.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setManagementUri(ManagementURI.newBuilder().build()) + .setWorkforceIdentityBasedManagementUri( + WorkforceIdentityBasedManagementURI.newBuilder().build()) + .addAllNetworks(new ArrayList()) + .setEtag("etag3123477") + .setOauth2ClientId("oauth2ClientId-1210797087") + .setWorkforceIdentityBasedOauth2ClientId( + WorkforceIdentityBasedOAuth2ClientID.newBuilder().build()) + .addAllBaProxyUri(new ArrayList()) + .setSatisfiesPzs(BoolValue.newBuilder().build()) + .setSatisfiesPzi(true) + .build(); + mockService.addResponse(expectedResponse); + + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + + ManagementServer actualResponse = client.getManagementServer(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 getManagementServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + client.getManagementServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getManagementServerTest2() throws Exception { + ManagementServer expectedResponse = + ManagementServer.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setManagementUri(ManagementURI.newBuilder().build()) + .setWorkforceIdentityBasedManagementUri( + WorkforceIdentityBasedManagementURI.newBuilder().build()) + .addAllNetworks(new ArrayList()) + .setEtag("etag3123477") + .setOauth2ClientId("oauth2ClientId-1210797087") + .setWorkforceIdentityBasedOauth2ClientId( + WorkforceIdentityBasedOAuth2ClientID.newBuilder().build()) + .addAllBaProxyUri(new ArrayList()) + .setSatisfiesPzs(BoolValue.newBuilder().build()) + .setSatisfiesPzi(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2637/locations/location-2637/managementServers/managementServer-2637"; + + ManagementServer actualResponse = client.getManagementServer(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 getManagementServerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2637/locations/location-2637/managementServers/managementServer-2637"; + client.getManagementServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createManagementServerTest() throws Exception { + ManagementServer expectedResponse = + ManagementServer.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setManagementUri(ManagementURI.newBuilder().build()) + .setWorkforceIdentityBasedManagementUri( + WorkforceIdentityBasedManagementURI.newBuilder().build()) + .addAllNetworks(new ArrayList()) + .setEtag("etag3123477") + .setOauth2ClientId("oauth2ClientId-1210797087") + .setWorkforceIdentityBasedOauth2ClientId( + WorkforceIdentityBasedOAuth2ClientID.newBuilder().build()) + .addAllBaProxyUri(new ArrayList()) + .setSatisfiesPzs(BoolValue.newBuilder().build()) + .setSatisfiesPzi(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createManagementServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + + ManagementServer actualResponse = + client.createManagementServerAsync(parent, managementServer, managementServerId).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 createManagementServerExceptionTest() 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]"); + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + client.createManagementServerAsync(parent, managementServer, managementServerId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createManagementServerTest2() throws Exception { + ManagementServer expectedResponse = + ManagementServer.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setManagementUri(ManagementURI.newBuilder().build()) + .setWorkforceIdentityBasedManagementUri( + WorkforceIdentityBasedManagementURI.newBuilder().build()) + .addAllNetworks(new ArrayList()) + .setEtag("etag3123477") + .setOauth2ClientId("oauth2ClientId-1210797087") + .setWorkforceIdentityBasedOauth2ClientId( + WorkforceIdentityBasedOAuth2ClientID.newBuilder().build()) + .addAllBaProxyUri(new ArrayList()) + .setSatisfiesPzs(BoolValue.newBuilder().build()) + .setSatisfiesPzi(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createManagementServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + + ManagementServer actualResponse = + client.createManagementServerAsync(parent, managementServer, managementServerId).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 createManagementServerExceptionTest2() 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"; + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + client.createManagementServerAsync(parent, managementServer, managementServerId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteManagementServerTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteManagementServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + + client.deleteManagementServerAsync(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 deleteManagementServerExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + client.deleteManagementServerAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteManagementServerTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteManagementServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-2637/locations/location-2637/managementServers/managementServer-2637"; + + client.deleteManagementServerAsync(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 deleteManagementServerExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2637/locations/location-2637/managementServers/managementServer-2637"; + client.deleteManagementServerAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .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]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .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 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 fetchUsableBackupVaultsTest() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + FetchUsableBackupVaultsResponse expectedResponse = + FetchUsableBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + FetchUsableBackupVaultsPagedResponse pagedListResponse = client.fetchUsableBackupVaults(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 fetchUsableBackupVaultsExceptionTest() 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.fetchUsableBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchUsableBackupVaultsTest2() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + FetchUsableBackupVaultsResponse expectedResponse = + FetchUsableBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + FetchUsableBackupVaultsPagedResponse pagedListResponse = client.fetchUsableBackupVaults(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 fetchUsableBackupVaultsExceptionTest2() 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.fetchUsableBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + + 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]", "[BACKUPVAULT]"); + 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]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .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 updateBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .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]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .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]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .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]", "[BACKUPVAULT]"); + + 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]", "[BACKUPVAULT]"); + 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 listDataSourcesTest() throws Exception { + DataSource responsesElement = DataSource.newBuilder().build(); + ListDataSourcesResponse expectedResponse = + ListDataSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllDataSources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + + ListDataSourcesPagedResponse pagedListResponse = client.listDataSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourcesList().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 listDataSourcesExceptionTest() 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]", "[BACKUPVAULT]"); + client.listDataSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSourcesTest2() throws Exception { + DataSource responsesElement = DataSource.newBuilder().build(); + ListDataSourcesResponse expectedResponse = + ListDataSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllDataSources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5588/locations/location-5588/backupVaults/backupVault-5588"; + + ListDataSourcesPagedResponse pagedListResponse = client.listDataSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourcesList().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 listDataSourcesExceptionTest2() 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.listDataSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSourceTest() throws Exception { + DataSource expectedResponse = + DataSource.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setEtag("etag3123477") + .setTotalStoredBytes(1181597162) + .setConfigState(BackupConfigState.forNumber(0)) + .setBackupConfigInfo(BackupConfigInfo.newBuilder().build()) + .setBackupBlockedByVaultAccessRestriction(true) + .build(); + mockService.addResponse(expectedResponse); + + DataSourceName name = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + + DataSource actualResponse = client.getDataSource(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 getDataSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataSourceName name = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + client.getDataSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSourceTest2() throws Exception { + DataSource expectedResponse = + DataSource.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setEtag("etag3123477") + .setTotalStoredBytes(1181597162) + .setConfigState(BackupConfigState.forNumber(0)) + .setBackupConfigInfo(BackupConfigInfo.newBuilder().build()) + .setBackupBlockedByVaultAccessRestriction(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1411/locations/location-1411/backupVaults/backupVault-1411/dataSources/dataSource-1411"; + + DataSource actualResponse = client.getDataSource(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 getDataSourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1411/locations/location-1411/backupVaults/backupVault-1411/dataSources/dataSource-1411"; + client.getDataSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataSourceTest() throws Exception { + DataSource expectedResponse = + DataSource.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setEtag("etag3123477") + .setTotalStoredBytes(1181597162) + .setConfigState(BackupConfigState.forNumber(0)) + .setBackupConfigInfo(BackupConfigInfo.newBuilder().build()) + .setBackupBlockedByVaultAccessRestriction(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataSource dataSource = + DataSource.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setEtag("etag3123477") + .setTotalStoredBytes(1181597162) + .setConfigState(BackupConfigState.forNumber(0)) + .setBackupConfigInfo(BackupConfigInfo.newBuilder().build()) + .setBackupBlockedByVaultAccessRestriction(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataSource actualResponse = client.updateDataSourceAsync(dataSource, 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 updateDataSourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataSource dataSource = + DataSource.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setEtag("etag3123477") + .setTotalStoredBytes(1181597162) + .setConfigState(BackupConfigState.forNumber(0)) + .setBackupConfigInfo(BackupConfigInfo.newBuilder().build()) + .setBackupBlockedByVaultAccessRestriction(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataSourceAsync(dataSource, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + + 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 { + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + 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-9790/locations/location-9790/backupVaults/backupVault-9790/dataSources/dataSource-9790"; + + 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-9790/locations/location-9790/backupVaults/backupVault-9790/dataSources/dataSource-9790"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchBackupsForResourceTypeTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + FetchBackupsForResourceTypeResponse expectedResponse = + FetchBackupsForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + String resourceType = "resourceType-384364440"; + + FetchBackupsForResourceTypePagedResponse pagedListResponse = + client.fetchBackupsForResourceType(parent, resourceType); + + 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 fetchBackupsForResourceTypeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + String resourceType = "resourceType-384364440"; + client.fetchBackupsForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchBackupsForResourceTypeTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + FetchBackupsForResourceTypeResponse expectedResponse = + FetchBackupsForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-9790/locations/location-9790/backupVaults/backupVault-9790/dataSources/dataSource-9790"; + String resourceType = "resourceType-384364440"; + + FetchBackupsForResourceTypePagedResponse pagedListResponse = + client.fetchBackupsForResourceType(parent, resourceType); + + 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 fetchBackupsForResourceTypeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-9790/locations/location-9790/backupVaults/backupVault-9790/dataSources/dataSource-9790"; + String resourceType = "resourceType-384364440"; + client.fetchBackupsForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[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]", "[BACKUPVAULT]", "[DATASOURCE]", "[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]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4042/locations/location-4042/backupVaults/backupVault-4042/dataSources/dataSource-4042/backups/backup-4042"; + + 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-4042/locations/location-4042/backupVaults/backupVault-4042/dataSources/dataSource-4042/backups/backup-4042"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .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]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .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]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupAsync(backup, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + + Backup actualResponse = client.deleteBackupAsync(name).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 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]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupTest2() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-4042/locations/location-4042/backupVaults/backupVault-4042/dataSources/dataSource-4042/backups/backup-4042"; + + Backup actualResponse = client.deleteBackupAsync(name).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 deleteBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4042/locations/location-4042/backupVaults/backupVault-4042/dataSources/dataSource-4042/backups/backup-4042"; + client.deleteBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreBackupTest() throws Exception { + RestoreBackupResponse expectedResponse = + RestoreBackupResponse.newBuilder() + .setTargetResource(TargetResource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + + RestoreBackupResponse actualResponse = client.restoreBackupAsync(name).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 restoreBackupExceptionTest() 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]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + client.restoreBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void restoreBackupTest2() throws Exception { + RestoreBackupResponse expectedResponse = + RestoreBackupResponse.newBuilder() + .setTargetResource(TargetResource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-4042/locations/location-4042/backupVaults/backupVault-4042/dataSources/dataSource-4042/backups/backup-4042"; + + RestoreBackupResponse actualResponse = client.restoreBackupAsync(name).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 restoreBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4042/locations/location-4042/backupVaults/backupVault-4042/dataSources/dataSource-4042/backups/backup-4042"; + client.restoreBackupAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupPlanTest() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + + BackupPlan actualResponse = + client.createBackupPlanAsync(parent, backupPlan, backupPlanId).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 createBackupPlanExceptionTest() 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]"); + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + client.createBackupPlanAsync(parent, backupPlan, backupPlanId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupPlanTest2() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + + BackupPlan actualResponse = + client.createBackupPlanAsync(parent, backupPlan, backupPlanId).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 createBackupPlanExceptionTest2() 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"; + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + client.createBackupPlanAsync(parent, backupPlan, backupPlanId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateBackupPlanTest() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupPlan backupPlan = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BackupPlan actualResponse = client.updateBackupPlanAsync(backupPlan, 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 updateBackupPlanExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlan backupPlan = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupPlanAsync(backupPlan, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getBackupPlanTest() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + mockService.addResponse(expectedResponse); + + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + + BackupPlan actualResponse = client.getBackupPlan(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 getBackupPlanExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + client.getBackupPlan(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupPlanTest2() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-3970/locations/location-3970/backupPlans/backupPlan-3970"; + + BackupPlan actualResponse = client.getBackupPlan(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 getBackupPlanExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3970/locations/location-3970/backupPlans/backupPlan-3970"; + client.getBackupPlan(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlansTest() throws Exception { + BackupPlan responsesElement = BackupPlan.newBuilder().build(); + ListBackupPlansResponse expectedResponse = + ListBackupPlansResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlans(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBackupPlansPagedResponse pagedListResponse = client.listBackupPlans(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlansList().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 listBackupPlansExceptionTest() 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.listBackupPlans(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlansTest2() throws Exception { + BackupPlan responsesElement = BackupPlan.newBuilder().build(); + ListBackupPlansResponse expectedResponse = + ListBackupPlansResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlans(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListBackupPlansPagedResponse pagedListResponse = client.listBackupPlans(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlansList().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 listBackupPlansExceptionTest2() 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.listBackupPlans(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBackupPlanTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + + client.deleteBackupPlanAsync(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 deleteBackupPlanExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + client.deleteBackupPlanAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupPlanTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-3970/locations/location-3970/backupPlans/backupPlan-3970"; + + client.deleteBackupPlanAsync(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 deleteBackupPlanExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-3970/locations/location-3970/backupPlans/backupPlan-3970"; + client.deleteBackupPlanAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getBackupPlanRevisionTest() throws Exception { + BackupPlanRevision expectedResponse = + BackupPlanRevision.newBuilder() + .setName( + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]") + .toString()) + .setRevisionId("revisionId-1507445162") + .setBackupPlanSnapshot(BackupPlan.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BackupPlanRevisionName name = + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]"); + + BackupPlanRevision actualResponse = client.getBackupPlanRevision(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 getBackupPlanRevisionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlanRevisionName name = + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]"); + client.getBackupPlanRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupPlanRevisionTest2() throws Exception { + BackupPlanRevision expectedResponse = + BackupPlanRevision.newBuilder() + .setName( + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]") + .toString()) + .setRevisionId("revisionId-1507445162") + .setBackupPlanSnapshot(BackupPlan.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9582/locations/location-9582/backupPlans/backupPlan-9582/revisions/revision-9582"; + + BackupPlanRevision actualResponse = client.getBackupPlanRevision(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 getBackupPlanRevisionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9582/locations/location-9582/backupPlans/backupPlan-9582/revisions/revision-9582"; + client.getBackupPlanRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlanRevisionsTest() throws Exception { + BackupPlanRevision responsesElement = BackupPlanRevision.newBuilder().build(); + ListBackupPlanRevisionsResponse expectedResponse = + ListBackupPlanRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanRevisions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + BackupPlanName parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + + ListBackupPlanRevisionsPagedResponse pagedListResponse = client.listBackupPlanRevisions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanRevisionsList().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 listBackupPlanRevisionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlanName parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + client.listBackupPlanRevisions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlanRevisionsTest2() throws Exception { + BackupPlanRevision responsesElement = BackupPlanRevision.newBuilder().build(); + ListBackupPlanRevisionsResponse expectedResponse = + ListBackupPlanRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanRevisions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-4819/locations/location-4819/backupPlans/backupPlan-4819"; + + ListBackupPlanRevisionsPagedResponse pagedListResponse = client.listBackupPlanRevisions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanRevisionsList().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 listBackupPlanRevisionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-4819/locations/location-4819/backupPlans/backupPlan-4819"; + client.listBackupPlanRevisions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBackupPlanAssociationTest() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + + BackupPlanAssociation actualResponse = + client + .createBackupPlanAssociationAsync( + parent, backupPlanAssociation, backupPlanAssociationId) + .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 createBackupPlanAssociationExceptionTest() 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]"); + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + client + .createBackupPlanAssociationAsync(parent, backupPlanAssociation, backupPlanAssociationId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createBackupPlanAssociationTest2() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + + BackupPlanAssociation actualResponse = + client + .createBackupPlanAssociationAsync( + parent, backupPlanAssociation, backupPlanAssociationId) + .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 createBackupPlanAssociationExceptionTest2() 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"; + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + client + .createBackupPlanAssociationAsync(parent, backupPlanAssociation, backupPlanAssociationId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateBackupPlanAssociationTest() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupPlanAssociation backupPlanAssociation = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BackupPlanAssociation actualResponse = + client.updateBackupPlanAssociationAsync(backupPlanAssociation, 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 updateBackupPlanAssociationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlanAssociation backupPlanAssociation = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan( + BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupPlanAssociationAsync(backupPlanAssociation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getBackupPlanAssociationTest() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + mockService.addResponse(expectedResponse); + + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + + BackupPlanAssociation actualResponse = client.getBackupPlanAssociation(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 getBackupPlanAssociationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + client.getBackupPlanAssociation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupPlanAssociationTest2() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2205/locations/location-2205/backupPlanAssociations/backupPlanAssociation-2205"; + + BackupPlanAssociation actualResponse = client.getBackupPlanAssociation(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 getBackupPlanAssociationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2205/locations/location-2205/backupPlanAssociations/backupPlanAssociation-2205"; + client.getBackupPlanAssociation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlanAssociationsTest() throws Exception { + BackupPlanAssociation responsesElement = BackupPlanAssociation.newBuilder().build(); + ListBackupPlanAssociationsResponse expectedResponse = + ListBackupPlanAssociationsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanAssociations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBackupPlanAssociationsPagedResponse pagedListResponse = + client.listBackupPlanAssociations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanAssociationsList().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 listBackupPlanAssociationsExceptionTest() 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.listBackupPlanAssociations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlanAssociationsTest2() throws Exception { + BackupPlanAssociation responsesElement = BackupPlanAssociation.newBuilder().build(); + ListBackupPlanAssociationsResponse expectedResponse = + ListBackupPlanAssociationsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanAssociations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListBackupPlanAssociationsPagedResponse pagedListResponse = + client.listBackupPlanAssociations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanAssociationsList().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 listBackupPlanAssociationsExceptionTest2() 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.listBackupPlanAssociations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchBackupPlanAssociationsForResourceTypeTest() throws Exception { + BackupPlanAssociation responsesElement = BackupPlanAssociation.newBuilder().build(); + FetchBackupPlanAssociationsForResourceTypeResponse expectedResponse = + FetchBackupPlanAssociationsForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanAssociations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String resourceType = "resourceType-384364440"; + + FetchBackupPlanAssociationsForResourceTypePagedResponse pagedListResponse = + client.fetchBackupPlanAssociationsForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanAssociationsList().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 fetchBackupPlanAssociationsForResourceTypeExceptionTest() 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]"); + String resourceType = "resourceType-384364440"; + client.fetchBackupPlanAssociationsForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchBackupPlanAssociationsForResourceTypeTest2() throws Exception { + BackupPlanAssociation responsesElement = BackupPlanAssociation.newBuilder().build(); + FetchBackupPlanAssociationsForResourceTypeResponse expectedResponse = + FetchBackupPlanAssociationsForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanAssociations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + String resourceType = "resourceType-384364440"; + + FetchBackupPlanAssociationsForResourceTypePagedResponse pagedListResponse = + client.fetchBackupPlanAssociationsForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanAssociationsList().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 fetchBackupPlanAssociationsForResourceTypeExceptionTest2() 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"; + String resourceType = "resourceType-384364440"; + client.fetchBackupPlanAssociationsForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBackupPlanAssociationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + + client.deleteBackupPlanAssociationAsync(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 deleteBackupPlanAssociationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + client.deleteBackupPlanAssociationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteBackupPlanAssociationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-2205/locations/location-2205/backupPlanAssociations/backupPlanAssociation-2205"; + + client.deleteBackupPlanAssociationAsync(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 deleteBackupPlanAssociationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2205/locations/location-2205/backupPlanAssociations/backupPlanAssociation-2205"; + client.deleteBackupPlanAssociationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void triggerBackupTest() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("triggerBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + String ruleId = "ruleId-919875273"; + + BackupPlanAssociation actualResponse = client.triggerBackupAsync(name, ruleId).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 triggerBackupExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + String ruleId = "ruleId-919875273"; + client.triggerBackupAsync(name, ruleId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void triggerBackupTest2() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("triggerBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-2205/locations/location-2205/backupPlanAssociations/backupPlanAssociation-2205"; + String ruleId = "ruleId-919875273"; + + BackupPlanAssociation actualResponse = client.triggerBackupAsync(name, ruleId).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 triggerBackupExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2205/locations/location-2205/backupPlanAssociations/backupPlanAssociation-2205"; + String ruleId = "ruleId-919875273"; + client.triggerBackupAsync(name, ruleId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getDataSourceReferenceTest() throws Exception { + DataSourceReference expectedResponse = + DataSourceReference.newBuilder() + .setName( + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]") + .toString()) + .setDataSource( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDataSourceBackupConfigState(BackupConfigState.forNumber(0)) + .setDataSourceBackupCount(-1620010527) + .setDataSourceBackupConfigInfo(DataSourceBackupConfigInfo.newBuilder().build()) + .setDataSourceGcpResourceInfo(DataSourceGcpResourceInfo.newBuilder().build()) + .setTotalStoredBytes(1181597162) + .build(); + mockService.addResponse(expectedResponse); + + DataSourceReferenceName name = + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]"); + + DataSourceReference actualResponse = client.getDataSourceReference(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 getDataSourceReferenceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataSourceReferenceName name = + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]"); + client.getDataSourceReference(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSourceReferenceTest2() throws Exception { + DataSourceReference expectedResponse = + DataSourceReference.newBuilder() + .setName( + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]") + .toString()) + .setDataSource( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDataSourceBackupConfigState(BackupConfigState.forNumber(0)) + .setDataSourceBackupCount(-1620010527) + .setDataSourceBackupConfigInfo(DataSourceBackupConfigInfo.newBuilder().build()) + .setDataSourceGcpResourceInfo(DataSourceGcpResourceInfo.newBuilder().build()) + .setTotalStoredBytes(1181597162) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4429/locations/location-4429/dataSourceReferences/dataSourceReference-4429"; + + DataSourceReference actualResponse = client.getDataSourceReference(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 getDataSourceReferenceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4429/locations/location-4429/dataSourceReferences/dataSourceReference-4429"; + client.getDataSourceReference(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSourceReferencesTest() throws Exception { + DataSourceReference responsesElement = DataSourceReference.newBuilder().build(); + ListDataSourceReferencesResponse expectedResponse = + ListDataSourceReferencesResponse.newBuilder() + .setNextPageToken("") + .addAllDataSourceReferences(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDataSourceReferencesPagedResponse pagedListResponse = + client.listDataSourceReferences(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourceReferencesList().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 listDataSourceReferencesExceptionTest() 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.listDataSourceReferences(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSourceReferencesTest2() throws Exception { + DataSourceReference responsesElement = DataSourceReference.newBuilder().build(); + ListDataSourceReferencesResponse expectedResponse = + ListDataSourceReferencesResponse.newBuilder() + .setNextPageToken("") + .addAllDataSourceReferences(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListDataSourceReferencesPagedResponse pagedListResponse = + client.listDataSourceReferences(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourceReferencesList().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 listDataSourceReferencesExceptionTest2() 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.listDataSourceReferences(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchDataSourceReferencesForResourceTypeTest() throws Exception { + DataSourceReference responsesElement = DataSourceReference.newBuilder().build(); + FetchDataSourceReferencesForResourceTypeResponse expectedResponse = + FetchDataSourceReferencesForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllDataSourceReferences(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String resourceType = "resourceType-384364440"; + + FetchDataSourceReferencesForResourceTypePagedResponse pagedListResponse = + client.fetchDataSourceReferencesForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourceReferencesList().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 fetchDataSourceReferencesForResourceTypeExceptionTest() 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]"); + String resourceType = "resourceType-384364440"; + client.fetchDataSourceReferencesForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchDataSourceReferencesForResourceTypeTest2() throws Exception { + DataSourceReference responsesElement = DataSourceReference.newBuilder().build(); + FetchDataSourceReferencesForResourceTypeResponse expectedResponse = + FetchDataSourceReferencesForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllDataSourceReferences(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + String resourceType = "resourceType-384364440"; + + FetchDataSourceReferencesForResourceTypePagedResponse pagedListResponse = + client.fetchDataSourceReferencesForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourceReferencesList().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 fetchDataSourceReferencesForResourceTypeExceptionTest2() 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"; + String resourceType = "resourceType-384364440"; + client.fetchDataSourceReferencesForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void initializeServiceTest() throws Exception { + InitializeServiceResponse expectedResponse = + InitializeServiceResponse.newBuilder() + .setBackupVaultName("backupVaultName1928739899") + .setBackupPlanName("backupPlanName42972470") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("initializeServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InitializeServiceRequest request = + InitializeServiceRequest.newBuilder() + .setName("projects/project-6002/locations/location-6002/serviceConfig") + .setResourceType("resourceType-384364440") + .setRequestId("requestId693933066") + .setBackupPlanLocation("backupPlanLocation543722720") + .setValidateOnly(true) + .build(); + + InitializeServiceResponse actualResponse = client.initializeServiceAsync(request).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 initializeServiceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InitializeServiceRequest request = + InitializeServiceRequest.newBuilder() + .setName("projects/project-6002/locations/location-6002/serviceConfig") + .setResourceType("resourceType-384364440") + .setRequestId("requestId693933066") + .setBackupPlanLocation("backupPlanLocation543722720") + .setValidateOnly(true) + .build(); + client.initializeServiceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAutoProtectionPolicyTest() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + + AutoProtectionPolicy actualResponse = + client + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .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 createAutoProtectionPolicyExceptionTest() 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]"); + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + client + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAutoProtectionPolicyTest2() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + + AutoProtectionPolicy actualResponse = + client + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .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 createAutoProtectionPolicyExceptionTest2() 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"; + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + client + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listAutoProtectionPoliciesTest() throws Exception { + AutoProtectionPolicy responsesElement = AutoProtectionPolicy.newBuilder().build(); + ListAutoProtectionPoliciesResponse expectedResponse = + ListAutoProtectionPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllAutoProtectionPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAutoProtectionPoliciesPagedResponse pagedListResponse = + client.listAutoProtectionPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutoProtectionPoliciesList().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 listAutoProtectionPoliciesExceptionTest() 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.listAutoProtectionPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutoProtectionPoliciesTest2() throws Exception { + AutoProtectionPolicy responsesElement = AutoProtectionPolicy.newBuilder().build(); + ListAutoProtectionPoliciesResponse expectedResponse = + ListAutoProtectionPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllAutoProtectionPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAutoProtectionPoliciesPagedResponse pagedListResponse = + client.listAutoProtectionPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutoProtectionPoliciesList().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 listAutoProtectionPoliciesExceptionTest2() 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.listAutoProtectionPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutoProtectionPolicyTest() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + + AutoProtectionPolicy actualResponse = client.getAutoProtectionPolicy(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 getAutoProtectionPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + client.getAutoProtectionPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutoProtectionPolicyTest2() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-6984/locations/location-6984/autoProtectionPolicies/autoProtectionPolicie-6984"; + + AutoProtectionPolicy actualResponse = client.getAutoProtectionPolicy(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 getAutoProtectionPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6984/locations/location-6984/autoProtectionPolicies/autoProtectionPolicie-6984"; + client.getAutoProtectionPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAutoProtectionPolicyTest() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AutoProtectionPolicy autoProtectionPolicy = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AutoProtectionPolicy actualResponse = + client.updateAutoProtectionPolicyAsync(autoProtectionPolicy, 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 updateAutoProtectionPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutoProtectionPolicy autoProtectionPolicy = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAutoProtectionPolicyAsync(autoProtectionPolicy, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAutoProtectionPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + + client.deleteAutoProtectionPolicyAsync(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 deleteAutoProtectionPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + client.deleteAutoProtectionPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAutoProtectionPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-6984/locations/location-6984/autoProtectionPolicies/autoProtectionPolicie-6984"; + + client.deleteAutoProtectionPolicyAsync(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 deleteAutoProtectionPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-6984/locations/location-6984/autoProtectionPolicies/autoProtectionPolicie-6984"; + client.deleteAutoProtectionPolicyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAutoProtectionPolicyBindingTest() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutoProtectionPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + + AutoProtectionPolicyBinding actualResponse = + client + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .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 createAutoProtectionPolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + client + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAutoProtectionPolicyBindingTest2() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutoProtectionPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = + "projects/project-3065/locations/location-3065/autoProtectionPolicies/autoProtectionPolicie-3065"; + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + + AutoProtectionPolicyBinding actualResponse = + client + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .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 createAutoProtectionPolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-3065/locations/location-3065/autoProtectionPolicies/autoProtectionPolicie-3065"; + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + client + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getAutoProtectionPolicyBindingTest() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + + AutoProtectionPolicyBinding actualResponse = client.getAutoProtectionPolicyBinding(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 getAutoProtectionPolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + client.getAutoProtectionPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutoProtectionPolicyBindingTest2() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9760/locations/location-9760/autoProtectionPolicies/autoProtectionPolicie-9760/bindings/binding-9760"; + + AutoProtectionPolicyBinding actualResponse = client.getAutoProtectionPolicyBinding(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 getAutoProtectionPolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9760/locations/location-9760/autoProtectionPolicies/autoProtectionPolicie-9760/bindings/binding-9760"; + client.getAutoProtectionPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutoProtectionPolicyBindingsTest() throws Exception { + AutoProtectionPolicyBinding responsesElement = AutoProtectionPolicyBinding.newBuilder().build(); + ListAutoProtectionPolicyBindingsResponse expectedResponse = + ListAutoProtectionPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAutoProtectionPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + + ListAutoProtectionPolicyBindingsPagedResponse pagedListResponse = + client.listAutoProtectionPolicyBindings(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getAutoProtectionPolicyBindingsList().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 listAutoProtectionPolicyBindingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + client.listAutoProtectionPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutoProtectionPolicyBindingsTest2() throws Exception { + AutoProtectionPolicyBinding responsesElement = AutoProtectionPolicyBinding.newBuilder().build(); + ListAutoProtectionPolicyBindingsResponse expectedResponse = + ListAutoProtectionPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAutoProtectionPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-3065/locations/location-3065/autoProtectionPolicies/autoProtectionPolicie-3065"; + + ListAutoProtectionPolicyBindingsPagedResponse pagedListResponse = + client.listAutoProtectionPolicyBindings(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getAutoProtectionPolicyBindingsList().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 listAutoProtectionPolicyBindingsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-3065/locations/location-3065/autoProtectionPolicies/autoProtectionPolicie-3065"; + client.listAutoProtectionPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAppliedAutoProtectionPoliciesTest() throws Exception { + AppliedAutoProtectionPolicy responsesElement = AppliedAutoProtectionPolicy.newBuilder().build(); + ListAppliedAutoProtectionPoliciesResponse expectedResponse = + ListAppliedAutoProtectionPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllAppliedAutoProtectionPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAppliedAutoProtectionPoliciesPagedResponse pagedListResponse = + client.listAppliedAutoProtectionPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getAppliedAutoProtectionPoliciesList().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 listAppliedAutoProtectionPoliciesExceptionTest() 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.listAppliedAutoProtectionPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAppliedAutoProtectionPoliciesTest2() throws Exception { + AppliedAutoProtectionPolicy responsesElement = AppliedAutoProtectionPolicy.newBuilder().build(); + ListAppliedAutoProtectionPoliciesResponse expectedResponse = + ListAppliedAutoProtectionPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllAppliedAutoProtectionPolicies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAppliedAutoProtectionPoliciesPagedResponse pagedListResponse = + client.listAppliedAutoProtectionPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getAppliedAutoProtectionPoliciesList().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 listAppliedAutoProtectionPoliciesExceptionTest2() 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.listAppliedAutoProtectionPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void initiateDeleteAutoProtectionPolicyBindingTest() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("initiateDeleteAutoProtectionPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + + AutoProtectionPolicyBinding actualResponse = + client.initiateDeleteAutoProtectionPolicyBindingAsync(name).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 initiateDeleteAutoProtectionPolicyBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + client.initiateDeleteAutoProtectionPolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void initiateDeleteAutoProtectionPolicyBindingTest2() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("initiateDeleteAutoProtectionPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-9760/locations/location-9760/autoProtectionPolicies/autoProtectionPolicie-9760/bindings/binding-9760"; + + AutoProtectionPolicyBinding actualResponse = + client.initiateDeleteAutoProtectionPolicyBindingAsync(name).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 initiateDeleteAutoProtectionPolicyBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9760/locations/location-9760/autoProtectionPolicies/autoProtectionPolicie-9760/bindings/binding-9760"; + client.initiateDeleteAutoProtectionPolicyBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getBindingMatchingResourceTest() throws Exception { + BindingMatchingResource expectedResponse = + BindingMatchingResource.newBuilder() + .setName( + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]") + .toString()) + .setResource("resource-341064690") + .setLastEvaluationTime(Timestamp.newBuilder().build()) + .setAutoProtectionDetails(AutoProtectionDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BindingMatchingResourceName name = + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]"); + + BindingMatchingResource actualResponse = client.getBindingMatchingResource(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 getBindingMatchingResourceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BindingMatchingResourceName name = + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]"); + client.getBindingMatchingResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBindingMatchingResourceTest2() throws Exception { + BindingMatchingResource expectedResponse = + BindingMatchingResource.newBuilder() + .setName( + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]") + .toString()) + .setResource("resource-341064690") + .setLastEvaluationTime(Timestamp.newBuilder().build()) + .setAutoProtectionDetails(AutoProtectionDetails.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9500/locations/location-9500/autoProtectionPolicies/autoProtectionPolicie-9500/bindings/binding-9500/matchingResources/matchingResource-9500"; + + BindingMatchingResource actualResponse = client.getBindingMatchingResource(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 getBindingMatchingResourceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9500/locations/location-9500/autoProtectionPolicies/autoProtectionPolicie-9500/bindings/binding-9500/matchingResources/matchingResource-9500"; + client.getBindingMatchingResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBindingMatchingResourcesTest() throws Exception { + BindingMatchingResource responsesElement = BindingMatchingResource.newBuilder().build(); + ListBindingMatchingResourcesResponse expectedResponse = + ListBindingMatchingResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllMatchingResources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AutoProtectionPolicyBindingName parent = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + + ListBindingMatchingResourcesPagedResponse pagedListResponse = + client.listBindingMatchingResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMatchingResourcesList().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 listBindingMatchingResourcesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutoProtectionPolicyBindingName parent = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + client.listBindingMatchingResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBindingMatchingResourcesTest2() throws Exception { + BindingMatchingResource responsesElement = BindingMatchingResource.newBuilder().build(); + ListBindingMatchingResourcesResponse expectedResponse = + ListBindingMatchingResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllMatchingResources(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-5871/locations/location-5871/autoProtectionPolicies/autoProtectionPolicie-5871/bindings/binding-5871"; + + ListBindingMatchingResourcesPagedResponse pagedListResponse = + client.listBindingMatchingResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMatchingResourcesList().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 listBindingMatchingResourcesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-5871/locations/location-5871/autoProtectionPolicies/autoProtectionPolicie-5871/bindings/binding-5871"; + client.listBindingMatchingResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + 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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + 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 setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + 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 getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + 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 testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDRClientTest.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDRClientTest.java new file mode 100644 index 000000000000..429b3636db14 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDRClientTest.java @@ -0,0 +1,5221 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupPlanAssociationsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchBackupsForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchDataSourceReferencesForResourceTypePagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.FetchUsableBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAppliedAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPoliciesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListAutoProtectionPolicyBindingsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanAssociationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlanRevisionsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupPlansPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupVaultsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBackupsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListBindingMatchingResourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourceReferencesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListDataSourcesPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDRClient.ListManagementServersPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.BoolValue; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BackupDRClientTest { + private static MockBackupDR mockBackupDR; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private BackupDRClient client; + + @BeforeClass + public static void startStaticServer() { + mockBackupDR = new MockBackupDR(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockBackupDR, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + BackupDRSettings settings = + BackupDRSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BackupDRClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listManagementServersTest() throws Exception { + ManagementServer responsesElement = ManagementServer.newBuilder().build(); + ListManagementServersResponse expectedResponse = + ListManagementServersResponse.newBuilder() + .setNextPageToken("") + .addAllManagementServers(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListManagementServersPagedResponse pagedListResponse = client.listManagementServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getManagementServersList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListManagementServersRequest actualRequest = + ((ListManagementServersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listManagementServersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listManagementServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listManagementServersTest2() throws Exception { + ManagementServer responsesElement = ManagementServer.newBuilder().build(); + ListManagementServersResponse expectedResponse = + ListManagementServersResponse.newBuilder() + .setNextPageToken("") + .addAllManagementServers(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListManagementServersPagedResponse pagedListResponse = client.listManagementServers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getManagementServersList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListManagementServersRequest actualRequest = + ((ListManagementServersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listManagementServersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listManagementServers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getManagementServerTest() throws Exception { + ManagementServer expectedResponse = + ManagementServer.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setManagementUri(ManagementURI.newBuilder().build()) + .setWorkforceIdentityBasedManagementUri( + WorkforceIdentityBasedManagementURI.newBuilder().build()) + .addAllNetworks(new ArrayList()) + .setEtag("etag3123477") + .setOauth2ClientId("oauth2ClientId-1210797087") + .setWorkforceIdentityBasedOauth2ClientId( + WorkforceIdentityBasedOAuth2ClientID.newBuilder().build()) + .addAllBaProxyUri(new ArrayList()) + .setSatisfiesPzs(BoolValue.newBuilder().build()) + .setSatisfiesPzi(true) + .build(); + mockBackupDR.addResponse(expectedResponse); + + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + + ManagementServer actualResponse = client.getManagementServer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetManagementServerRequest actualRequest = ((GetManagementServerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getManagementServerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + client.getManagementServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getManagementServerTest2() throws Exception { + ManagementServer expectedResponse = + ManagementServer.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setManagementUri(ManagementURI.newBuilder().build()) + .setWorkforceIdentityBasedManagementUri( + WorkforceIdentityBasedManagementURI.newBuilder().build()) + .addAllNetworks(new ArrayList()) + .setEtag("etag3123477") + .setOauth2ClientId("oauth2ClientId-1210797087") + .setWorkforceIdentityBasedOauth2ClientId( + WorkforceIdentityBasedOAuth2ClientID.newBuilder().build()) + .addAllBaProxyUri(new ArrayList()) + .setSatisfiesPzs(BoolValue.newBuilder().build()) + .setSatisfiesPzi(true) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + ManagementServer actualResponse = client.getManagementServer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetManagementServerRequest actualRequest = ((GetManagementServerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getManagementServerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getManagementServer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createManagementServerTest() throws Exception { + ManagementServer expectedResponse = + ManagementServer.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setManagementUri(ManagementURI.newBuilder().build()) + .setWorkforceIdentityBasedManagementUri( + WorkforceIdentityBasedManagementURI.newBuilder().build()) + .addAllNetworks(new ArrayList()) + .setEtag("etag3123477") + .setOauth2ClientId("oauth2ClientId-1210797087") + .setWorkforceIdentityBasedOauth2ClientId( + WorkforceIdentityBasedOAuth2ClientID.newBuilder().build()) + .addAllBaProxyUri(new ArrayList()) + .setSatisfiesPzs(BoolValue.newBuilder().build()) + .setSatisfiesPzi(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createManagementServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + + ManagementServer actualResponse = + client.createManagementServerAsync(parent, managementServer, managementServerId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateManagementServerRequest actualRequest = + ((CreateManagementServerRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(managementServer, actualRequest.getManagementServer()); + Assert.assertEquals(managementServerId, actualRequest.getManagementServerId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createManagementServerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + client.createManagementServerAsync(parent, managementServer, managementServerId).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 createManagementServerTest2() throws Exception { + ManagementServer expectedResponse = + ManagementServer.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setManagementUri(ManagementURI.newBuilder().build()) + .setWorkforceIdentityBasedManagementUri( + WorkforceIdentityBasedManagementURI.newBuilder().build()) + .addAllNetworks(new ArrayList()) + .setEtag("etag3123477") + .setOauth2ClientId("oauth2ClientId-1210797087") + .setWorkforceIdentityBasedOauth2ClientId( + WorkforceIdentityBasedOAuth2ClientID.newBuilder().build()) + .addAllBaProxyUri(new ArrayList()) + .setSatisfiesPzs(BoolValue.newBuilder().build()) + .setSatisfiesPzi(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createManagementServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String parent = "parent-995424086"; + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + + ManagementServer actualResponse = + client.createManagementServerAsync(parent, managementServer, managementServerId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateManagementServerRequest actualRequest = + ((CreateManagementServerRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(managementServer, actualRequest.getManagementServer()); + Assert.assertEquals(managementServerId, actualRequest.getManagementServerId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createManagementServerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + client.createManagementServerAsync(parent, managementServer, managementServerId).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 deleteManagementServerTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteManagementServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + + client.deleteManagementServerAsync(name).get(); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteManagementServerRequest actualRequest = + ((DeleteManagementServerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteManagementServerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + client.deleteManagementServerAsync(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 deleteManagementServerTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteManagementServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteManagementServerAsync(name).get(); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteManagementServerRequest actualRequest = + ((DeleteManagementServerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteManagementServerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.deleteManagementServerAsync(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 createBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.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 = mockBackupDR.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); + mockBackupDR.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]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.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 = mockBackupDR.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); + mockBackupDR.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 listBackupVaultsTest() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + ListBackupVaultsResponse expectedResponse = + ListBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.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 = mockBackupDR.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); + mockBackupDR.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(); + mockBackupDR.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 = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchUsableBackupVaultsTest() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + FetchUsableBackupVaultsResponse expectedResponse = + FetchUsableBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + FetchUsableBackupVaultsPagedResponse pagedListResponse = client.fetchUsableBackupVaults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupVaultsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchUsableBackupVaultsRequest actualRequest = + ((FetchUsableBackupVaultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchUsableBackupVaultsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.fetchUsableBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchUsableBackupVaultsTest2() throws Exception { + BackupVault responsesElement = BackupVault.newBuilder().build(); + FetchUsableBackupVaultsResponse expectedResponse = + FetchUsableBackupVaultsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupVaults(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + FetchUsableBackupVaultsPagedResponse pagedListResponse = client.fetchUsableBackupVaults(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupVaultsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchUsableBackupVaultsRequest actualRequest = + ((FetchUsableBackupVaultsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchUsableBackupVaultsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.fetchUsableBackupVaults(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupVaultTest() throws Exception { + BackupVault expectedResponse = + BackupVault.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + + BackupVault actualResponse = client.getBackupVault(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + 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]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + BackupVault actualResponse = client.getBackupVault(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getBackupVault(name); + 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]", "[BACKUPVAULT]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupMinimumEnforcedRetentionDuration(Duration.newBuilder().build()) + .setDeletable(true) + .setEtag("etag3123477") + .setEffectiveTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setServiceAccount("serviceAccount1079137720") + .setTotalStoredBytes(1181597162) + .setUid("uid115792") + .putAllAnnotations(new HashMap()) + .setEncryptionConfig(BackupVault.EncryptionConfig.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupVaultTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.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 = mockBackupDR.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); + mockBackupDR.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(); + mockBackupDR.addResponse(resultOperation); + + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + + client.deleteBackupVaultAsync(name).get(); + + List actualRequests = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + 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(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupVaultAsync(name).get(); + + List actualRequests = mockBackupDR.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); + mockBackupDR.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 listDataSourcesTest() throws Exception { + DataSource responsesElement = DataSource.newBuilder().build(); + ListDataSourcesResponse expectedResponse = + ListDataSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllDataSources(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + + ListDataSourcesPagedResponse pagedListResponse = client.listDataSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourcesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataSourcesRequest actualRequest = ((ListDataSourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataSourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + client.listDataSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSourcesTest2() throws Exception { + DataSource responsesElement = DataSource.newBuilder().build(); + ListDataSourcesResponse expectedResponse = + ListDataSourcesResponse.newBuilder() + .setNextPageToken("") + .addAllDataSources(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataSourcesPagedResponse pagedListResponse = client.listDataSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourcesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataSourcesRequest actualRequest = ((ListDataSourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataSourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSourceTest() throws Exception { + DataSource expectedResponse = + DataSource.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setEtag("etag3123477") + .setTotalStoredBytes(1181597162) + .setConfigState(BackupConfigState.forNumber(0)) + .setBackupConfigInfo(BackupConfigInfo.newBuilder().build()) + .setBackupBlockedByVaultAccessRestriction(true) + .build(); + mockBackupDR.addResponse(expectedResponse); + + DataSourceName name = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + + DataSource actualResponse = client.getDataSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSourceRequest actualRequest = ((GetDataSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + DataSourceName name = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + client.getDataSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSourceTest2() throws Exception { + DataSource expectedResponse = + DataSource.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setEtag("etag3123477") + .setTotalStoredBytes(1181597162) + .setConfigState(BackupConfigState.forNumber(0)) + .setBackupConfigInfo(BackupConfigInfo.newBuilder().build()) + .setBackupBlockedByVaultAccessRestriction(true) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + DataSource actualResponse = client.getDataSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSourceRequest actualRequest = ((GetDataSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataSourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getDataSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateDataSourceTest() throws Exception { + DataSource expectedResponse = + DataSource.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBackupCount(336678994) + .setEtag("etag3123477") + .setTotalStoredBytes(1181597162) + .setConfigState(BackupConfigState.forNumber(0)) + .setBackupConfigInfo(BackupConfigInfo.newBuilder().build()) + .setBackupBlockedByVaultAccessRestriction(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + DataSource dataSource = DataSource.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataSource actualResponse = client.updateDataSourceAsync(dataSource, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataSourceRequest actualRequest = ((UpdateDataSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(dataSource, actualRequest.getDataSource()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + DataSource dataSource = DataSource.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataSourceAsync(dataSource, 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 listBackupsTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + ListBackupsResponse expectedResponse = + ListBackupsResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + + 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 = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + 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(); + mockBackupDR.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 = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchBackupsForResourceTypeTest() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + FetchBackupsForResourceTypeResponse expectedResponse = + FetchBackupsForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + String resourceType = "resourceType-384364440"; + + FetchBackupsForResourceTypePagedResponse pagedListResponse = + client.fetchBackupsForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchBackupsForResourceTypeRequest actualRequest = + ((FetchBackupsForResourceTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(resourceType, actualRequest.getResourceType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchBackupsForResourceTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + String resourceType = "resourceType-384364440"; + client.fetchBackupsForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchBackupsForResourceTypeTest2() throws Exception { + Backup responsesElement = Backup.newBuilder().build(); + FetchBackupsForResourceTypeResponse expectedResponse = + FetchBackupsForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllBackups(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String resourceType = "resourceType-384364440"; + + FetchBackupsForResourceTypePagedResponse pagedListResponse = + client.fetchBackupsForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchBackupsForResourceTypeRequest actualRequest = + ((FetchBackupsForResourceTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(resourceType, actualRequest.getResourceType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchBackupsForResourceTypeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + String resourceType = "resourceType-384364440"; + client.fetchBackupsForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[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]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + Backup actualResponse = client.getBackup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getBackup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.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 = mockBackupDR.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); + mockBackupDR.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 deleteBackupTest() throws Exception { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + + Backup actualResponse = client.deleteBackupAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.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); + mockBackupDR.addException(exception); + + try { + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[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 { + Backup expectedResponse = + Backup.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEnforcedRetentionEndTime(Timestamp.newBuilder().build()) + .setExpireTime(Timestamp.newBuilder().build()) + .setConsistencyTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .addAllServiceLocks(new ArrayList()) + .addAllBackupApplianceLocks(new ArrayList()) + .setResourceSizeBytes(-275424386) + .setSatisfiesPzs(true) + .setSatisfiesPzi(true) + .addAllKmsKeyVersions(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + + Backup actualResponse = client.deleteBackupAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.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); + mockBackupDR.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 restoreBackupTest() throws Exception { + RestoreBackupResponse expectedResponse = + RestoreBackupResponse.newBuilder() + .setTargetResource(TargetResource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + + RestoreBackupResponse actualResponse = client.restoreBackupAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreBackupRequest actualRequest = ((RestoreBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + client.restoreBackupAsync(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 restoreBackupTest2() throws Exception { + RestoreBackupResponse expectedResponse = + RestoreBackupResponse.newBuilder() + .setTargetResource(TargetResource.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restoreBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + + RestoreBackupResponse actualResponse = client.restoreBackupAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestoreBackupRequest actualRequest = ((RestoreBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restoreBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.restoreBackupAsync(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 createBackupPlanTest() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + + BackupPlan actualResponse = + client.createBackupPlanAsync(parent, backupPlan, backupPlanId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupPlanRequest actualRequest = ((CreateBackupPlanRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backupPlan, actualRequest.getBackupPlan()); + Assert.assertEquals(backupPlanId, actualRequest.getBackupPlanId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupPlanExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + client.createBackupPlanAsync(parent, backupPlan, backupPlanId).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 createBackupPlanTest2() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String parent = "parent-995424086"; + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + + BackupPlan actualResponse = + client.createBackupPlanAsync(parent, backupPlan, backupPlanId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupPlanRequest actualRequest = ((CreateBackupPlanRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backupPlan, actualRequest.getBackupPlan()); + Assert.assertEquals(backupPlanId, actualRequest.getBackupPlanId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupPlanExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + client.createBackupPlanAsync(parent, backupPlan, backupPlanId).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 updateBackupPlanTest() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BackupPlan actualResponse = client.updateBackupPlanAsync(backupPlan, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateBackupPlanRequest actualRequest = ((UpdateBackupPlanRequest) actualRequests.get(0)); + + Assert.assertEquals(backupPlan, actualRequest.getBackupPlan()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateBackupPlanExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupPlanAsync(backupPlan, 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 getBackupPlanTest() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + mockBackupDR.addResponse(expectedResponse); + + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + + BackupPlan actualResponse = client.getBackupPlan(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupPlanRequest actualRequest = ((GetBackupPlanRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupPlanExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + client.getBackupPlan(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupPlanTest2() throws Exception { + BackupPlan expectedResponse = + BackupPlan.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllBackupRules(new ArrayList()) + .setMaxCustomOnDemandRetentionDays(637255967) + .setResourceType("resourceType-384364440") + .setEtag("etag3123477") + .setBackupVault( + BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setBackupVaultServiceAccount("backupVaultServiceAccount1888664424") + .setLogRetentionDays(1566369587) + .addAllSupportedResourceTypes(new ArrayList()) + .setRevisionId("revisionId-1507445162") + .setRevisionName("revisionName-1250672378") + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + BackupPlan actualResponse = client.getBackupPlan(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupPlanRequest actualRequest = ((GetBackupPlanRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupPlanExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getBackupPlan(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlansTest() throws Exception { + BackupPlan responsesElement = BackupPlan.newBuilder().build(); + ListBackupPlansResponse expectedResponse = + ListBackupPlansResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlans(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBackupPlansPagedResponse pagedListResponse = client.listBackupPlans(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlansList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupPlansRequest actualRequest = ((ListBackupPlansRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupPlansExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBackupPlans(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlansTest2() throws Exception { + BackupPlan responsesElement = BackupPlan.newBuilder().build(); + ListBackupPlansResponse expectedResponse = + ListBackupPlansResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlans(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupPlansPagedResponse pagedListResponse = client.listBackupPlans(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlansList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupPlansRequest actualRequest = ((ListBackupPlansRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupPlansExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackupPlans(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBackupPlanTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + + client.deleteBackupPlanAsync(name).get(); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupPlanRequest actualRequest = ((DeleteBackupPlanRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupPlanExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + client.deleteBackupPlanAsync(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 deleteBackupPlanTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPlanTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupPlanAsync(name).get(); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupPlanRequest actualRequest = ((DeleteBackupPlanRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupPlanExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.deleteBackupPlanAsync(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 getBackupPlanRevisionTest() throws Exception { + BackupPlanRevision expectedResponse = + BackupPlanRevision.newBuilder() + .setName( + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]") + .toString()) + .setRevisionId("revisionId-1507445162") + .setBackupPlanSnapshot(BackupPlan.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + BackupPlanRevisionName name = + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]"); + + BackupPlanRevision actualResponse = client.getBackupPlanRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupPlanRevisionRequest actualRequest = + ((GetBackupPlanRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupPlanRevisionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlanRevisionName name = + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]"); + client.getBackupPlanRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupPlanRevisionTest2() throws Exception { + BackupPlanRevision expectedResponse = + BackupPlanRevision.newBuilder() + .setName( + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]") + .toString()) + .setRevisionId("revisionId-1507445162") + .setBackupPlanSnapshot(BackupPlan.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + BackupPlanRevision actualResponse = client.getBackupPlanRevision(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupPlanRevisionRequest actualRequest = + ((GetBackupPlanRevisionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupPlanRevisionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getBackupPlanRevision(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlanRevisionsTest() throws Exception { + BackupPlanRevision responsesElement = BackupPlanRevision.newBuilder().build(); + ListBackupPlanRevisionsResponse expectedResponse = + ListBackupPlanRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanRevisions(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + BackupPlanName parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + + ListBackupPlanRevisionsPagedResponse pagedListResponse = client.listBackupPlanRevisions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanRevisionsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupPlanRevisionsRequest actualRequest = + ((ListBackupPlanRevisionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupPlanRevisionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlanName parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + client.listBackupPlanRevisions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlanRevisionsTest2() throws Exception { + BackupPlanRevision responsesElement = BackupPlanRevision.newBuilder().build(); + ListBackupPlanRevisionsResponse expectedResponse = + ListBackupPlanRevisionsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanRevisions(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupPlanRevisionsPagedResponse pagedListResponse = client.listBackupPlanRevisions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanRevisionsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupPlanRevisionsRequest actualRequest = + ((ListBackupPlanRevisionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupPlanRevisionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackupPlanRevisions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createBackupPlanAssociationTest() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + + BackupPlanAssociation actualResponse = + client + .createBackupPlanAssociationAsync( + parent, backupPlanAssociation, backupPlanAssociationId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupPlanAssociationRequest actualRequest = + ((CreateBackupPlanAssociationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(backupPlanAssociation, actualRequest.getBackupPlanAssociation()); + Assert.assertEquals(backupPlanAssociationId, actualRequest.getBackupPlanAssociationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupPlanAssociationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + client + .createBackupPlanAssociationAsync(parent, backupPlanAssociation, backupPlanAssociationId) + .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 createBackupPlanAssociationTest2() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String parent = "parent-995424086"; + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + + BackupPlanAssociation actualResponse = + client + .createBackupPlanAssociationAsync( + parent, backupPlanAssociation, backupPlanAssociationId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateBackupPlanAssociationRequest actualRequest = + ((CreateBackupPlanAssociationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(backupPlanAssociation, actualRequest.getBackupPlanAssociation()); + Assert.assertEquals(backupPlanAssociationId, actualRequest.getBackupPlanAssociationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createBackupPlanAssociationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + client + .createBackupPlanAssociationAsync(parent, backupPlanAssociation, backupPlanAssociationId) + .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 updateBackupPlanAssociationTest() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + BackupPlanAssociation actualResponse = + client.updateBackupPlanAssociationAsync(backupPlanAssociation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateBackupPlanAssociationRequest actualRequest = + ((UpdateBackupPlanAssociationRequest) actualRequests.get(0)); + + Assert.assertEquals(backupPlanAssociation, actualRequest.getBackupPlanAssociation()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateBackupPlanAssociationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateBackupPlanAssociationAsync(backupPlanAssociation, 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 getBackupPlanAssociationTest() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + + BackupPlanAssociation actualResponse = client.getBackupPlanAssociation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupPlanAssociationRequest actualRequest = + ((GetBackupPlanAssociationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupPlanAssociationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + client.getBackupPlanAssociation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBackupPlanAssociationTest2() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + BackupPlanAssociation actualResponse = client.getBackupPlanAssociation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBackupPlanAssociationRequest actualRequest = + ((GetBackupPlanAssociationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBackupPlanAssociationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getBackupPlanAssociation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlanAssociationsTest() throws Exception { + BackupPlanAssociation responsesElement = BackupPlanAssociation.newBuilder().build(); + ListBackupPlanAssociationsResponse expectedResponse = + ListBackupPlanAssociationsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanAssociations(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListBackupPlanAssociationsPagedResponse pagedListResponse = + client.listBackupPlanAssociations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanAssociationsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupPlanAssociationsRequest actualRequest = + ((ListBackupPlanAssociationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupPlanAssociationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listBackupPlanAssociations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBackupPlanAssociationsTest2() throws Exception { + BackupPlanAssociation responsesElement = BackupPlanAssociation.newBuilder().build(); + ListBackupPlanAssociationsResponse expectedResponse = + ListBackupPlanAssociationsResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanAssociations(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBackupPlanAssociationsPagedResponse pagedListResponse = + client.listBackupPlanAssociations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanAssociationsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBackupPlanAssociationsRequest actualRequest = + ((ListBackupPlanAssociationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBackupPlanAssociationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBackupPlanAssociations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchBackupPlanAssociationsForResourceTypeTest() throws Exception { + BackupPlanAssociation responsesElement = BackupPlanAssociation.newBuilder().build(); + FetchBackupPlanAssociationsForResourceTypeResponse expectedResponse = + FetchBackupPlanAssociationsForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanAssociations(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String resourceType = "resourceType-384364440"; + + FetchBackupPlanAssociationsForResourceTypePagedResponse pagedListResponse = + client.fetchBackupPlanAssociationsForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanAssociationsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchBackupPlanAssociationsForResourceTypeRequest actualRequest = + ((FetchBackupPlanAssociationsForResourceTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(resourceType, actualRequest.getResourceType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchBackupPlanAssociationsForResourceTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String resourceType = "resourceType-384364440"; + client.fetchBackupPlanAssociationsForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchBackupPlanAssociationsForResourceTypeTest2() throws Exception { + BackupPlanAssociation responsesElement = BackupPlanAssociation.newBuilder().build(); + FetchBackupPlanAssociationsForResourceTypeResponse expectedResponse = + FetchBackupPlanAssociationsForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllBackupPlanAssociations(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String resourceType = "resourceType-384364440"; + + FetchBackupPlanAssociationsForResourceTypePagedResponse pagedListResponse = + client.fetchBackupPlanAssociationsForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBackupPlanAssociationsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchBackupPlanAssociationsForResourceTypeRequest actualRequest = + ((FetchBackupPlanAssociationsForResourceTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(resourceType, actualRequest.getResourceType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchBackupPlanAssociationsForResourceTypeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + String resourceType = "resourceType-384364440"; + client.fetchBackupPlanAssociationsForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteBackupPlanAssociationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + + client.deleteBackupPlanAssociationAsync(name).get(); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupPlanAssociationRequest actualRequest = + ((DeleteBackupPlanAssociationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupPlanAssociationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + client.deleteBackupPlanAssociationAsync(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 deleteBackupPlanAssociationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteBackupPlanAssociationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteBackupPlanAssociationAsync(name).get(); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteBackupPlanAssociationRequest actualRequest = + ((DeleteBackupPlanAssociationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteBackupPlanAssociationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.deleteBackupPlanAssociationAsync(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 triggerBackupTest() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("triggerBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + String ruleId = "ruleId-919875273"; + + BackupPlanAssociation actualResponse = client.triggerBackupAsync(name, ruleId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TriggerBackupRequest actualRequest = ((TriggerBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(ruleId, actualRequest.getRuleId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void triggerBackupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + String ruleId = "ruleId-919875273"; + client.triggerBackupAsync(name, ruleId).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 triggerBackupTest2() throws Exception { + BackupPlanAssociation expectedResponse = + BackupPlanAssociation.newBuilder() + .setName( + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setResourceType("resourceType-384364440") + .setResource("resource-341064690") + .setBackupPlan(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRulesConfigInfo(new ArrayList()) + .setDataSource("dataSource1272470629") + .setBackupPlanRevisionId("backupPlanRevisionId-222788415") + .setBackupPlanRevisionName("backupPlanRevisionName648847537") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("triggerBackupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + String ruleId = "ruleId-919875273"; + + BackupPlanAssociation actualResponse = client.triggerBackupAsync(name, ruleId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TriggerBackupRequest actualRequest = ((TriggerBackupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(ruleId, actualRequest.getRuleId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void triggerBackupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + String ruleId = "ruleId-919875273"; + client.triggerBackupAsync(name, ruleId).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 getDataSourceReferenceTest() throws Exception { + DataSourceReference expectedResponse = + DataSourceReference.newBuilder() + .setName( + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]") + .toString()) + .setDataSource( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDataSourceBackupConfigState(BackupConfigState.forNumber(0)) + .setDataSourceBackupCount(-1620010527) + .setDataSourceBackupConfigInfo(DataSourceBackupConfigInfo.newBuilder().build()) + .setDataSourceGcpResourceInfo(DataSourceGcpResourceInfo.newBuilder().build()) + .setTotalStoredBytes(1181597162) + .build(); + mockBackupDR.addResponse(expectedResponse); + + DataSourceReferenceName name = + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]"); + + DataSourceReference actualResponse = client.getDataSourceReference(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSourceReferenceRequest actualRequest = + ((GetDataSourceReferenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataSourceReferenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + DataSourceReferenceName name = + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]"); + client.getDataSourceReference(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSourceReferenceTest2() throws Exception { + DataSourceReference expectedResponse = + DataSourceReference.newBuilder() + .setName( + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]") + .toString()) + .setDataSource( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setDataSourceBackupConfigState(BackupConfigState.forNumber(0)) + .setDataSourceBackupCount(-1620010527) + .setDataSourceBackupConfigInfo(DataSourceBackupConfigInfo.newBuilder().build()) + .setDataSourceGcpResourceInfo(DataSourceGcpResourceInfo.newBuilder().build()) + .setTotalStoredBytes(1181597162) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + DataSourceReference actualResponse = client.getDataSourceReference(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSourceReferenceRequest actualRequest = + ((GetDataSourceReferenceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataSourceReferenceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getDataSourceReference(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSourceReferencesTest() throws Exception { + DataSourceReference responsesElement = DataSourceReference.newBuilder().build(); + ListDataSourceReferencesResponse expectedResponse = + ListDataSourceReferencesResponse.newBuilder() + .setNextPageToken("") + .addAllDataSourceReferences(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDataSourceReferencesPagedResponse pagedListResponse = + client.listDataSourceReferences(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourceReferencesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataSourceReferencesRequest actualRequest = + ((ListDataSourceReferencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataSourceReferencesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDataSourceReferences(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataSourceReferencesTest2() throws Exception { + DataSourceReference responsesElement = DataSourceReference.newBuilder().build(); + ListDataSourceReferencesResponse expectedResponse = + ListDataSourceReferencesResponse.newBuilder() + .setNextPageToken("") + .addAllDataSourceReferences(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataSourceReferencesPagedResponse pagedListResponse = + client.listDataSourceReferences(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourceReferencesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataSourceReferencesRequest actualRequest = + ((ListDataSourceReferencesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataSourceReferencesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataSourceReferences(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchDataSourceReferencesForResourceTypeTest() throws Exception { + DataSourceReference responsesElement = DataSourceReference.newBuilder().build(); + FetchDataSourceReferencesForResourceTypeResponse expectedResponse = + FetchDataSourceReferencesForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllDataSourceReferences(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String resourceType = "resourceType-384364440"; + + FetchDataSourceReferencesForResourceTypePagedResponse pagedListResponse = + client.fetchDataSourceReferencesForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourceReferencesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchDataSourceReferencesForResourceTypeRequest actualRequest = + ((FetchDataSourceReferencesForResourceTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(resourceType, actualRequest.getResourceType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchDataSourceReferencesForResourceTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String resourceType = "resourceType-384364440"; + client.fetchDataSourceReferencesForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchDataSourceReferencesForResourceTypeTest2() throws Exception { + DataSourceReference responsesElement = DataSourceReference.newBuilder().build(); + FetchDataSourceReferencesForResourceTypeResponse expectedResponse = + FetchDataSourceReferencesForResourceTypeResponse.newBuilder() + .setNextPageToken("") + .addAllDataSourceReferences(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String resourceType = "resourceType-384364440"; + + FetchDataSourceReferencesForResourceTypePagedResponse pagedListResponse = + client.fetchDataSourceReferencesForResourceType(parent, resourceType); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourceReferencesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchDataSourceReferencesForResourceTypeRequest actualRequest = + ((FetchDataSourceReferencesForResourceTypeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(resourceType, actualRequest.getResourceType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchDataSourceReferencesForResourceTypeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + String resourceType = "resourceType-384364440"; + client.fetchDataSourceReferencesForResourceType(parent, resourceType); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void initializeServiceTest() throws Exception { + InitializeServiceResponse expectedResponse = + InitializeServiceResponse.newBuilder() + .setBackupVaultName("backupVaultName1928739899") + .setBackupPlanName("backupPlanName42972470") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("initializeServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + InitializeServiceRequest request = + InitializeServiceRequest.newBuilder() + .setName("name3373707") + .setResourceType("resourceType-384364440") + .setRequestId("requestId693933066") + .setBackupPlanLocation("backupPlanLocation543722720") + .setValidateOnly(true) + .build(); + + InitializeServiceResponse actualResponse = client.initializeServiceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + InitializeServiceRequest actualRequest = ((InitializeServiceRequest) actualRequests.get(0)); + + Assert.assertEquals( + request.getCloudSqlInstanceInitializationConfig(), + actualRequest.getCloudSqlInstanceInitializationConfig()); + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getResourceType(), actualRequest.getResourceType()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertEquals(request.getBackupPlanLocation(), actualRequest.getBackupPlanLocation()); + Assert.assertEquals(request.getValidateOnly(), actualRequest.getValidateOnly()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void initializeServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + InitializeServiceRequest request = + InitializeServiceRequest.newBuilder() + .setName("name3373707") + .setResourceType("resourceType-384364440") + .setRequestId("requestId693933066") + .setBackupPlanLocation("backupPlanLocation543722720") + .setValidateOnly(true) + .build(); + client.initializeServiceAsync(request).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 createAutoProtectionPolicyTest() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + + AutoProtectionPolicy actualResponse = + client + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAutoProtectionPolicyRequest actualRequest = + ((CreateAutoProtectionPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(autoProtectionPolicy, actualRequest.getAutoProtectionPolicy()); + Assert.assertEquals(autoProtectionPolicyId, actualRequest.getAutoProtectionPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAutoProtectionPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + client + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .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 createAutoProtectionPolicyTest2() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String parent = "parent-995424086"; + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + + AutoProtectionPolicy actualResponse = + client + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAutoProtectionPolicyRequest actualRequest = + ((CreateAutoProtectionPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(autoProtectionPolicy, actualRequest.getAutoProtectionPolicy()); + Assert.assertEquals(autoProtectionPolicyId, actualRequest.getAutoProtectionPolicyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAutoProtectionPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + client + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .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 listAutoProtectionPoliciesTest() throws Exception { + AutoProtectionPolicy responsesElement = AutoProtectionPolicy.newBuilder().build(); + ListAutoProtectionPoliciesResponse expectedResponse = + ListAutoProtectionPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllAutoProtectionPolicies(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAutoProtectionPoliciesPagedResponse pagedListResponse = + client.listAutoProtectionPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutoProtectionPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAutoProtectionPoliciesRequest actualRequest = + ((ListAutoProtectionPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAutoProtectionPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAutoProtectionPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutoProtectionPoliciesTest2() throws Exception { + AutoProtectionPolicy responsesElement = AutoProtectionPolicy.newBuilder().build(); + ListAutoProtectionPoliciesResponse expectedResponse = + ListAutoProtectionPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllAutoProtectionPolicies(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAutoProtectionPoliciesPagedResponse pagedListResponse = + client.listAutoProtectionPolicies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutoProtectionPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAutoProtectionPoliciesRequest actualRequest = + ((ListAutoProtectionPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAutoProtectionPoliciesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAutoProtectionPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutoProtectionPolicyTest() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + + AutoProtectionPolicy actualResponse = client.getAutoProtectionPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAutoProtectionPolicyRequest actualRequest = + ((GetAutoProtectionPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAutoProtectionPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + client.getAutoProtectionPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutoProtectionPolicyTest2() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + AutoProtectionPolicy actualResponse = client.getAutoProtectionPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAutoProtectionPolicyRequest actualRequest = + ((GetAutoProtectionPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAutoProtectionPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getAutoProtectionPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAutoProtectionPolicyTest() throws Exception { + AutoProtectionPolicy expectedResponse = + AutoProtectionPolicy.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setDescription("description-1724546052") + .addAllBackupPlanDetails(new ArrayList()) + .setCriteria(Criteria.newBuilder().build()) + .setEtag("etag3123477") + .setBindingSummary(BindingSummary.newBuilder().build()) + .setPolicyEvaluationSummary(PolicyEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AutoProtectionPolicy actualResponse = + client.updateAutoProtectionPolicyAsync(autoProtectionPolicy, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAutoProtectionPolicyRequest actualRequest = + ((UpdateAutoProtectionPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(autoProtectionPolicy, actualRequest.getAutoProtectionPolicy()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAutoProtectionPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAutoProtectionPolicyAsync(autoProtectionPolicy, 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 deleteAutoProtectionPolicyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + + client.deleteAutoProtectionPolicyAsync(name).get(); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAutoProtectionPolicyRequest actualRequest = + ((DeleteAutoProtectionPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAutoProtectionPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + client.deleteAutoProtectionPolicyAsync(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 deleteAutoProtectionPolicyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAutoProtectionPolicyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAutoProtectionPolicyAsync(name).get(); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAutoProtectionPolicyRequest actualRequest = + ((DeleteAutoProtectionPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAutoProtectionPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.deleteAutoProtectionPolicyAsync(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 createAutoProtectionPolicyBindingTest() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutoProtectionPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + + AutoProtectionPolicyBinding actualResponse = + client + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAutoProtectionPolicyBindingRequest actualRequest = + ((CreateAutoProtectionPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + autoProtectionPolicyBinding, actualRequest.getAutoProtectionPolicyBinding()); + Assert.assertEquals( + autoProtectionPolicyBindingId, actualRequest.getAutoProtectionPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAutoProtectionPolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + client + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .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 createAutoProtectionPolicyBindingTest2() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutoProtectionPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String parent = "parent-995424086"; + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + + AutoProtectionPolicyBinding actualResponse = + client + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAutoProtectionPolicyBindingRequest actualRequest = + ((CreateAutoProtectionPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + autoProtectionPolicyBinding, actualRequest.getAutoProtectionPolicyBinding()); + Assert.assertEquals( + autoProtectionPolicyBindingId, actualRequest.getAutoProtectionPolicyBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAutoProtectionPolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + client + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .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 getAutoProtectionPolicyBindingTest() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockBackupDR.addResponse(expectedResponse); + + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + + AutoProtectionPolicyBinding actualResponse = client.getAutoProtectionPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAutoProtectionPolicyBindingRequest actualRequest = + ((GetAutoProtectionPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAutoProtectionPolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + client.getAutoProtectionPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutoProtectionPolicyBindingTest2() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + AutoProtectionPolicyBinding actualResponse = client.getAutoProtectionPolicyBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAutoProtectionPolicyBindingRequest actualRequest = + ((GetAutoProtectionPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAutoProtectionPolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getAutoProtectionPolicyBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutoProtectionPolicyBindingsTest() throws Exception { + AutoProtectionPolicyBinding responsesElement = AutoProtectionPolicyBinding.newBuilder().build(); + ListAutoProtectionPolicyBindingsResponse expectedResponse = + ListAutoProtectionPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAutoProtectionPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + + ListAutoProtectionPolicyBindingsPagedResponse pagedListResponse = + client.listAutoProtectionPolicyBindings(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getAutoProtectionPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAutoProtectionPolicyBindingsRequest actualRequest = + ((ListAutoProtectionPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAutoProtectionPolicyBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + client.listAutoProtectionPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutoProtectionPolicyBindingsTest2() throws Exception { + AutoProtectionPolicyBinding responsesElement = AutoProtectionPolicyBinding.newBuilder().build(); + ListAutoProtectionPolicyBindingsResponse expectedResponse = + ListAutoProtectionPolicyBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllAutoProtectionPolicyBindings(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAutoProtectionPolicyBindingsPagedResponse pagedListResponse = + client.listAutoProtectionPolicyBindings(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getAutoProtectionPolicyBindingsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAutoProtectionPolicyBindingsRequest actualRequest = + ((ListAutoProtectionPolicyBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAutoProtectionPolicyBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAutoProtectionPolicyBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAppliedAutoProtectionPoliciesTest() throws Exception { + AppliedAutoProtectionPolicy responsesElement = AppliedAutoProtectionPolicy.newBuilder().build(); + ListAppliedAutoProtectionPoliciesResponse expectedResponse = + ListAppliedAutoProtectionPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllAppliedAutoProtectionPolicies(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAppliedAutoProtectionPoliciesPagedResponse pagedListResponse = + client.listAppliedAutoProtectionPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getAppliedAutoProtectionPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAppliedAutoProtectionPoliciesRequest actualRequest = + ((ListAppliedAutoProtectionPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAppliedAutoProtectionPoliciesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAppliedAutoProtectionPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAppliedAutoProtectionPoliciesTest2() throws Exception { + AppliedAutoProtectionPolicy responsesElement = AppliedAutoProtectionPolicy.newBuilder().build(); + ListAppliedAutoProtectionPoliciesResponse expectedResponse = + ListAppliedAutoProtectionPoliciesResponse.newBuilder() + .setNextPageToken("") + .addAllAppliedAutoProtectionPolicies(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAppliedAutoProtectionPoliciesPagedResponse pagedListResponse = + client.listAppliedAutoProtectionPolicies(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getAppliedAutoProtectionPoliciesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAppliedAutoProtectionPoliciesRequest actualRequest = + ((ListAppliedAutoProtectionPoliciesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAppliedAutoProtectionPoliciesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAppliedAutoProtectionPolicies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void initiateDeleteAutoProtectionPolicyBindingTest() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("initiateDeleteAutoProtectionPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + + AutoProtectionPolicyBinding actualResponse = + client.initiateDeleteAutoProtectionPolicyBindingAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + InitiateDeleteAutoProtectionPolicyBindingRequest actualRequest = + ((InitiateDeleteAutoProtectionPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void initiateDeleteAutoProtectionPolicyBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + client.initiateDeleteAutoProtectionPolicyBindingAsync(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 initiateDeleteAutoProtectionPolicyBindingTest2() throws Exception { + AutoProtectionPolicyBinding expectedResponse = + AutoProtectionPolicyBinding.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setDescription("description-1724546052") + .setScope( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setBindingEvaluationSummary(BindingEvaluationSummary.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("initiateDeleteAutoProtectionPolicyBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBackupDR.addResponse(resultOperation); + + String name = "name3373707"; + + AutoProtectionPolicyBinding actualResponse = + client.initiateDeleteAutoProtectionPolicyBindingAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + InitiateDeleteAutoProtectionPolicyBindingRequest actualRequest = + ((InitiateDeleteAutoProtectionPolicyBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void initiateDeleteAutoProtectionPolicyBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.initiateDeleteAutoProtectionPolicyBindingAsync(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 getBindingMatchingResourceTest() throws Exception { + BindingMatchingResource expectedResponse = + BindingMatchingResource.newBuilder() + .setName( + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]") + .toString()) + .setResource("resource-341064690") + .setLastEvaluationTime(Timestamp.newBuilder().build()) + .setAutoProtectionDetails(AutoProtectionDetails.newBuilder().build()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + BindingMatchingResourceName name = + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]"); + + BindingMatchingResource actualResponse = client.getBindingMatchingResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBindingMatchingResourceRequest actualRequest = + ((GetBindingMatchingResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBindingMatchingResourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + BindingMatchingResourceName name = + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]"); + client.getBindingMatchingResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getBindingMatchingResourceTest2() throws Exception { + BindingMatchingResource expectedResponse = + BindingMatchingResource.newBuilder() + .setName( + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]") + .toString()) + .setResource("resource-341064690") + .setLastEvaluationTime(Timestamp.newBuilder().build()) + .setAutoProtectionDetails(AutoProtectionDetails.newBuilder().build()) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String name = "name3373707"; + + BindingMatchingResource actualResponse = client.getBindingMatchingResource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetBindingMatchingResourceRequest actualRequest = + ((GetBindingMatchingResourceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getBindingMatchingResourceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String name = "name3373707"; + client.getBindingMatchingResource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBindingMatchingResourcesTest() throws Exception { + BindingMatchingResource responsesElement = BindingMatchingResource.newBuilder().build(); + ListBindingMatchingResourcesResponse expectedResponse = + ListBindingMatchingResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllMatchingResources(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + AutoProtectionPolicyBindingName parent = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + + ListBindingMatchingResourcesPagedResponse pagedListResponse = + client.listBindingMatchingResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMatchingResourcesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBindingMatchingResourcesRequest actualRequest = + ((ListBindingMatchingResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBindingMatchingResourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + AutoProtectionPolicyBindingName parent = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + client.listBindingMatchingResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listBindingMatchingResourcesTest2() throws Exception { + BindingMatchingResource responsesElement = BindingMatchingResource.newBuilder().build(); + ListBindingMatchingResourcesResponse expectedResponse = + ListBindingMatchingResourcesResponse.newBuilder() + .setNextPageToken("") + .addAllMatchingResources(Arrays.asList(responsesElement)) + .build(); + mockBackupDR.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListBindingMatchingResourcesPagedResponse pagedListResponse = + client.listBindingMatchingResources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getMatchingResourcesList().get(0), resources.get(0)); + + List actualRequests = mockBackupDR.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListBindingMatchingResourcesRequest actualRequest = + ((ListBindingMatchingResourcesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listBindingMatchingResourcesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDR.addException(exception); + + try { + String parent = "parent-995424086"; + client.listBindingMatchingResources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClientHttpJsonTest.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClientHttpJsonTest.java new file mode 100644 index 000000000000..d56b62528da3 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClientHttpJsonTest.java @@ -0,0 +1,484 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListResourceBackupConfigsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.backupdr.v1beta.stub.HttpJsonBackupDrProtectionSummaryStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BackupDrProtectionSummaryClientHttpJsonTest { + private static MockHttpService mockService; + private static BackupDrProtectionSummaryClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonBackupDrProtectionSummaryStub.getMethodDescriptors(), + BackupDrProtectionSummarySettings.getDefaultEndpoint()); + BackupDrProtectionSummarySettings settings = + BackupDrProtectionSummarySettings.newHttpJsonBuilder() + .setTransportChannelProvider( + BackupDrProtectionSummarySettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BackupDrProtectionSummaryClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listResourceBackupConfigsTest() throws Exception { + ResourceBackupConfig responsesElement = ResourceBackupConfig.newBuilder().build(); + ListResourceBackupConfigsResponse expectedResponse = + ListResourceBackupConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllResourceBackupConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListResourceBackupConfigsPagedResponse pagedListResponse = + client.listResourceBackupConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceBackupConfigsList().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 listResourceBackupConfigsExceptionTest() 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.listResourceBackupConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourceBackupConfigsTest2() throws Exception { + ResourceBackupConfig responsesElement = ResourceBackupConfig.newBuilder().build(); + ListResourceBackupConfigsResponse expectedResponse = + ListResourceBackupConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllResourceBackupConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListResourceBackupConfigsPagedResponse pagedListResponse = + client.listResourceBackupConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceBackupConfigsList().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 listResourceBackupConfigsExceptionTest2() 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.listResourceBackupConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + 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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + 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 setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + 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 getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + 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 testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClientTest.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClientTest.java new file mode 100644 index 000000000000..d18f4929ebe3 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryClientTest.java @@ -0,0 +1,454 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListLocationsPagedResponse; +import static com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient.ListResourceBackupConfigsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.FieldMask; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BackupDrProtectionSummaryClientTest { + private static MockBackupDrProtectionSummary mockBackupDrProtectionSummary; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private BackupDrProtectionSummaryClient client; + + @BeforeClass + public static void startStaticServer() { + mockBackupDrProtectionSummary = new MockBackupDrProtectionSummary(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockBackupDrProtectionSummary, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + BackupDrProtectionSummarySettings settings = + BackupDrProtectionSummarySettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BackupDrProtectionSummaryClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listResourceBackupConfigsTest() throws Exception { + ResourceBackupConfig responsesElement = ResourceBackupConfig.newBuilder().build(); + ListResourceBackupConfigsResponse expectedResponse = + ListResourceBackupConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllResourceBackupConfigs(Arrays.asList(responsesElement)) + .build(); + mockBackupDrProtectionSummary.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListResourceBackupConfigsPagedResponse pagedListResponse = + client.listResourceBackupConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceBackupConfigsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDrProtectionSummary.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListResourceBackupConfigsRequest actualRequest = + ((ListResourceBackupConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listResourceBackupConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDrProtectionSummary.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listResourceBackupConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listResourceBackupConfigsTest2() throws Exception { + ResourceBackupConfig responsesElement = ResourceBackupConfig.newBuilder().build(); + ListResourceBackupConfigsResponse expectedResponse = + ListResourceBackupConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllResourceBackupConfigs(Arrays.asList(responsesElement)) + .build(); + mockBackupDrProtectionSummary.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListResourceBackupConfigsPagedResponse pagedListResponse = + client.listResourceBackupConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getResourceBackupConfigsList().get(0), resources.get(0)); + + List actualRequests = mockBackupDrProtectionSummary.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListResourceBackupConfigsRequest actualRequest = + ((ListResourceBackupConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listResourceBackupConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBackupDrProtectionSummary.addException(exception); + + try { + String parent = "parent-995424086"; + client.listResourceBackupConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDR.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDR.java new file mode 100644 index 000000000000..60fc57fafd44 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDR.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBackupDR implements MockGrpcService { + private final MockBackupDRImpl serviceImpl; + + public MockBackupDR() { + serviceImpl = new MockBackupDRImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDRImpl.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDRImpl.java new file mode 100644 index 000000000000..b075fd24f4f2 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDRImpl.java @@ -0,0 +1,1135 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.backupdr.v1beta.BackupDRGrpc.BackupDRImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBackupDRImpl extends BackupDRImplBase { + private List requests; + private Queue responses; + + public MockBackupDRImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listManagementServers( + ListManagementServersRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListManagementServersResponse) { + requests.add(request); + responseObserver.onNext(((ListManagementServersResponse) 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 ListManagementServers, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListManagementServersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getManagementServer( + GetManagementServerRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ManagementServer) { + requests.add(request); + responseObserver.onNext(((ManagementServer) 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 GetManagementServer, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ManagementServer.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createManagementServer( + CreateManagementServerRequest 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 CreateManagementServer, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteManagementServer( + DeleteManagementServerRequest 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 DeleteManagementServer, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + 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 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 fetchUsableBackupVaults( + FetchUsableBackupVaultsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchUsableBackupVaultsResponse) { + requests.add(request); + responseObserver.onNext(((FetchUsableBackupVaultsResponse) 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 FetchUsableBackupVaults, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + FetchUsableBackupVaultsResponse.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 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 listDataSources( + ListDataSourcesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataSourcesResponse) { + requests.add(request); + responseObserver.onNext(((ListDataSourcesResponse) 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 ListDataSources, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDataSourcesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataSource( + GetDataSourceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataSource) { + requests.add(request); + responseObserver.onNext(((DataSource) 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 GetDataSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataSource.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataSource( + UpdateDataSourceRequest 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 UpdateDataSource, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.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 fetchBackupsForResourceType( + FetchBackupsForResourceTypeRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchBackupsForResourceTypeResponse) { + requests.add(request); + responseObserver.onNext(((FetchBackupsForResourceTypeResponse) 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 FetchBackupsForResourceType, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + FetchBackupsForResourceTypeResponse.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 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 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 restoreBackup( + RestoreBackupRequest 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 RestoreBackup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createBackupPlan( + CreateBackupPlanRequest 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 CreateBackupPlan, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateBackupPlan( + UpdateBackupPlanRequest 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 UpdateBackupPlan, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBackupPlan( + GetBackupPlanRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BackupPlan) { + requests.add(request); + responseObserver.onNext(((BackupPlan) 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 GetBackupPlan, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + BackupPlan.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBackupPlans( + ListBackupPlansRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBackupPlansResponse) { + requests.add(request); + responseObserver.onNext(((ListBackupPlansResponse) 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 ListBackupPlans, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBackupPlansResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteBackupPlan( + DeleteBackupPlanRequest 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 DeleteBackupPlan, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBackupPlanRevision( + GetBackupPlanRevisionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BackupPlanRevision) { + requests.add(request); + responseObserver.onNext(((BackupPlanRevision) 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 GetBackupPlanRevision, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + BackupPlanRevision.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBackupPlanRevisions( + ListBackupPlanRevisionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBackupPlanRevisionsResponse) { + requests.add(request); + responseObserver.onNext(((ListBackupPlanRevisionsResponse) 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 ListBackupPlanRevisions, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListBackupPlanRevisionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createBackupPlanAssociation( + CreateBackupPlanAssociationRequest 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 CreateBackupPlanAssociation, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateBackupPlanAssociation( + UpdateBackupPlanAssociationRequest 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 UpdateBackupPlanAssociation, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBackupPlanAssociation( + GetBackupPlanAssociationRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BackupPlanAssociation) { + requests.add(request); + responseObserver.onNext(((BackupPlanAssociation) 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 GetBackupPlanAssociation, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + BackupPlanAssociation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBackupPlanAssociations( + ListBackupPlanAssociationsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBackupPlanAssociationsResponse) { + requests.add(request); + responseObserver.onNext(((ListBackupPlanAssociationsResponse) 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 ListBackupPlanAssociations, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ListBackupPlanAssociationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void fetchBackupPlanAssociationsForResourceType( + FetchBackupPlanAssociationsForResourceTypeRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchBackupPlanAssociationsForResourceTypeResponse) { + requests.add(request); + responseObserver.onNext(((FetchBackupPlanAssociationsForResourceTypeResponse) 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" + + " FetchBackupPlanAssociationsForResourceType, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FetchBackupPlanAssociationsForResourceTypeResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteBackupPlanAssociation( + DeleteBackupPlanAssociationRequest 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 DeleteBackupPlanAssociation, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void triggerBackup( + TriggerBackupRequest 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 TriggerBackup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataSourceReference( + GetDataSourceReferenceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataSourceReference) { + requests.add(request); + responseObserver.onNext(((DataSourceReference) 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 GetDataSourceReference, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + DataSourceReference.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDataSourceReferences( + ListDataSourceReferencesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataSourceReferencesResponse) { + requests.add(request); + responseObserver.onNext(((ListDataSourceReferencesResponse) 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 ListDataSourceReferences, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ListDataSourceReferencesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void fetchDataSourceReferencesForResourceType( + FetchDataSourceReferencesForResourceTypeRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchDataSourceReferencesForResourceTypeResponse) { + requests.add(request); + responseObserver.onNext(((FetchDataSourceReferencesForResourceTypeResponse) 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" + + " FetchDataSourceReferencesForResourceType, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FetchDataSourceReferencesForResourceTypeResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void initializeService( + InitializeServiceRequest 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 InitializeService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAutoProtectionPolicy( + CreateAutoProtectionPolicyRequest 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 CreateAutoProtectionPolicy, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAutoProtectionPolicies( + ListAutoProtectionPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAutoProtectionPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((ListAutoProtectionPoliciesResponse) 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 ListAutoProtectionPolicies, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ListAutoProtectionPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAutoProtectionPolicy( + GetAutoProtectionPolicyRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AutoProtectionPolicy) { + requests.add(request); + responseObserver.onNext(((AutoProtectionPolicy) 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 GetAutoProtectionPolicy, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + AutoProtectionPolicy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAutoProtectionPolicy( + UpdateAutoProtectionPolicyRequest 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 UpdateAutoProtectionPolicy, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAutoProtectionPolicy( + DeleteAutoProtectionPolicyRequest 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 DeleteAutoProtectionPolicy, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAutoProtectionPolicyBinding( + CreateAutoProtectionPolicyBindingRequest 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 CreateAutoProtectionPolicyBinding," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAutoProtectionPolicyBinding( + GetAutoProtectionPolicyBindingRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AutoProtectionPolicyBinding) { + requests.add(request); + responseObserver.onNext(((AutoProtectionPolicyBinding) 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 GetAutoProtectionPolicyBinding," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AutoProtectionPolicyBinding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAutoProtectionPolicyBindings( + ListAutoProtectionPolicyBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAutoProtectionPolicyBindingsResponse) { + requests.add(request); + responseObserver.onNext(((ListAutoProtectionPolicyBindingsResponse) 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 ListAutoProtectionPolicyBindings," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAutoProtectionPolicyBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAppliedAutoProtectionPolicies( + ListAppliedAutoProtectionPoliciesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAppliedAutoProtectionPoliciesResponse) { + requests.add(request); + responseObserver.onNext(((ListAppliedAutoProtectionPoliciesResponse) 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 ListAppliedAutoProtectionPolicies," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAppliedAutoProtectionPoliciesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void initiateDeleteAutoProtectionPolicyBinding( + InitiateDeleteAutoProtectionPolicyBindingRequest 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" + + " InitiateDeleteAutoProtectionPolicyBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getBindingMatchingResource( + GetBindingMatchingResourceRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof BindingMatchingResource) { + requests.add(request); + responseObserver.onNext(((BindingMatchingResource) 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 GetBindingMatchingResource, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + BindingMatchingResource.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listBindingMatchingResources( + ListBindingMatchingResourcesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListBindingMatchingResourcesResponse) { + requests.add(request); + responseObserver.onNext(((ListBindingMatchingResourcesResponse) 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 ListBindingMatchingResources, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + ListBindingMatchingResourcesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDrProtectionSummary.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDrProtectionSummary.java new file mode 100644 index 000000000000..16c3cb12ebdf --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDrProtectionSummary.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBackupDrProtectionSummary implements MockGrpcService { + private final MockBackupDrProtectionSummaryImpl serviceImpl; + + public MockBackupDrProtectionSummary() { + serviceImpl = new MockBackupDrProtectionSummaryImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDrProtectionSummaryImpl.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDrProtectionSummaryImpl.java new file mode 100644 index 000000000000..47277a6403cb --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockBackupDrProtectionSummaryImpl.java @@ -0,0 +1,83 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryGrpc.BackupDrProtectionSummaryImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBackupDrProtectionSummaryImpl extends BackupDrProtectionSummaryImplBase { + private List requests; + private Queue responses; + + public MockBackupDrProtectionSummaryImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listResourceBackupConfigs( + ListResourceBackupConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListResourceBackupConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListResourceBackupConfigsResponse) 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 ListResourceBackupConfigs, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ListResourceBackupConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockIAMPolicy.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockIAMPolicy.java new file mode 100644 index 000000000000..062e71607821 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockIAMPolicyImpl.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..93d6d5dfe648 --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) 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 TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockLocations.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockLocations.java new file mode 100644 index 000000000000..218c4ebf503b --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockLocationsImpl.java b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockLocationsImpl.java new file mode 100644 index 000000000000..c85c2acdbbfa --- /dev/null +++ b/java-backupdr/google-cloud-backupdr/src/test/java/com/google/cloud/backupdr/v1beta/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) 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 ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) 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 GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-backupdr/grpc-google-cloud-backupdr-v1beta/pom.xml b/java-backupdr/grpc-google-cloud-backupdr-v1beta/pom.xml new file mode 100644 index 000000000000..7e8879e6174e --- /dev/null +++ b/java-backupdr/grpc-google-cloud-backupdr-v1beta/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-backupdr-v1beta + 0.57.0-SNAPSHOT + grpc-google-cloud-backupdr-v1beta + GRPC library for google-cloud-backupdr + + com.google.cloud + google-cloud-backupdr-parent + 0.57.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-backupdr-v1beta + + + com.google.guava + guava + + + diff --git a/java-backupdr/grpc-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRGrpc.java b/java-backupdr/grpc-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRGrpc.java new file mode 100644 index 000000000000..01c6831ac98e --- /dev/null +++ b/java-backupdr/grpc-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRGrpc.java @@ -0,0 +1,7006 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The BackupDR Service
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class BackupDRGrpc { + + private BackupDRGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.backupdr.v1beta.BackupDR"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListManagementServersRequest, + com.google.cloud.backupdr.v1beta.ListManagementServersResponse> + getListManagementServersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListManagementServers", + requestType = com.google.cloud.backupdr.v1beta.ListManagementServersRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListManagementServersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListManagementServersRequest, + com.google.cloud.backupdr.v1beta.ListManagementServersResponse> + getListManagementServersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListManagementServersRequest, + com.google.cloud.backupdr.v1beta.ListManagementServersResponse> + getListManagementServersMethod; + if ((getListManagementServersMethod = BackupDRGrpc.getListManagementServersMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getListManagementServersMethod = BackupDRGrpc.getListManagementServersMethod) + == null) { + BackupDRGrpc.getListManagementServersMethod = + getListManagementServersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListManagementServers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListManagementServersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("ListManagementServers")) + .build(); + } + } + } + return getListManagementServersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetManagementServerRequest, + com.google.cloud.backupdr.v1beta.ManagementServer> + getGetManagementServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetManagementServer", + requestType = com.google.cloud.backupdr.v1beta.GetManagementServerRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ManagementServer.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetManagementServerRequest, + com.google.cloud.backupdr.v1beta.ManagementServer> + getGetManagementServerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetManagementServerRequest, + com.google.cloud.backupdr.v1beta.ManagementServer> + getGetManagementServerMethod; + if ((getGetManagementServerMethod = BackupDRGrpc.getGetManagementServerMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetManagementServerMethod = BackupDRGrpc.getGetManagementServerMethod) == null) { + BackupDRGrpc.getGetManagementServerMethod = + getGetManagementServerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetManagementServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetManagementServerRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ManagementServer + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("GetManagementServer")) + .build(); + } + } + } + return getGetManagementServerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest, + com.google.longrunning.Operation> + getCreateManagementServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateManagementServer", + requestType = com.google.cloud.backupdr.v1beta.CreateManagementServerRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest, + com.google.longrunning.Operation> + getCreateManagementServerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest, + com.google.longrunning.Operation> + getCreateManagementServerMethod; + if ((getCreateManagementServerMethod = BackupDRGrpc.getCreateManagementServerMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getCreateManagementServerMethod = BackupDRGrpc.getCreateManagementServerMethod) + == null) { + BackupDRGrpc.getCreateManagementServerMethod = + getCreateManagementServerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateManagementServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("CreateManagementServer")) + .build(); + } + } + } + return getCreateManagementServerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest, + com.google.longrunning.Operation> + getDeleteManagementServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteManagementServer", + requestType = com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest, + com.google.longrunning.Operation> + getDeleteManagementServerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest, + com.google.longrunning.Operation> + getDeleteManagementServerMethod; + if ((getDeleteManagementServerMethod = BackupDRGrpc.getDeleteManagementServerMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getDeleteManagementServerMethod = BackupDRGrpc.getDeleteManagementServerMethod) + == null) { + BackupDRGrpc.getDeleteManagementServerMethod = + getDeleteManagementServerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteManagementServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("DeleteManagementServer")) + .build(); + } + } + } + return getDeleteManagementServerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest, + com.google.longrunning.Operation> + getCreateBackupVaultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackupVault", + requestType = com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest, + com.google.longrunning.Operation> + getCreateBackupVaultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest, + com.google.longrunning.Operation> + getCreateBackupVaultMethod; + if ((getCreateBackupVaultMethod = BackupDRGrpc.getCreateBackupVaultMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getCreateBackupVaultMethod = BackupDRGrpc.getCreateBackupVaultMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.CreateBackupVaultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("CreateBackupVault")) + .build(); + } + } + } + return getCreateBackupVaultMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest, + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse> + getListBackupVaultsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackupVaults", + requestType = com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest, + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse> + getListBackupVaultsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest, + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse> + getListBackupVaultsMethod; + if ((getListBackupVaultsMethod = BackupDRGrpc.getListBackupVaultsMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getListBackupVaultsMethod = BackupDRGrpc.getListBackupVaultsMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.ListBackupVaultsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("ListBackupVaults")) + .build(); + } + } + } + return getListBackupVaultsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest, + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse> + getFetchUsableBackupVaultsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchUsableBackupVaults", + requestType = com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.class, + responseType = com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest, + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse> + getFetchUsableBackupVaultsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest, + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse> + getFetchUsableBackupVaultsMethod; + if ((getFetchUsableBackupVaultsMethod = BackupDRGrpc.getFetchUsableBackupVaultsMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getFetchUsableBackupVaultsMethod = BackupDRGrpc.getFetchUsableBackupVaultsMethod) + == null) { + BackupDRGrpc.getFetchUsableBackupVaultsMethod = + getFetchUsableBackupVaultsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "FetchUsableBackupVaults")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("FetchUsableBackupVaults")) + .build(); + } + } + } + return getFetchUsableBackupVaultsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest, + com.google.cloud.backupdr.v1beta.BackupVault> + getGetBackupVaultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackupVault", + requestType = com.google.cloud.backupdr.v1beta.GetBackupVaultRequest.class, + responseType = com.google.cloud.backupdr.v1beta.BackupVault.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest, + com.google.cloud.backupdr.v1beta.BackupVault> + getGetBackupVaultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest, + com.google.cloud.backupdr.v1beta.BackupVault> + getGetBackupVaultMethod; + if ((getGetBackupVaultMethod = BackupDRGrpc.getGetBackupVaultMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetBackupVaultMethod = BackupDRGrpc.getGetBackupVaultMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.GetBackupVaultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("GetBackupVault")) + .build(); + } + } + } + return getGetBackupVaultMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest, + com.google.longrunning.Operation> + getUpdateBackupVaultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBackupVault", + requestType = com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest, + com.google.longrunning.Operation> + getUpdateBackupVaultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest, + com.google.longrunning.Operation> + getUpdateBackupVaultMethod; + if ((getUpdateBackupVaultMethod = BackupDRGrpc.getUpdateBackupVaultMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getUpdateBackupVaultMethod = BackupDRGrpc.getUpdateBackupVaultMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.UpdateBackupVaultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("UpdateBackupVault")) + .build(); + } + } + } + return getUpdateBackupVaultMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest, + com.google.longrunning.Operation> + getDeleteBackupVaultMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackupVault", + requestType = com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest, + com.google.longrunning.Operation> + getDeleteBackupVaultMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest, + com.google.longrunning.Operation> + getDeleteBackupVaultMethod; + if ((getDeleteBackupVaultMethod = BackupDRGrpc.getDeleteBackupVaultMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getDeleteBackupVaultMethod = BackupDRGrpc.getDeleteBackupVaultMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.DeleteBackupVaultRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("DeleteBackupVault")) + .build(); + } + } + } + return getDeleteBackupVaultMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest, + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse> + getListDataSourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataSources", + requestType = com.google.cloud.backupdr.v1beta.ListDataSourcesRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListDataSourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest, + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse> + getListDataSourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest, + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse> + getListDataSourcesMethod; + if ((getListDataSourcesMethod = BackupDRGrpc.getListDataSourcesMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getListDataSourcesMethod = BackupDRGrpc.getListDataSourcesMethod) == null) { + BackupDRGrpc.getListDataSourcesMethod = + getListDataSourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataSources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("ListDataSources")) + .build(); + } + } + } + return getListDataSourcesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetDataSourceRequest, + com.google.cloud.backupdr.v1beta.DataSource> + getGetDataSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataSource", + requestType = com.google.cloud.backupdr.v1beta.GetDataSourceRequest.class, + responseType = com.google.cloud.backupdr.v1beta.DataSource.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetDataSourceRequest, + com.google.cloud.backupdr.v1beta.DataSource> + getGetDataSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetDataSourceRequest, + com.google.cloud.backupdr.v1beta.DataSource> + getGetDataSourceMethod; + if ((getGetDataSourceMethod = BackupDRGrpc.getGetDataSourceMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetDataSourceMethod = BackupDRGrpc.getGetDataSourceMethod) == null) { + BackupDRGrpc.getGetDataSourceMethod = + getGetDataSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetDataSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("GetDataSource")) + .build(); + } + } + } + return getGetDataSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest, + com.google.longrunning.Operation> + getUpdateDataSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataSource", + requestType = com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest, + com.google.longrunning.Operation> + getUpdateDataSourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest, + com.google.longrunning.Operation> + getUpdateDataSourceMethod; + if ((getUpdateDataSourceMethod = BackupDRGrpc.getUpdateDataSourceMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getUpdateDataSourceMethod = BackupDRGrpc.getUpdateDataSourceMethod) == null) { + BackupDRGrpc.getUpdateDataSourceMethod = + getUpdateDataSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("UpdateDataSource")) + .build(); + } + } + } + return getUpdateDataSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupsRequest, + com.google.cloud.backupdr.v1beta.ListBackupsResponse> + getListBackupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackups", + requestType = com.google.cloud.backupdr.v1beta.ListBackupsRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListBackupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupsRequest, + com.google.cloud.backupdr.v1beta.ListBackupsResponse> + getListBackupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupsRequest, + com.google.cloud.backupdr.v1beta.ListBackupsResponse> + getListBackupsMethod; + if ((getListBackupsMethod = BackupDRGrpc.getListBackupsMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getListBackupsMethod = BackupDRGrpc.getListBackupsMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.ListBackupsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBackupsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("ListBackups")) + .build(); + } + } + } + return getListBackupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse> + getFetchBackupsForResourceTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchBackupsForResourceType", + requestType = com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest.class, + responseType = com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse> + getFetchBackupsForResourceTypeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse> + getFetchBackupsForResourceTypeMethod; + if ((getFetchBackupsForResourceTypeMethod = BackupDRGrpc.getFetchBackupsForResourceTypeMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getFetchBackupsForResourceTypeMethod = + BackupDRGrpc.getFetchBackupsForResourceTypeMethod) + == null) { + BackupDRGrpc.getFetchBackupsForResourceTypeMethod = + getFetchBackupsForResourceTypeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "FetchBackupsForResourceType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("FetchBackupsForResourceType")) + .build(); + } + } + } + return getFetchBackupsForResourceTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupRequest, + com.google.cloud.backupdr.v1beta.Backup> + getGetBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackup", + requestType = com.google.cloud.backupdr.v1beta.GetBackupRequest.class, + responseType = com.google.cloud.backupdr.v1beta.Backup.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupRequest, + com.google.cloud.backupdr.v1beta.Backup> + getGetBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupRequest, + com.google.cloud.backupdr.v1beta.Backup> + getGetBackupMethod; + if ((getGetBackupMethod = BackupDRGrpc.getGetBackupMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetBackupMethod = BackupDRGrpc.getGetBackupMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.GetBackupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("GetBackup")) + .build(); + } + } + } + return getGetBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupRequest, com.google.longrunning.Operation> + getUpdateBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBackup", + requestType = com.google.cloud.backupdr.v1beta.UpdateBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupRequest, com.google.longrunning.Operation> + getUpdateBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupRequest, com.google.longrunning.Operation> + getUpdateBackupMethod; + if ((getUpdateBackupMethod = BackupDRGrpc.getUpdateBackupMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getUpdateBackupMethod = BackupDRGrpc.getUpdateBackupMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.UpdateBackupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("UpdateBackup")) + .build(); + } + } + } + return getUpdateBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupRequest, com.google.longrunning.Operation> + getDeleteBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackup", + requestType = com.google.cloud.backupdr.v1beta.DeleteBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupRequest, com.google.longrunning.Operation> + getDeleteBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupRequest, com.google.longrunning.Operation> + getDeleteBackupMethod; + if ((getDeleteBackupMethod = BackupDRGrpc.getDeleteBackupMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getDeleteBackupMethod = BackupDRGrpc.getDeleteBackupMethod) == null) { + BackupDRGrpc.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.backupdr.v1beta.DeleteBackupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("DeleteBackup")) + .build(); + } + } + } + return getDeleteBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.RestoreBackupRequest, com.google.longrunning.Operation> + getRestoreBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestoreBackup", + requestType = com.google.cloud.backupdr.v1beta.RestoreBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.RestoreBackupRequest, com.google.longrunning.Operation> + getRestoreBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.RestoreBackupRequest, com.google.longrunning.Operation> + getRestoreBackupMethod; + if ((getRestoreBackupMethod = BackupDRGrpc.getRestoreBackupMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getRestoreBackupMethod = BackupDRGrpc.getRestoreBackupMethod) == null) { + BackupDRGrpc.getRestoreBackupMethod = + getRestoreBackupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.RestoreBackupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("RestoreBackup")) + .build(); + } + } + } + return getRestoreBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest, + com.google.longrunning.Operation> + getCreateBackupPlanMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackupPlan", + requestType = com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest, + com.google.longrunning.Operation> + getCreateBackupPlanMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest, + com.google.longrunning.Operation> + getCreateBackupPlanMethod; + if ((getCreateBackupPlanMethod = BackupDRGrpc.getCreateBackupPlanMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getCreateBackupPlanMethod = BackupDRGrpc.getCreateBackupPlanMethod) == null) { + BackupDRGrpc.getCreateBackupPlanMethod = + getCreateBackupPlanMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateBackupPlan")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("CreateBackupPlan")) + .build(); + } + } + } + return getCreateBackupPlanMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest, + com.google.longrunning.Operation> + getUpdateBackupPlanMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBackupPlan", + requestType = com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest, + com.google.longrunning.Operation> + getUpdateBackupPlanMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest, + com.google.longrunning.Operation> + getUpdateBackupPlanMethod; + if ((getUpdateBackupPlanMethod = BackupDRGrpc.getUpdateBackupPlanMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getUpdateBackupPlanMethod = BackupDRGrpc.getUpdateBackupPlanMethod) == null) { + BackupDRGrpc.getUpdateBackupPlanMethod = + getUpdateBackupPlanMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateBackupPlan")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("UpdateBackupPlan")) + .build(); + } + } + } + return getUpdateBackupPlanMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest, + com.google.cloud.backupdr.v1beta.BackupPlan> + getGetBackupPlanMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackupPlan", + requestType = com.google.cloud.backupdr.v1beta.GetBackupPlanRequest.class, + responseType = com.google.cloud.backupdr.v1beta.BackupPlan.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest, + com.google.cloud.backupdr.v1beta.BackupPlan> + getGetBackupPlanMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest, + com.google.cloud.backupdr.v1beta.BackupPlan> + getGetBackupPlanMethod; + if ((getGetBackupPlanMethod = BackupDRGrpc.getGetBackupPlanMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetBackupPlanMethod = BackupDRGrpc.getGetBackupPlanMethod) == null) { + BackupDRGrpc.getGetBackupPlanMethod = + getGetBackupPlanMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBackupPlan")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("GetBackupPlan")) + .build(); + } + } + } + return getGetBackupPlanMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse> + getListBackupPlansMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackupPlans", + requestType = com.google.cloud.backupdr.v1beta.ListBackupPlansRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListBackupPlansResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse> + getListBackupPlansMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse> + getListBackupPlansMethod; + if ((getListBackupPlansMethod = BackupDRGrpc.getListBackupPlansMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getListBackupPlansMethod = BackupDRGrpc.getListBackupPlansMethod) == null) { + BackupDRGrpc.getListBackupPlansMethod = + getListBackupPlansMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListBackupPlans")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse + .getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("ListBackupPlans")) + .build(); + } + } + } + return getListBackupPlansMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest, + com.google.longrunning.Operation> + getDeleteBackupPlanMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackupPlan", + requestType = com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest, + com.google.longrunning.Operation> + getDeleteBackupPlanMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest, + com.google.longrunning.Operation> + getDeleteBackupPlanMethod; + if ((getDeleteBackupPlanMethod = BackupDRGrpc.getDeleteBackupPlanMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getDeleteBackupPlanMethod = BackupDRGrpc.getDeleteBackupPlanMethod) == null) { + BackupDRGrpc.getDeleteBackupPlanMethod = + getDeleteBackupPlanMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteBackupPlan")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("DeleteBackupPlan")) + .build(); + } + } + } + return getDeleteBackupPlanMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest, + com.google.cloud.backupdr.v1beta.BackupPlanRevision> + getGetBackupPlanRevisionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackupPlanRevision", + requestType = com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.class, + responseType = com.google.cloud.backupdr.v1beta.BackupPlanRevision.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest, + com.google.cloud.backupdr.v1beta.BackupPlanRevision> + getGetBackupPlanRevisionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest, + com.google.cloud.backupdr.v1beta.BackupPlanRevision> + getGetBackupPlanRevisionMethod; + if ((getGetBackupPlanRevisionMethod = BackupDRGrpc.getGetBackupPlanRevisionMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetBackupPlanRevisionMethod = BackupDRGrpc.getGetBackupPlanRevisionMethod) + == null) { + BackupDRGrpc.getGetBackupPlanRevisionMethod = + getGetBackupPlanRevisionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetBackupPlanRevision")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.BackupPlanRevision + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("GetBackupPlanRevision")) + .build(); + } + } + } + return getGetBackupPlanRevisionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse> + getListBackupPlanRevisionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackupPlanRevisions", + requestType = com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse> + getListBackupPlanRevisionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse> + getListBackupPlanRevisionsMethod; + if ((getListBackupPlanRevisionsMethod = BackupDRGrpc.getListBackupPlanRevisionsMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getListBackupPlanRevisionsMethod = BackupDRGrpc.getListBackupPlanRevisionsMethod) + == null) { + BackupDRGrpc.getListBackupPlanRevisionsMethod = + getListBackupPlanRevisionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListBackupPlanRevisions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("ListBackupPlanRevisions")) + .build(); + } + } + } + return getListBackupPlanRevisionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getCreateBackupPlanAssociationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateBackupPlanAssociation", + requestType = com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getCreateBackupPlanAssociationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getCreateBackupPlanAssociationMethod; + if ((getCreateBackupPlanAssociationMethod = BackupDRGrpc.getCreateBackupPlanAssociationMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getCreateBackupPlanAssociationMethod = + BackupDRGrpc.getCreateBackupPlanAssociationMethod) + == null) { + BackupDRGrpc.getCreateBackupPlanAssociationMethod = + getCreateBackupPlanAssociationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateBackupPlanAssociation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("CreateBackupPlanAssociation")) + .build(); + } + } + } + return getCreateBackupPlanAssociationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getUpdateBackupPlanAssociationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateBackupPlanAssociation", + requestType = com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getUpdateBackupPlanAssociationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getUpdateBackupPlanAssociationMethod; + if ((getUpdateBackupPlanAssociationMethod = BackupDRGrpc.getUpdateBackupPlanAssociationMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getUpdateBackupPlanAssociationMethod = + BackupDRGrpc.getUpdateBackupPlanAssociationMethod) + == null) { + BackupDRGrpc.getUpdateBackupPlanAssociationMethod = + getUpdateBackupPlanAssociationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateBackupPlanAssociation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("UpdateBackupPlanAssociation")) + .build(); + } + } + } + return getUpdateBackupPlanAssociationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation> + getGetBackupPlanAssociationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBackupPlanAssociation", + requestType = com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.class, + responseType = com.google.cloud.backupdr.v1beta.BackupPlanAssociation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation> + getGetBackupPlanAssociationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation> + getGetBackupPlanAssociationMethod; + if ((getGetBackupPlanAssociationMethod = BackupDRGrpc.getGetBackupPlanAssociationMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetBackupPlanAssociationMethod = BackupDRGrpc.getGetBackupPlanAssociationMethod) + == null) { + BackupDRGrpc.getGetBackupPlanAssociationMethod = + getGetBackupPlanAssociationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetBackupPlanAssociation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("GetBackupPlanAssociation")) + .build(); + } + } + } + return getGetBackupPlanAssociationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse> + getListBackupPlanAssociationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBackupPlanAssociations", + requestType = com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse> + getListBackupPlanAssociationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse> + getListBackupPlanAssociationsMethod; + if ((getListBackupPlanAssociationsMethod = BackupDRGrpc.getListBackupPlanAssociationsMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getListBackupPlanAssociationsMethod = BackupDRGrpc.getListBackupPlanAssociationsMethod) + == null) { + BackupDRGrpc.getListBackupPlanAssociationsMethod = + getListBackupPlanAssociationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListBackupPlanAssociations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("ListBackupPlanAssociations")) + .build(); + } + } + } + return getListBackupPlanAssociationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse> + getFetchBackupPlanAssociationsForResourceTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchBackupPlanAssociationsForResourceType", + requestType = + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest.class, + responseType = + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse> + getFetchBackupPlanAssociationsForResourceTypeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse> + getFetchBackupPlanAssociationsForResourceTypeMethod; + if ((getFetchBackupPlanAssociationsForResourceTypeMethod = + BackupDRGrpc.getFetchBackupPlanAssociationsForResourceTypeMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getFetchBackupPlanAssociationsForResourceTypeMethod = + BackupDRGrpc.getFetchBackupPlanAssociationsForResourceTypeMethod) + == null) { + BackupDRGrpc.getFetchBackupPlanAssociationsForResourceTypeMethod = + getFetchBackupPlanAssociationsForResourceTypeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "FetchBackupPlanAssociationsForResourceType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .FetchBackupPlanAssociationsForResourceTypeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .FetchBackupPlanAssociationsForResourceTypeResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier( + "FetchBackupPlanAssociationsForResourceType")) + .build(); + } + } + } + return getFetchBackupPlanAssociationsForResourceTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getDeleteBackupPlanAssociationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteBackupPlanAssociation", + requestType = com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getDeleteBackupPlanAssociationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest, + com.google.longrunning.Operation> + getDeleteBackupPlanAssociationMethod; + if ((getDeleteBackupPlanAssociationMethod = BackupDRGrpc.getDeleteBackupPlanAssociationMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getDeleteBackupPlanAssociationMethod = + BackupDRGrpc.getDeleteBackupPlanAssociationMethod) + == null) { + BackupDRGrpc.getDeleteBackupPlanAssociationMethod = + getDeleteBackupPlanAssociationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteBackupPlanAssociation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("DeleteBackupPlanAssociation")) + .build(); + } + } + } + return getDeleteBackupPlanAssociationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.TriggerBackupRequest, com.google.longrunning.Operation> + getTriggerBackupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TriggerBackup", + requestType = com.google.cloud.backupdr.v1beta.TriggerBackupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.TriggerBackupRequest, com.google.longrunning.Operation> + getTriggerBackupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.TriggerBackupRequest, com.google.longrunning.Operation> + getTriggerBackupMethod; + if ((getTriggerBackupMethod = BackupDRGrpc.getTriggerBackupMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getTriggerBackupMethod = BackupDRGrpc.getTriggerBackupMethod) == null) { + BackupDRGrpc.getTriggerBackupMethod = + getTriggerBackupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TriggerBackup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.TriggerBackupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new BackupDRMethodDescriptorSupplier("TriggerBackup")) + .build(); + } + } + } + return getTriggerBackupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest, + com.google.cloud.backupdr.v1beta.DataSourceReference> + getGetDataSourceReferenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataSourceReference", + requestType = com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.class, + responseType = com.google.cloud.backupdr.v1beta.DataSourceReference.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest, + com.google.cloud.backupdr.v1beta.DataSourceReference> + getGetDataSourceReferenceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest, + com.google.cloud.backupdr.v1beta.DataSourceReference> + getGetDataSourceReferenceMethod; + if ((getGetDataSourceReferenceMethod = BackupDRGrpc.getGetDataSourceReferenceMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetDataSourceReferenceMethod = BackupDRGrpc.getGetDataSourceReferenceMethod) + == null) { + BackupDRGrpc.getGetDataSourceReferenceMethod = + getGetDataSourceReferenceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetDataSourceReference")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.DataSourceReference + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("GetDataSourceReference")) + .build(); + } + } + } + return getGetDataSourceReferenceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest, + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse> + getListDataSourceReferencesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataSourceReferences", + requestType = com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest, + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse> + getListDataSourceReferencesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest, + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse> + getListDataSourceReferencesMethod; + if ((getListDataSourceReferencesMethod = BackupDRGrpc.getListDataSourceReferencesMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getListDataSourceReferencesMethod = BackupDRGrpc.getListDataSourceReferencesMethod) + == null) { + BackupDRGrpc.getListDataSourceReferencesMethod = + getListDataSourceReferencesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListDataSourceReferences")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("ListDataSourceReferences")) + .build(); + } + } + } + return getListDataSourceReferencesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse> + getFetchDataSourceReferencesForResourceTypeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchDataSourceReferencesForResourceType", + requestType = + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest.class, + responseType = + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse> + getFetchDataSourceReferencesForResourceTypeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse> + getFetchDataSourceReferencesForResourceTypeMethod; + if ((getFetchDataSourceReferencesForResourceTypeMethod = + BackupDRGrpc.getFetchDataSourceReferencesForResourceTypeMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getFetchDataSourceReferencesForResourceTypeMethod = + BackupDRGrpc.getFetchDataSourceReferencesForResourceTypeMethod) + == null) { + BackupDRGrpc.getFetchDataSourceReferencesForResourceTypeMethod = + getFetchDataSourceReferencesForResourceTypeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "FetchDataSourceReferencesForResourceType")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .FetchDataSourceReferencesForResourceTypeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .FetchDataSourceReferencesForResourceTypeResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier( + "FetchDataSourceReferencesForResourceType")) + .build(); + } + } + } + return getFetchDataSourceReferencesForResourceTypeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.InitializeServiceRequest, + com.google.longrunning.Operation> + getInitializeServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "InitializeService", + requestType = com.google.cloud.backupdr.v1beta.InitializeServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.InitializeServiceRequest, + com.google.longrunning.Operation> + getInitializeServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.InitializeServiceRequest, + com.google.longrunning.Operation> + getInitializeServiceMethod; + if ((getInitializeServiceMethod = BackupDRGrpc.getInitializeServiceMethod) == null) { + synchronized (BackupDRGrpc.class) { + if ((getInitializeServiceMethod = BackupDRGrpc.getInitializeServiceMethod) == null) { + BackupDRGrpc.getInitializeServiceMethod = + getInitializeServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "InitializeService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.InitializeServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("InitializeService")) + .build(); + } + } + } + return getInitializeServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getCreateAutoProtectionPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAutoProtectionPolicy", + requestType = com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getCreateAutoProtectionPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getCreateAutoProtectionPolicyMethod; + if ((getCreateAutoProtectionPolicyMethod = BackupDRGrpc.getCreateAutoProtectionPolicyMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getCreateAutoProtectionPolicyMethod = BackupDRGrpc.getCreateAutoProtectionPolicyMethod) + == null) { + BackupDRGrpc.getCreateAutoProtectionPolicyMethod = + getCreateAutoProtectionPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateAutoProtectionPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("CreateAutoProtectionPolicy")) + .build(); + } + } + } + return getCreateAutoProtectionPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse> + getListAutoProtectionPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAutoProtectionPolicies", + requestType = com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse> + getListAutoProtectionPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse> + getListAutoProtectionPoliciesMethod; + if ((getListAutoProtectionPoliciesMethod = BackupDRGrpc.getListAutoProtectionPoliciesMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getListAutoProtectionPoliciesMethod = BackupDRGrpc.getListAutoProtectionPoliciesMethod) + == null) { + BackupDRGrpc.getListAutoProtectionPoliciesMethod = + getListAutoProtectionPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAutoProtectionPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("ListAutoProtectionPolicies")) + .build(); + } + } + } + return getListAutoProtectionPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy> + getGetAutoProtectionPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAutoProtectionPolicy", + requestType = com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.class, + responseType = com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy> + getGetAutoProtectionPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy> + getGetAutoProtectionPolicyMethod; + if ((getGetAutoProtectionPolicyMethod = BackupDRGrpc.getGetAutoProtectionPolicyMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetAutoProtectionPolicyMethod = BackupDRGrpc.getGetAutoProtectionPolicyMethod) + == null) { + BackupDRGrpc.getGetAutoProtectionPolicyMethod = + getGetAutoProtectionPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAutoProtectionPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("GetAutoProtectionPolicy")) + .build(); + } + } + } + return getGetAutoProtectionPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getUpdateAutoProtectionPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAutoProtectionPolicy", + requestType = com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getUpdateAutoProtectionPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getUpdateAutoProtectionPolicyMethod; + if ((getUpdateAutoProtectionPolicyMethod = BackupDRGrpc.getUpdateAutoProtectionPolicyMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getUpdateAutoProtectionPolicyMethod = BackupDRGrpc.getUpdateAutoProtectionPolicyMethod) + == null) { + BackupDRGrpc.getUpdateAutoProtectionPolicyMethod = + getUpdateAutoProtectionPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateAutoProtectionPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("UpdateAutoProtectionPolicy")) + .build(); + } + } + } + return getUpdateAutoProtectionPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getDeleteAutoProtectionPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAutoProtectionPolicy", + requestType = com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getDeleteAutoProtectionPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest, + com.google.longrunning.Operation> + getDeleteAutoProtectionPolicyMethod; + if ((getDeleteAutoProtectionPolicyMethod = BackupDRGrpc.getDeleteAutoProtectionPolicyMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getDeleteAutoProtectionPolicyMethod = BackupDRGrpc.getDeleteAutoProtectionPolicyMethod) + == null) { + BackupDRGrpc.getDeleteAutoProtectionPolicyMethod = + getDeleteAutoProtectionPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteAutoProtectionPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("DeleteAutoProtectionPolicy")) + .build(); + } + } + } + return getDeleteAutoProtectionPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest, + com.google.longrunning.Operation> + getCreateAutoProtectionPolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAutoProtectionPolicyBinding", + requestType = com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest, + com.google.longrunning.Operation> + getCreateAutoProtectionPolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest, + com.google.longrunning.Operation> + getCreateAutoProtectionPolicyBindingMethod; + if ((getCreateAutoProtectionPolicyBindingMethod = + BackupDRGrpc.getCreateAutoProtectionPolicyBindingMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getCreateAutoProtectionPolicyBindingMethod = + BackupDRGrpc.getCreateAutoProtectionPolicyBindingMethod) + == null) { + BackupDRGrpc.getCreateAutoProtectionPolicyBindingMethod = + getCreateAutoProtectionPolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateAutoProtectionPolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .CreateAutoProtectionPolicyBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("CreateAutoProtectionPolicyBinding")) + .build(); + } + } + } + return getCreateAutoProtectionPolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding> + getGetAutoProtectionPolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAutoProtectionPolicyBinding", + requestType = com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest.class, + responseType = com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding> + getGetAutoProtectionPolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding> + getGetAutoProtectionPolicyBindingMethod; + if ((getGetAutoProtectionPolicyBindingMethod = + BackupDRGrpc.getGetAutoProtectionPolicyBindingMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetAutoProtectionPolicyBindingMethod = + BackupDRGrpc.getGetAutoProtectionPolicyBindingMethod) + == null) { + BackupDRGrpc.getGetAutoProtectionPolicyBindingMethod = + getGetAutoProtectionPolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAutoProtectionPolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("GetAutoProtectionPolicyBinding")) + .build(); + } + } + } + return getGetAutoProtectionPolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse> + getListAutoProtectionPolicyBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAutoProtectionPolicyBindings", + requestType = com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest.class, + responseType = + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse> + getListAutoProtectionPolicyBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse> + getListAutoProtectionPolicyBindingsMethod; + if ((getListAutoProtectionPolicyBindingsMethod = + BackupDRGrpc.getListAutoProtectionPolicyBindingsMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getListAutoProtectionPolicyBindingsMethod = + BackupDRGrpc.getListAutoProtectionPolicyBindingsMethod) + == null) { + BackupDRGrpc.getListAutoProtectionPolicyBindingsMethod = + getListAutoProtectionPolicyBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAutoProtectionPolicyBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .ListAutoProtectionPolicyBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .ListAutoProtectionPolicyBindingsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("ListAutoProtectionPolicyBindings")) + .build(); + } + } + } + return getListAutoProtectionPolicyBindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest, + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse> + getListAppliedAutoProtectionPoliciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAppliedAutoProtectionPolicies", + requestType = com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest.class, + responseType = + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest, + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse> + getListAppliedAutoProtectionPoliciesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest, + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse> + getListAppliedAutoProtectionPoliciesMethod; + if ((getListAppliedAutoProtectionPoliciesMethod = + BackupDRGrpc.getListAppliedAutoProtectionPoliciesMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getListAppliedAutoProtectionPoliciesMethod = + BackupDRGrpc.getListAppliedAutoProtectionPoliciesMethod) + == null) { + BackupDRGrpc.getListAppliedAutoProtectionPoliciesMethod = + getListAppliedAutoProtectionPoliciesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAppliedAutoProtectionPolicies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .ListAppliedAutoProtectionPoliciesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .ListAppliedAutoProtectionPoliciesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("ListAppliedAutoProtectionPolicies")) + .build(); + } + } + } + return getListAppliedAutoProtectionPoliciesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest, + com.google.longrunning.Operation> + getInitiateDeleteAutoProtectionPolicyBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "InitiateDeleteAutoProtectionPolicyBinding", + requestType = + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest, + com.google.longrunning.Operation> + getInitiateDeleteAutoProtectionPolicyBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest, + com.google.longrunning.Operation> + getInitiateDeleteAutoProtectionPolicyBindingMethod; + if ((getInitiateDeleteAutoProtectionPolicyBindingMethod = + BackupDRGrpc.getInitiateDeleteAutoProtectionPolicyBindingMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getInitiateDeleteAutoProtectionPolicyBindingMethod = + BackupDRGrpc.getInitiateDeleteAutoProtectionPolicyBindingMethod) + == null) { + BackupDRGrpc.getInitiateDeleteAutoProtectionPolicyBindingMethod = + getInitiateDeleteAutoProtectionPolicyBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "InitiateDeleteAutoProtectionPolicyBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta + .InitiateDeleteAutoProtectionPolicyBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier( + "InitiateDeleteAutoProtectionPolicyBinding")) + .build(); + } + } + } + return getInitiateDeleteAutoProtectionPolicyBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest, + com.google.cloud.backupdr.v1beta.BindingMatchingResource> + getGetBindingMatchingResourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBindingMatchingResource", + requestType = com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest.class, + responseType = com.google.cloud.backupdr.v1beta.BindingMatchingResource.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest, + com.google.cloud.backupdr.v1beta.BindingMatchingResource> + getGetBindingMatchingResourceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest, + com.google.cloud.backupdr.v1beta.BindingMatchingResource> + getGetBindingMatchingResourceMethod; + if ((getGetBindingMatchingResourceMethod = BackupDRGrpc.getGetBindingMatchingResourceMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getGetBindingMatchingResourceMethod = BackupDRGrpc.getGetBindingMatchingResourceMethod) + == null) { + BackupDRGrpc.getGetBindingMatchingResourceMethod = + getGetBindingMatchingResourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetBindingMatchingResource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.BindingMatchingResource + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("GetBindingMatchingResource")) + .build(); + } + } + } + return getGetBindingMatchingResourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest, + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse> + getListBindingMatchingResourcesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListBindingMatchingResources", + requestType = com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest, + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse> + getListBindingMatchingResourcesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest, + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse> + getListBindingMatchingResourcesMethod; + if ((getListBindingMatchingResourcesMethod = BackupDRGrpc.getListBindingMatchingResourcesMethod) + == null) { + synchronized (BackupDRGrpc.class) { + if ((getListBindingMatchingResourcesMethod = + BackupDRGrpc.getListBindingMatchingResourcesMethod) + == null) { + BackupDRGrpc.getListBindingMatchingResourcesMethod = + getListBindingMatchingResourcesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListBindingMatchingResources")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDRMethodDescriptorSupplier("ListBindingMatchingResources")) + .build(); + } + } + } + return getListBindingMatchingResourcesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static BackupDRStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BackupDRStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDRStub(channel, callOptions); + } + }; + return BackupDRStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static BackupDRBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BackupDRBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDRBlockingV2Stub(channel, callOptions); + } + }; + return BackupDRBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BackupDRBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BackupDRBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDRBlockingStub(channel, callOptions); + } + }; + return BackupDRBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static BackupDRFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BackupDRFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDRFutureStub(channel, callOptions); + } + }; + return BackupDRFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The BackupDR Service
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists ManagementServers in a given project and location.
+     * 
+ */ + default void listManagementServers( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListManagementServersMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single ManagementServer.
+     * 
+ */ + default void getManagementServer( + com.google.cloud.backupdr.v1beta.GetManagementServerRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetManagementServerMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new ManagementServer in a given project and location.
+     * 
+ */ + default void createManagementServer( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateManagementServerMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single ManagementServer.
+     * 
+ */ + default void deleteManagementServer( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteManagementServerMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new BackupVault in a given project and location.
+     * 
+ */ + default void createBackupVault( + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBackupVaultMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists BackupVaults in a given project and location.
+     * 
+ */ + default void listBackupVaults( + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupVaultsMethod(), responseObserver); + } + + /** + * + * + *
+     * FetchUsableBackupVaults lists usable BackupVaults in a given project and
+     * location. Usable BackupVault are the ones that user has
+     * backupdr.backupVaults.get permission.
+     * 
+ */ + default void fetchUsableBackupVaults( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchUsableBackupVaultsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a BackupVault.
+     * 
+ */ + default void getBackupVault( + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBackupVaultMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the settings of a BackupVault.
+     * 
+ */ + default void updateBackupVault( + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBackupVaultMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a BackupVault.
+     * 
+ */ + default void deleteBackupVault( + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBackupVaultMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DataSources in a given project and location.
+     * 
+ */ + default void listDataSources( + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataSourcesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a DataSource.
+     * 
+ */ + default void getDataSource( + com.google.cloud.backupdr.v1beta.GetDataSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the settings of a DataSource.
+     * 
+ */ + default void updateDataSource( + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Backups in a given project and location.
+     * 
+ */ + default void listBackups( + com.google.cloud.backupdr.v1beta.ListBackupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetch Backups for a given resource type.
+     * 
+ */ + default void fetchBackupsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchBackupsForResourceTypeMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a Backup.
+     * 
+ */ + default void getBackup( + com.google.cloud.backupdr.v1beta.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the settings of a Backup.
+     * 
+ */ + default void updateBackup( + com.google.cloud.backupdr.v1beta.UpdateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Backup.
+     * 
+ */ + default void deleteBackup( + com.google.cloud.backupdr.v1beta.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Restore from a Backup
+     * 
+ */ + default void restoreBackup( + com.google.cloud.backupdr.v1beta.RestoreBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestoreBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a BackupPlan
+     * 
+ */ + default void createBackupPlan( + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBackupPlanMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a BackupPlan.
+     * 
+ */ + default void updateBackupPlan( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBackupPlanMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single BackupPlan.
+     * 
+ */ + default void getBackupPlan( + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBackupPlanMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists BackupPlans in a given project and location.
+     * 
+ */ + default void listBackupPlans( + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupPlansMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single BackupPlan.
+     * 
+ */ + default void deleteBackupPlan( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBackupPlanMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanRevision.
+     * 
+ */ + default void getBackupPlanRevision( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBackupPlanRevisionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists BackupPlanRevisions in a given project and location.
+     * 
+ */ + default void listBackupPlanRevisions( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupPlanRevisionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a BackupPlanAssociation
+     * 
+ */ + default void createBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateBackupPlanAssociationMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a BackupPlanAssociation.
+     * 
+ */ + default void updateBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateBackupPlanAssociationMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanAssociation.
+     * 
+ */ + default void getBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBackupPlanAssociationMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists BackupPlanAssociations in a given project and location.
+     * 
+ */ + default void listBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBackupPlanAssociationsMethod(), responseObserver); + } + + /** + * + * + *
+     * List BackupPlanAssociations for a given resource type.
+     * 
+ */ + default void fetchBackupPlanAssociationsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchBackupPlanAssociationsForResourceTypeMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single BackupPlanAssociation.
+     * 
+ */ + default void deleteBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteBackupPlanAssociationMethod(), responseObserver); + } + + /** + * + * + *
+     * Triggers a new Backup.
+     * 
+ */ + default void triggerBackup( + com.google.cloud.backupdr.v1beta.TriggerBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getTriggerBackupMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DataSourceReference.
+     * 
+ */ + default void getDataSourceReference( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataSourceReferenceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DataSourceReferences for a given project and location.
+     * 
+ */ + default void listDataSourceReferences( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataSourceReferencesMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetch DataSourceReferences for a given project, location and resource type.
+     * 
+ */ + default void fetchDataSourceReferencesForResourceType( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchDataSourceReferencesForResourceTypeMethod(), responseObserver); + } + + /** + * + * + *
+     * Initializes the service related config for a project.
+     * 
+ */ + default void initializeService( + com.google.cloud.backupdr.v1beta.InitializeServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getInitializeServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicy in a given project and location.
+     * 
+ */ + default void createAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAutoProtectionPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists AutoProtectionPolicies for a given project and location.
+     * 
+ */ + default void listAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAutoProtectionPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single AutoProtectionPolicy.
+     * 
+ */ + default void getAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAutoProtectionPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single AutoProtectionPolicy.
+     * 
+ */ + default void updateAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAutoProtectionPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single AutoProtectionPolicy.
+     * 
+ */ + default void deleteAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAutoProtectionPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicyBinding in a given project and
+     * location.
+     * 
+ */ + default void createAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAutoProtectionPolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the auto protection policy binding read from the CCFE tables.
+     * 
+ */ + default void getAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAutoProtectionPolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the auto protection policy bindings read from the CCFE tables.
+     * 
+ */ + default void listAutoProtectionPolicyBindings( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAutoProtectionPolicyBindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists AppliedAutoProtectionPolicies in a given project and location.
+     * 
+ */ + default void listAppliedAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAppliedAutoProtectionPoliciesMethod(), responseObserver); + } + + /** + * + * + *
+     * InitiateDeleteAutoProtectionPolicyBinding initiates delete for
+     * AutoProtectionPolicy Binding
+     * 
+ */ + default void initiateDeleteAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getInitiateDeleteAutoProtectionPolicyBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Binding Matching Resource.
+     * 
+ */ + default void getBindingMatchingResource( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetBindingMatchingResourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding.
+     * 
+ */ + default void listBindingMatchingResources( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListBindingMatchingResourcesMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service BackupDR. + * + *
+   * The BackupDR Service
+   * 
+ */ + public abstract static class BackupDRImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return BackupDRGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service BackupDR. + * + *
+   * The BackupDR Service
+   * 
+ */ + public static final class BackupDRStub extends io.grpc.stub.AbstractAsyncStub { + private BackupDRStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BackupDRStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDRStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ManagementServers in a given project and location.
+     * 
+ */ + public void listManagementServers( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListManagementServersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single ManagementServer.
+     * 
+ */ + public void getManagementServer( + com.google.cloud.backupdr.v1beta.GetManagementServerRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetManagementServerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new ManagementServer in a given project and location.
+     * 
+ */ + public void createManagementServer( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateManagementServerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single ManagementServer.
+     * 
+ */ + public void deleteManagementServer( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteManagementServerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new BackupVault in a given project and location.
+     * 
+ */ + public void createBackupVault( + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBackupVaultMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists BackupVaults in a given project and location.
+     * 
+ */ + public void listBackupVaults( + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupVaultsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * FetchUsableBackupVaults lists usable BackupVaults in a given project and
+     * location. Usable BackupVault are the ones that user has
+     * backupdr.backupVaults.get permission.
+     * 
+ */ + public void fetchUsableBackupVaults( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFetchUsableBackupVaultsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a BackupVault.
+     * 
+ */ + public void getBackupVault( + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupVaultMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the settings of a BackupVault.
+     * 
+ */ + public void updateBackupVault( + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBackupVaultMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a BackupVault.
+     * 
+ */ + public void deleteBackupVault( + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupVaultMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DataSources in a given project and location.
+     * 
+ */ + public void listDataSources( + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataSourcesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a DataSource.
+     * 
+ */ + public void getDataSource( + com.google.cloud.backupdr.v1beta.GetDataSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataSourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the settings of a DataSource.
+     * 
+ */ + public void updateDataSource( + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataSourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Backups in a given project and location.
+     * 
+ */ + public void listBackups( + com.google.cloud.backupdr.v1beta.ListBackupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetch Backups for a given resource type.
+     * 
+ */ + public void fetchBackupsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFetchBackupsForResourceTypeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a Backup.
+     * 
+ */ + public void getBackup( + com.google.cloud.backupdr.v1beta.GetBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the settings of a Backup.
+     * 
+ */ + public void updateBackup( + com.google.cloud.backupdr.v1beta.UpdateBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Backup.
+     * 
+ */ + public void deleteBackup( + com.google.cloud.backupdr.v1beta.DeleteBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Restore from a Backup
+     * 
+ */ + public void restoreBackup( + com.google.cloud.backupdr.v1beta.RestoreBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestoreBackupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a BackupPlan
+     * 
+ */ + public void createBackupPlan( + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBackupPlanMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a BackupPlan.
+     * 
+ */ + public void updateBackupPlan( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBackupPlanMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single BackupPlan.
+     * 
+ */ + public void getBackupPlan( + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupPlanMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists BackupPlans in a given project and location.
+     * 
+ */ + public void listBackupPlans( + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupPlansMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single BackupPlan.
+     * 
+ */ + public void deleteBackupPlan( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupPlanMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanRevision.
+     * 
+ */ + public void getBackupPlanRevision( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupPlanRevisionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists BackupPlanRevisions in a given project and location.
+     * 
+ */ + public void listBackupPlanRevisions( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupPlanRevisionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a BackupPlanAssociation
+     * 
+ */ + public void createBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateBackupPlanAssociationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a BackupPlanAssociation.
+     * 
+ */ + public void updateBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateBackupPlanAssociationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanAssociation.
+     * 
+ */ + public void getBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBackupPlanAssociationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists BackupPlanAssociations in a given project and location.
+     * 
+ */ + public void listBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBackupPlanAssociationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List BackupPlanAssociations for a given resource type.
+     * 
+ */ + public void fetchBackupPlanAssociationsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getFetchBackupPlanAssociationsForResourceTypeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single BackupPlanAssociation.
+     * 
+ */ + public void deleteBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteBackupPlanAssociationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Triggers a new Backup.
+     * 
+ */ + public void triggerBackup( + com.google.cloud.backupdr.v1beta.TriggerBackupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTriggerBackupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single DataSourceReference.
+     * 
+ */ + public void getDataSourceReference( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataSourceReferenceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DataSourceReferences for a given project and location.
+     * 
+ */ + public void listDataSourceReferences( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataSourceReferencesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetch DataSourceReferences for a given project, location and resource type.
+     * 
+ */ + public void fetchDataSourceReferencesForResourceType( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getFetchDataSourceReferencesForResourceTypeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Initializes the service related config for a project.
+     * 
+ */ + public void initializeService( + com.google.cloud.backupdr.v1beta.InitializeServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getInitializeServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicy in a given project and location.
+     * 
+ */ + public void createAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAutoProtectionPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists AutoProtectionPolicies for a given project and location.
+     * 
+ */ + public void listAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAutoProtectionPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single AutoProtectionPolicy.
+     * 
+ */ + public void getAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAutoProtectionPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single AutoProtectionPolicy.
+     * 
+ */ + public void updateAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAutoProtectionPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single AutoProtectionPolicy.
+     * 
+ */ + public void deleteAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAutoProtectionPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicyBinding in a given project and
+     * location.
+     * 
+ */ + public void createAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAutoProtectionPolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the auto protection policy binding read from the CCFE tables.
+     * 
+ */ + public void getAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAutoProtectionPolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the auto protection policy bindings read from the CCFE tables.
+     * 
+ */ + public void listAutoProtectionPolicyBindings( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAutoProtectionPolicyBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists AppliedAutoProtectionPolicies in a given project and location.
+     * 
+ */ + public void listAppliedAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAppliedAutoProtectionPoliciesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * InitiateDeleteAutoProtectionPolicyBinding initiates delete for
+     * AutoProtectionPolicy Binding
+     * 
+ */ + public void initiateDeleteAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getInitiateDeleteAutoProtectionPolicyBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Binding Matching Resource.
+     * 
+ */ + public void getBindingMatchingResource( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBindingMatchingResourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding.
+     * 
+ */ + public void listBindingMatchingResources( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListBindingMatchingResourcesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service BackupDR. + * + *
+   * The BackupDR Service
+   * 
+ */ + public static final class BackupDRBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private BackupDRBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BackupDRBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDRBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ManagementServers in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListManagementServersResponse listManagementServers( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListManagementServersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single ManagementServer.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ManagementServer getManagementServer( + com.google.cloud.backupdr.v1beta.GetManagementServerRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetManagementServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new ManagementServer in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createManagementServer( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateManagementServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single ManagementServer.
+     * 
+ */ + public com.google.longrunning.Operation deleteManagementServer( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteManagementServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new BackupVault in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createBackupVault( + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BackupVaults in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse listBackupVaults( + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBackupVaultsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * FetchUsableBackupVaults lists usable BackupVaults in a given project and
+     * location. Usable BackupVault are the ones that user has
+     * backupdr.backupVaults.get permission.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse fetchUsableBackupVaults( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getFetchUsableBackupVaultsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a BackupVault.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVault( + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the settings of a BackupVault.
+     * 
+ */ + public com.google.longrunning.Operation updateBackupVault( + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a BackupVault.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackupVault( + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataSources in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListDataSourcesResponse listDataSources( + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListDataSourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a DataSource.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.DataSource getDataSource( + com.google.cloud.backupdr.v1beta.GetDataSourceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetDataSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the settings of a DataSource.
+     * 
+ */ + public com.google.longrunning.Operation updateDataSource( + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateDataSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Backups in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupsResponse listBackups( + com.google.cloud.backupdr.v1beta.ListBackupsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBackupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetch Backups for a given resource type.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + fetchBackupsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getFetchBackupsForResourceTypeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a Backup.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.Backup getBackup( + com.google.cloud.backupdr.v1beta.GetBackupRequest request) throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the settings of a Backup.
+     * 
+ */ + public com.google.longrunning.Operation updateBackup( + com.google.cloud.backupdr.v1beta.UpdateBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Backup.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackup( + com.google.cloud.backupdr.v1beta.DeleteBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Restore from a Backup
+     * 
+ */ + public com.google.longrunning.Operation restoreBackup( + com.google.cloud.backupdr.v1beta.RestoreBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRestoreBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a BackupPlan
+     * 
+ */ + public com.google.longrunning.Operation createBackupPlan( + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateBackupPlanMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a BackupPlan.
+     * 
+ */ + public com.google.longrunning.Operation updateBackupPlan( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateBackupPlanMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlan.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlan( + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBackupPlanMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BackupPlans in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupPlansResponse listBackupPlans( + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBackupPlansMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single BackupPlan.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackupPlan( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteBackupPlanMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanRevision.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BackupPlanRevision getBackupPlanRevision( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBackupPlanRevisionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BackupPlanRevisions in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse listBackupPlanRevisions( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBackupPlanRevisionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a BackupPlanAssociation
+     * 
+ */ + public com.google.longrunning.Operation createBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateBackupPlanAssociationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a BackupPlanAssociation.
+     * 
+ */ + public com.google.longrunning.Operation updateBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateBackupPlanAssociationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanAssociation.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBackupPlanAssociationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BackupPlanAssociations in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + listBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBackupPlanAssociationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List BackupPlanAssociations for a given resource type.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + fetchBackupPlanAssociationsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), + getFetchBackupPlanAssociationsForResourceTypeMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
+     * Deletes a single BackupPlanAssociation.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteBackupPlanAssociationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Triggers a new Backup.
+     * 
+ */ + public com.google.longrunning.Operation triggerBackup( + com.google.cloud.backupdr.v1beta.TriggerBackupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getTriggerBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single DataSourceReference.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.DataSourceReference getDataSourceReference( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetDataSourceReferenceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataSourceReferences for a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse + listDataSourceReferences( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListDataSourceReferencesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetch DataSourceReferences for a given project, location and resource type.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + fetchDataSourceReferencesForResourceType( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), + getFetchDataSourceReferencesForResourceTypeMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
+     * Initializes the service related config for a project.
+     * 
+ */ + public com.google.longrunning.Operation initializeService( + com.google.cloud.backupdr.v1beta.InitializeServiceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getInitializeServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicy in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateAutoProtectionPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists AutoProtectionPolicies for a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + listAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAutoProtectionPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAutoProtectionPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.longrunning.Operation updateAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateAutoProtectionPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.longrunning.Operation deleteAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteAutoProtectionPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicyBinding in a given project and
+     * location.
+     * 
+ */ + public com.google.longrunning.Operation createAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateAutoProtectionPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the auto protection policy binding read from the CCFE tables.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + getAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAutoProtectionPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the auto protection policy bindings read from the CCFE tables.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + listAutoProtectionPolicyBindings( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAutoProtectionPolicyBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists AppliedAutoProtectionPolicies in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + listAppliedAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAppliedAutoProtectionPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * InitiateDeleteAutoProtectionPolicyBinding initiates delete for
+     * AutoProtectionPolicy Binding
+     * 
+ */ + public com.google.longrunning.Operation initiateDeleteAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), + getInitiateDeleteAutoProtectionPolicyBindingMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
+     * Gets details of a single Binding Matching Resource.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BindingMatchingResource getBindingMatchingResource( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetBindingMatchingResourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + listBindingMatchingResources( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListBindingMatchingResourcesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service BackupDR. + * + *
+   * The BackupDR Service
+   * 
+ */ + public static final class BackupDRBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private BackupDRBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BackupDRBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDRBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ManagementServers in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListManagementServersResponse listManagementServers( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListManagementServersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single ManagementServer.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ManagementServer getManagementServer( + com.google.cloud.backupdr.v1beta.GetManagementServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetManagementServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new ManagementServer in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createManagementServer( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateManagementServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single ManagementServer.
+     * 
+ */ + public com.google.longrunning.Operation deleteManagementServer( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteManagementServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new BackupVault in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createBackupVault( + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BackupVaults in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse listBackupVaults( + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupVaultsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * FetchUsableBackupVaults lists usable BackupVaults in a given project and
+     * location. Usable BackupVault are the ones that user has
+     * backupdr.backupVaults.get permission.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse fetchUsableBackupVaults( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchUsableBackupVaultsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a BackupVault.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVault( + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the settings of a BackupVault.
+     * 
+ */ + public com.google.longrunning.Operation updateBackupVault( + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a BackupVault.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackupVault( + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupVaultMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataSources in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListDataSourcesResponse listDataSources( + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataSourcesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a DataSource.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.DataSource getDataSource( + com.google.cloud.backupdr.v1beta.GetDataSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the settings of a DataSource.
+     * 
+ */ + public com.google.longrunning.Operation updateDataSource( + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Backups in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupsResponse listBackups( + com.google.cloud.backupdr.v1beta.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetch Backups for a given resource type.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + fetchBackupsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchBackupsForResourceTypeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a Backup.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.Backup getBackup( + com.google.cloud.backupdr.v1beta.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the settings of a Backup.
+     * 
+ */ + public com.google.longrunning.Operation updateBackup( + com.google.cloud.backupdr.v1beta.UpdateBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Backup.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackup( + com.google.cloud.backupdr.v1beta.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Restore from a Backup
+     * 
+ */ + public com.google.longrunning.Operation restoreBackup( + com.google.cloud.backupdr.v1beta.RestoreBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestoreBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a BackupPlan
+     * 
+ */ + public com.google.longrunning.Operation createBackupPlan( + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupPlanMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a BackupPlan.
+     * 
+ */ + public com.google.longrunning.Operation updateBackupPlan( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBackupPlanMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlan.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlan( + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupPlanMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BackupPlans in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupPlansResponse listBackupPlans( + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupPlansMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single BackupPlan.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackupPlan( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupPlanMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanRevision.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BackupPlanRevision getBackupPlanRevision( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupPlanRevisionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BackupPlanRevisions in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse listBackupPlanRevisions( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupPlanRevisionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a BackupPlanAssociation
+     * 
+ */ + public com.google.longrunning.Operation createBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateBackupPlanAssociationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a BackupPlanAssociation.
+     * 
+ */ + public com.google.longrunning.Operation updateBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateBackupPlanAssociationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanAssociation.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBackupPlanAssociationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists BackupPlanAssociations in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + listBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBackupPlanAssociationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List BackupPlanAssociations for a given resource type.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + fetchBackupPlanAssociationsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getFetchBackupPlanAssociationsForResourceTypeMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
+     * Deletes a single BackupPlanAssociation.
+     * 
+ */ + public com.google.longrunning.Operation deleteBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteBackupPlanAssociationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Triggers a new Backup.
+     * 
+ */ + public com.google.longrunning.Operation triggerBackup( + com.google.cloud.backupdr.v1beta.TriggerBackupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTriggerBackupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single DataSourceReference.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.DataSourceReference getDataSourceReference( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataSourceReferenceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataSourceReferences for a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse + listDataSourceReferences( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataSourceReferencesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetch DataSourceReferences for a given project, location and resource type.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + fetchDataSourceReferencesForResourceType( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getFetchDataSourceReferencesForResourceTypeMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
+     * Initializes the service related config for a project.
+     * 
+ */ + public com.google.longrunning.Operation initializeService( + com.google.cloud.backupdr.v1beta.InitializeServiceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getInitializeServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicy in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAutoProtectionPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists AutoProtectionPolicies for a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + listAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAutoProtectionPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAutoProtectionPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.longrunning.Operation updateAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAutoProtectionPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.longrunning.Operation deleteAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAutoProtectionPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicyBinding in a given project and
+     * location.
+     * 
+ */ + public com.google.longrunning.Operation createAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAutoProtectionPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the auto protection policy binding read from the CCFE tables.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + getAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAutoProtectionPolicyBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns the auto protection policy bindings read from the CCFE tables.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + listAutoProtectionPolicyBindings( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAutoProtectionPolicyBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists AppliedAutoProtectionPolicies in a given project and location.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + listAppliedAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAppliedAutoProtectionPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * InitiateDeleteAutoProtectionPolicyBinding initiates delete for
+     * AutoProtectionPolicy Binding
+     * 
+ */ + public com.google.longrunning.Operation initiateDeleteAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getInitiateDeleteAutoProtectionPolicyBindingMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
+     * Gets details of a single Binding Matching Resource.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.BindingMatchingResource getBindingMatchingResource( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBindingMatchingResourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + listBindingMatchingResources( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListBindingMatchingResourcesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service BackupDR. + * + *
+   * The BackupDR Service
+   * 
+ */ + public static final class BackupDRFutureStub + extends io.grpc.stub.AbstractFutureStub { + private BackupDRFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BackupDRFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDRFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ManagementServers in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListManagementServersResponse> + listManagementServers( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListManagementServersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single ManagementServer.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ManagementServer> + getManagementServer(com.google.cloud.backupdr.v1beta.GetManagementServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetManagementServerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new ManagementServer in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createManagementServer( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateManagementServerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single ManagementServer.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteManagementServer( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteManagementServerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new BackupVault in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBackupVault(com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupVaultMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists BackupVaults in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse> + listBackupVaults(com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupVaultsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * FetchUsableBackupVaults lists usable BackupVaults in a given project and
+     * location. Usable BackupVault are the ones that user has
+     * backupdr.backupVaults.get permission.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse> + fetchUsableBackupVaults( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchUsableBackupVaultsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a BackupVault.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.BackupVault> + getBackupVault(com.google.cloud.backupdr.v1beta.GetBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupVaultMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the settings of a BackupVault.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBackupVault(com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBackupVaultMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a BackupVault.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBackupVault(com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupVaultMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DataSources in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse> + listDataSources(com.google.cloud.backupdr.v1beta.ListDataSourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataSourcesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a DataSource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.DataSource> + getDataSource(com.google.cloud.backupdr.v1beta.GetDataSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the settings of a DataSource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDataSource(com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Backups in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListBackupsResponse> + listBackups(com.google.cloud.backupdr.v1beta.ListBackupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetch Backups for a given resource type.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse> + fetchBackupsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchBackupsForResourceTypeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a Backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.Backup> + getBackup(com.google.cloud.backupdr.v1beta.GetBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the settings of a Backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBackup(com.google.cloud.backupdr.v1beta.UpdateBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBackup(com.google.cloud.backupdr.v1beta.DeleteBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Restore from a Backup
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + restoreBackup(com.google.cloud.backupdr.v1beta.RestoreBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestoreBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a BackupPlan
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBackupPlan(com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupPlanMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update a BackupPlan.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBackupPlan(com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBackupPlanMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlan.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.BackupPlan> + getBackupPlan(com.google.cloud.backupdr.v1beta.GetBackupPlanRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupPlanMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists BackupPlans in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse> + listBackupPlans(com.google.cloud.backupdr.v1beta.ListBackupPlansRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupPlansMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single BackupPlan.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBackupPlan(com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupPlanMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanRevision.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.BackupPlanRevision> + getBackupPlanRevision( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupPlanRevisionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists BackupPlanRevisions in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse> + listBackupPlanRevisions( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupPlanRevisionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a BackupPlanAssociation
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateBackupPlanAssociationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update a BackupPlanAssociation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateBackupPlanAssociationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single BackupPlanAssociation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation> + getBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBackupPlanAssociationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists BackupPlanAssociations in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse> + listBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBackupPlanAssociationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List BackupPlanAssociations for a given resource type.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse> + fetchBackupPlanAssociationsForResourceType( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getFetchBackupPlanAssociationsForResourceTypeMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Deletes a single BackupPlanAssociation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteBackupPlanAssociationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Triggers a new Backup.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + triggerBackup(com.google.cloud.backupdr.v1beta.TriggerBackupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTriggerBackupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single DataSourceReference.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.DataSourceReference> + getDataSourceReference( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataSourceReferenceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DataSourceReferences for a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse> + listDataSourceReferences( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataSourceReferencesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetch DataSourceReferences for a given project, location and resource type.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse> + fetchDataSourceReferencesForResourceType( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getFetchDataSourceReferencesForResourceTypeMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Initializes the service related config for a project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + initializeService(com.google.cloud.backupdr.v1beta.InitializeServiceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getInitializeServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicy in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAutoProtectionPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists AutoProtectionPolicies for a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse> + listAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAutoProtectionPoliciesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy> + getAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAutoProtectionPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAutoProtectionPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single AutoProtectionPolicy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAutoProtectionPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new AutoProtectionPolicyBinding in a given project and
+     * location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAutoProtectionPolicyBindingMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Returns the auto protection policy binding read from the CCFE tables.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding> + getAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAutoProtectionPolicyBindingMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Returns the auto protection policy bindings read from the CCFE tables.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse> + listAutoProtectionPolicyBindings( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAutoProtectionPolicyBindingsMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Lists AppliedAutoProtectionPolicies in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse> + listAppliedAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAppliedAutoProtectionPoliciesMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * InitiateDeleteAutoProtectionPolicyBinding initiates delete for
+     * AutoProtectionPolicy Binding
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + initiateDeleteAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getInitiateDeleteAutoProtectionPolicyBindingMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets details of a single Binding Matching Resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.BindingMatchingResource> + getBindingMatchingResource( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBindingMatchingResourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Binding Matching Resources for a given AutoProtectionPolicyBinding.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse> + listBindingMatchingResources( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListBindingMatchingResourcesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_MANAGEMENT_SERVERS = 0; + private static final int METHODID_GET_MANAGEMENT_SERVER = 1; + private static final int METHODID_CREATE_MANAGEMENT_SERVER = 2; + private static final int METHODID_DELETE_MANAGEMENT_SERVER = 3; + private static final int METHODID_CREATE_BACKUP_VAULT = 4; + private static final int METHODID_LIST_BACKUP_VAULTS = 5; + private static final int METHODID_FETCH_USABLE_BACKUP_VAULTS = 6; + private static final int METHODID_GET_BACKUP_VAULT = 7; + private static final int METHODID_UPDATE_BACKUP_VAULT = 8; + private static final int METHODID_DELETE_BACKUP_VAULT = 9; + private static final int METHODID_LIST_DATA_SOURCES = 10; + private static final int METHODID_GET_DATA_SOURCE = 11; + private static final int METHODID_UPDATE_DATA_SOURCE = 12; + private static final int METHODID_LIST_BACKUPS = 13; + private static final int METHODID_FETCH_BACKUPS_FOR_RESOURCE_TYPE = 14; + private static final int METHODID_GET_BACKUP = 15; + private static final int METHODID_UPDATE_BACKUP = 16; + private static final int METHODID_DELETE_BACKUP = 17; + private static final int METHODID_RESTORE_BACKUP = 18; + private static final int METHODID_CREATE_BACKUP_PLAN = 19; + private static final int METHODID_UPDATE_BACKUP_PLAN = 20; + private static final int METHODID_GET_BACKUP_PLAN = 21; + private static final int METHODID_LIST_BACKUP_PLANS = 22; + private static final int METHODID_DELETE_BACKUP_PLAN = 23; + private static final int METHODID_GET_BACKUP_PLAN_REVISION = 24; + private static final int METHODID_LIST_BACKUP_PLAN_REVISIONS = 25; + private static final int METHODID_CREATE_BACKUP_PLAN_ASSOCIATION = 26; + private static final int METHODID_UPDATE_BACKUP_PLAN_ASSOCIATION = 27; + private static final int METHODID_GET_BACKUP_PLAN_ASSOCIATION = 28; + private static final int METHODID_LIST_BACKUP_PLAN_ASSOCIATIONS = 29; + private static final int METHODID_FETCH_BACKUP_PLAN_ASSOCIATIONS_FOR_RESOURCE_TYPE = 30; + private static final int METHODID_DELETE_BACKUP_PLAN_ASSOCIATION = 31; + private static final int METHODID_TRIGGER_BACKUP = 32; + private static final int METHODID_GET_DATA_SOURCE_REFERENCE = 33; + private static final int METHODID_LIST_DATA_SOURCE_REFERENCES = 34; + private static final int METHODID_FETCH_DATA_SOURCE_REFERENCES_FOR_RESOURCE_TYPE = 35; + private static final int METHODID_INITIALIZE_SERVICE = 36; + private static final int METHODID_CREATE_AUTO_PROTECTION_POLICY = 37; + private static final int METHODID_LIST_AUTO_PROTECTION_POLICIES = 38; + private static final int METHODID_GET_AUTO_PROTECTION_POLICY = 39; + private static final int METHODID_UPDATE_AUTO_PROTECTION_POLICY = 40; + private static final int METHODID_DELETE_AUTO_PROTECTION_POLICY = 41; + private static final int METHODID_CREATE_AUTO_PROTECTION_POLICY_BINDING = 42; + private static final int METHODID_GET_AUTO_PROTECTION_POLICY_BINDING = 43; + private static final int METHODID_LIST_AUTO_PROTECTION_POLICY_BINDINGS = 44; + private static final int METHODID_LIST_APPLIED_AUTO_PROTECTION_POLICIES = 45; + private static final int METHODID_INITIATE_DELETE_AUTO_PROTECTION_POLICY_BINDING = 46; + private static final int METHODID_GET_BINDING_MATCHING_RESOURCE = 47; + private static final int METHODID_LIST_BINDING_MATCHING_RESOURCES = 48; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_MANAGEMENT_SERVERS: + serviceImpl.listManagementServers( + (com.google.cloud.backupdr.v1beta.ListManagementServersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListManagementServersResponse>) + responseObserver); + break; + case METHODID_GET_MANAGEMENT_SERVER: + serviceImpl.getManagementServer( + (com.google.cloud.backupdr.v1beta.GetManagementServerRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_MANAGEMENT_SERVER: + serviceImpl.createManagementServer( + (com.google.cloud.backupdr.v1beta.CreateManagementServerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MANAGEMENT_SERVER: + serviceImpl.deleteManagementServer( + (com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BACKUP_VAULT: + serviceImpl.createBackupVault( + (com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_BACKUP_VAULTS: + serviceImpl.listBackupVaults( + (com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse>) + responseObserver); + break; + case METHODID_FETCH_USABLE_BACKUP_VAULTS: + serviceImpl.fetchUsableBackupVaults( + (com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse>) + responseObserver); + break; + case METHODID_GET_BACKUP_VAULT: + serviceImpl.getBackupVault( + (com.google.cloud.backupdr.v1beta.GetBackupVaultRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_BACKUP_VAULT: + serviceImpl.updateBackupVault( + (com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_BACKUP_VAULT: + serviceImpl.deleteBackupVault( + (com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DATA_SOURCES: + serviceImpl.listDataSources( + (com.google.cloud.backupdr.v1beta.ListDataSourcesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse>) + responseObserver); + break; + case METHODID_GET_DATA_SOURCE: + serviceImpl.getDataSource( + (com.google.cloud.backupdr.v1beta.GetDataSourceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_DATA_SOURCE: + serviceImpl.updateDataSource( + (com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_BACKUPS: + serviceImpl.listBackups( + (com.google.cloud.backupdr.v1beta.ListBackupsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_FETCH_BACKUPS_FOR_RESOURCE_TYPE: + serviceImpl.fetchBackupsForResourceType( + (com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse>) + responseObserver); + break; + case METHODID_GET_BACKUP: + serviceImpl.getBackup( + (com.google.cloud.backupdr.v1beta.GetBackupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_BACKUP: + serviceImpl.updateBackup( + (com.google.cloud.backupdr.v1beta.UpdateBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_BACKUP: + serviceImpl.deleteBackup( + (com.google.cloud.backupdr.v1beta.DeleteBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTORE_BACKUP: + serviceImpl.restoreBackup( + (com.google.cloud.backupdr.v1beta.RestoreBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_BACKUP_PLAN: + serviceImpl.createBackupPlan( + (com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_BACKUP_PLAN: + serviceImpl.updateBackupPlan( + (com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP_PLAN: + serviceImpl.getBackupPlan( + (com.google.cloud.backupdr.v1beta.GetBackupPlanRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_BACKUP_PLANS: + serviceImpl.listBackupPlans( + (com.google.cloud.backupdr.v1beta.ListBackupPlansRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse>) + responseObserver); + break; + case METHODID_DELETE_BACKUP_PLAN: + serviceImpl.deleteBackupPlan( + (com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP_PLAN_REVISION: + serviceImpl.getBackupPlanRevision( + (com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_BACKUP_PLAN_REVISIONS: + serviceImpl.listBackupPlanRevisions( + (com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse>) + responseObserver); + break; + case METHODID_CREATE_BACKUP_PLAN_ASSOCIATION: + serviceImpl.createBackupPlanAssociation( + (com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_BACKUP_PLAN_ASSOCIATION: + serviceImpl.updateBackupPlanAssociation( + (com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BACKUP_PLAN_ASSOCIATION: + serviceImpl.getBackupPlanAssociation( + (com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_BACKUP_PLAN_ASSOCIATIONS: + serviceImpl.listBackupPlanAssociations( + (com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse>) + responseObserver); + break; + case METHODID_FETCH_BACKUP_PLAN_ASSOCIATIONS_FOR_RESOURCE_TYPE: + serviceImpl.fetchBackupPlanAssociationsForResourceType( + (com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta + .FetchBackupPlanAssociationsForResourceTypeResponse>) + responseObserver); + break; + case METHODID_DELETE_BACKUP_PLAN_ASSOCIATION: + serviceImpl.deleteBackupPlanAssociation( + (com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TRIGGER_BACKUP: + serviceImpl.triggerBackup( + (com.google.cloud.backupdr.v1beta.TriggerBackupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DATA_SOURCE_REFERENCE: + serviceImpl.getDataSourceReference( + (com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DATA_SOURCE_REFERENCES: + serviceImpl.listDataSourceReferences( + (com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse>) + responseObserver); + break; + case METHODID_FETCH_DATA_SOURCE_REFERENCES_FOR_RESOURCE_TYPE: + serviceImpl.fetchDataSourceReferencesForResourceType( + (com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta + .FetchDataSourceReferencesForResourceTypeResponse>) + responseObserver); + break; + case METHODID_INITIALIZE_SERVICE: + serviceImpl.initializeService( + (com.google.cloud.backupdr.v1beta.InitializeServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_AUTO_PROTECTION_POLICY: + serviceImpl.createAutoProtectionPolicy( + (com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_AUTO_PROTECTION_POLICIES: + serviceImpl.listAutoProtectionPolicies( + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse>) + responseObserver); + break; + case METHODID_GET_AUTO_PROTECTION_POLICY: + serviceImpl.getAutoProtectionPolicy( + (com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_AUTO_PROTECTION_POLICY: + serviceImpl.updateAutoProtectionPolicy( + (com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_AUTO_PROTECTION_POLICY: + serviceImpl.deleteAutoProtectionPolicy( + (com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_AUTO_PROTECTION_POLICY_BINDING: + serviceImpl.createAutoProtectionPolicyBinding( + (com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AUTO_PROTECTION_POLICY_BINDING: + serviceImpl.getAutoProtectionPolicyBinding( + (com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding>) + responseObserver); + break; + case METHODID_LIST_AUTO_PROTECTION_POLICY_BINDINGS: + serviceImpl.listAutoProtectionPolicyBindings( + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse>) + responseObserver); + break; + case METHODID_LIST_APPLIED_AUTO_PROTECTION_POLICIES: + serviceImpl.listAppliedAutoProtectionPolicies( + (com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse>) + responseObserver); + break; + case METHODID_INITIATE_DELETE_AUTO_PROTECTION_POLICY_BINDING: + serviceImpl.initiateDeleteAutoProtectionPolicyBinding( + (com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BINDING_MATCHING_RESOURCE: + serviceImpl.getBindingMatchingResource( + (com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.BindingMatchingResource>) + responseObserver); + break; + case METHODID_LIST_BINDING_MATCHING_RESOURCES: + serviceImpl.listBindingMatchingResources( + (com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListManagementServersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListManagementServersRequest, + com.google.cloud.backupdr.v1beta.ListManagementServersResponse>( + service, METHODID_LIST_MANAGEMENT_SERVERS))) + .addMethod( + getGetManagementServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetManagementServerRequest, + com.google.cloud.backupdr.v1beta.ManagementServer>( + service, METHODID_GET_MANAGEMENT_SERVER))) + .addMethod( + getCreateManagementServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_MANAGEMENT_SERVER))) + .addMethod( + getDeleteManagementServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_MANAGEMENT_SERVER))) + .addMethod( + getCreateBackupVaultMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_BACKUP_VAULT))) + .addMethod( + getListBackupVaultsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest, + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse>( + service, METHODID_LIST_BACKUP_VAULTS))) + .addMethod( + getFetchUsableBackupVaultsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest, + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse>( + service, METHODID_FETCH_USABLE_BACKUP_VAULTS))) + .addMethod( + getGetBackupVaultMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest, + com.google.cloud.backupdr.v1beta.BackupVault>( + service, METHODID_GET_BACKUP_VAULT))) + .addMethod( + getUpdateBackupVaultMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_BACKUP_VAULT))) + .addMethod( + getDeleteBackupVaultMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP_VAULT))) + .addMethod( + getListDataSourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest, + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse>( + service, METHODID_LIST_DATA_SOURCES))) + .addMethod( + getGetDataSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetDataSourceRequest, + com.google.cloud.backupdr.v1beta.DataSource>( + service, METHODID_GET_DATA_SOURCE))) + .addMethod( + getUpdateDataSourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_DATA_SOURCE))) + .addMethod( + getListBackupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListBackupsRequest, + com.google.cloud.backupdr.v1beta.ListBackupsResponse>( + service, METHODID_LIST_BACKUPS))) + .addMethod( + getFetchBackupsForResourceTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest, + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse>( + service, METHODID_FETCH_BACKUPS_FOR_RESOURCE_TYPE))) + .addMethod( + getGetBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetBackupRequest, + com.google.cloud.backupdr.v1beta.Backup>(service, METHODID_GET_BACKUP))) + .addMethod( + getUpdateBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.UpdateBackupRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_BACKUP))) + .addMethod( + getDeleteBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.DeleteBackupRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP))) + .addMethod( + getRestoreBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.RestoreBackupRequest, + com.google.longrunning.Operation>(service, METHODID_RESTORE_BACKUP))) + .addMethod( + getCreateBackupPlanMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_BACKUP_PLAN))) + .addMethod( + getUpdateBackupPlanMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_BACKUP_PLAN))) + .addMethod( + getGetBackupPlanMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest, + com.google.cloud.backupdr.v1beta.BackupPlan>( + service, METHODID_GET_BACKUP_PLAN))) + .addMethod( + getListBackupPlansMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse>( + service, METHODID_LIST_BACKUP_PLANS))) + .addMethod( + getDeleteBackupPlanMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_BACKUP_PLAN))) + .addMethod( + getGetBackupPlanRevisionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest, + com.google.cloud.backupdr.v1beta.BackupPlanRevision>( + service, METHODID_GET_BACKUP_PLAN_REVISION))) + .addMethod( + getListBackupPlanRevisionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse>( + service, METHODID_LIST_BACKUP_PLAN_REVISIONS))) + .addMethod( + getCreateBackupPlanAssociationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_BACKUP_PLAN_ASSOCIATION))) + .addMethod( + getUpdateBackupPlanAssociationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_BACKUP_PLAN_ASSOCIATION))) + .addMethod( + getGetBackupPlanAssociationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation>( + service, METHODID_GET_BACKUP_PLAN_ASSOCIATION))) + .addMethod( + getListBackupPlanAssociationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest, + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse>( + service, METHODID_LIST_BACKUP_PLAN_ASSOCIATIONS))) + .addMethod( + getFetchBackupPlanAssociationsForResourceTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta + .FetchBackupPlanAssociationsForResourceTypeRequest, + com.google.cloud.backupdr.v1beta + .FetchBackupPlanAssociationsForResourceTypeResponse>( + service, METHODID_FETCH_BACKUP_PLAN_ASSOCIATIONS_FOR_RESOURCE_TYPE))) + .addMethod( + getDeleteBackupPlanAssociationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_BACKUP_PLAN_ASSOCIATION))) + .addMethod( + getTriggerBackupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.TriggerBackupRequest, + com.google.longrunning.Operation>(service, METHODID_TRIGGER_BACKUP))) + .addMethod( + getGetDataSourceReferenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest, + com.google.cloud.backupdr.v1beta.DataSourceReference>( + service, METHODID_GET_DATA_SOURCE_REFERENCE))) + .addMethod( + getListDataSourceReferencesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest, + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse>( + service, METHODID_LIST_DATA_SOURCE_REFERENCES))) + .addMethod( + getFetchDataSourceReferencesForResourceTypeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta + .FetchDataSourceReferencesForResourceTypeRequest, + com.google.cloud.backupdr.v1beta + .FetchDataSourceReferencesForResourceTypeResponse>( + service, METHODID_FETCH_DATA_SOURCE_REFERENCES_FOR_RESOURCE_TYPE))) + .addMethod( + getInitializeServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.InitializeServiceRequest, + com.google.longrunning.Operation>(service, METHODID_INITIALIZE_SERVICE))) + .addMethod( + getCreateAutoProtectionPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_AUTO_PROTECTION_POLICY))) + .addMethod( + getListAutoProtectionPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse>( + service, METHODID_LIST_AUTO_PROTECTION_POLICIES))) + .addMethod( + getGetAutoProtectionPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy>( + service, METHODID_GET_AUTO_PROTECTION_POLICY))) + .addMethod( + getUpdateAutoProtectionPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_AUTO_PROTECTION_POLICY))) + .addMethod( + getDeleteAutoProtectionPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_AUTO_PROTECTION_POLICY))) + .addMethod( + getCreateAutoProtectionPolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_AUTO_PROTECTION_POLICY_BINDING))) + .addMethod( + getGetAutoProtectionPolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding>( + service, METHODID_GET_AUTO_PROTECTION_POLICY_BINDING))) + .addMethod( + getListAutoProtectionPolicyBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse>( + service, METHODID_LIST_AUTO_PROTECTION_POLICY_BINDINGS))) + .addMethod( + getListAppliedAutoProtectionPoliciesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest, + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse>( + service, METHODID_LIST_APPLIED_AUTO_PROTECTION_POLICIES))) + .addMethod( + getInitiateDeleteAutoProtectionPolicyBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta + .InitiateDeleteAutoProtectionPolicyBindingRequest, + com.google.longrunning.Operation>( + service, METHODID_INITIATE_DELETE_AUTO_PROTECTION_POLICY_BINDING))) + .addMethod( + getGetBindingMatchingResourceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest, + com.google.cloud.backupdr.v1beta.BindingMatchingResource>( + service, METHODID_GET_BINDING_MATCHING_RESOURCE))) + .addMethod( + getListBindingMatchingResourcesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest, + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse>( + service, METHODID_LIST_BINDING_MATCHING_RESOURCES))) + .build(); + } + + private abstract static class BackupDRBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + BackupDRBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("BackupDR"); + } + } + + private static final class BackupDRFileDescriptorSupplier extends BackupDRBaseDescriptorSupplier { + BackupDRFileDescriptorSupplier() {} + } + + private static final class BackupDRMethodDescriptorSupplier extends BackupDRBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + BackupDRMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (BackupDRGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new BackupDRFileDescriptorSupplier()) + .addMethod(getListManagementServersMethod()) + .addMethod(getGetManagementServerMethod()) + .addMethod(getCreateManagementServerMethod()) + .addMethod(getDeleteManagementServerMethod()) + .addMethod(getCreateBackupVaultMethod()) + .addMethod(getListBackupVaultsMethod()) + .addMethod(getFetchUsableBackupVaultsMethod()) + .addMethod(getGetBackupVaultMethod()) + .addMethod(getUpdateBackupVaultMethod()) + .addMethod(getDeleteBackupVaultMethod()) + .addMethod(getListDataSourcesMethod()) + .addMethod(getGetDataSourceMethod()) + .addMethod(getUpdateDataSourceMethod()) + .addMethod(getListBackupsMethod()) + .addMethod(getFetchBackupsForResourceTypeMethod()) + .addMethod(getGetBackupMethod()) + .addMethod(getUpdateBackupMethod()) + .addMethod(getDeleteBackupMethod()) + .addMethod(getRestoreBackupMethod()) + .addMethod(getCreateBackupPlanMethod()) + .addMethod(getUpdateBackupPlanMethod()) + .addMethod(getGetBackupPlanMethod()) + .addMethod(getListBackupPlansMethod()) + .addMethod(getDeleteBackupPlanMethod()) + .addMethod(getGetBackupPlanRevisionMethod()) + .addMethod(getListBackupPlanRevisionsMethod()) + .addMethod(getCreateBackupPlanAssociationMethod()) + .addMethod(getUpdateBackupPlanAssociationMethod()) + .addMethod(getGetBackupPlanAssociationMethod()) + .addMethod(getListBackupPlanAssociationsMethod()) + .addMethod(getFetchBackupPlanAssociationsForResourceTypeMethod()) + .addMethod(getDeleteBackupPlanAssociationMethod()) + .addMethod(getTriggerBackupMethod()) + .addMethod(getGetDataSourceReferenceMethod()) + .addMethod(getListDataSourceReferencesMethod()) + .addMethod(getFetchDataSourceReferencesForResourceTypeMethod()) + .addMethod(getInitializeServiceMethod()) + .addMethod(getCreateAutoProtectionPolicyMethod()) + .addMethod(getListAutoProtectionPoliciesMethod()) + .addMethod(getGetAutoProtectionPolicyMethod()) + .addMethod(getUpdateAutoProtectionPolicyMethod()) + .addMethod(getDeleteAutoProtectionPolicyMethod()) + .addMethod(getCreateAutoProtectionPolicyBindingMethod()) + .addMethod(getGetAutoProtectionPolicyBindingMethod()) + .addMethod(getListAutoProtectionPolicyBindingsMethod()) + .addMethod(getListAppliedAutoProtectionPoliciesMethod()) + .addMethod(getInitiateDeleteAutoProtectionPolicyBindingMethod()) + .addMethod(getGetBindingMatchingResourceMethod()) + .addMethod(getListBindingMatchingResourcesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-backupdr/grpc-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryGrpc.java b/java-backupdr/grpc-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryGrpc.java new file mode 100644 index 000000000000..53c19064a360 --- /dev/null +++ b/java-backupdr/grpc-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrProtectionSummaryGrpc.java @@ -0,0 +1,442 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The Protection Summary service.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class BackupDrProtectionSummaryGrpc { + + private BackupDrProtectionSummaryGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.backupdr.v1beta.BackupDrProtectionSummary"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest, + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse> + getListResourceBackupConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListResourceBackupConfigs", + requestType = com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.class, + responseType = com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest, + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse> + getListResourceBackupConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest, + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse> + getListResourceBackupConfigsMethod; + if ((getListResourceBackupConfigsMethod = + BackupDrProtectionSummaryGrpc.getListResourceBackupConfigsMethod) + == null) { + synchronized (BackupDrProtectionSummaryGrpc.class) { + if ((getListResourceBackupConfigsMethod = + BackupDrProtectionSummaryGrpc.getListResourceBackupConfigsMethod) + == null) { + BackupDrProtectionSummaryGrpc.getListResourceBackupConfigsMethod = + getListResourceBackupConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListResourceBackupConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BackupDrProtectionSummaryMethodDescriptorSupplier( + "ListResourceBackupConfigs")) + .build(); + } + } + } + return getListResourceBackupConfigsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static BackupDrProtectionSummaryStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BackupDrProtectionSummaryStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDrProtectionSummaryStub(channel, callOptions); + } + }; + return BackupDrProtectionSummaryStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static BackupDrProtectionSummaryBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BackupDrProtectionSummaryBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDrProtectionSummaryBlockingV2Stub(channel, callOptions); + } + }; + return BackupDrProtectionSummaryBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BackupDrProtectionSummaryBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BackupDrProtectionSummaryBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDrProtectionSummaryBlockingStub(channel, callOptions); + } + }; + return BackupDrProtectionSummaryBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static BackupDrProtectionSummaryFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BackupDrProtectionSummaryFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDrProtectionSummaryFutureStub(channel, callOptions); + } + }; + return BackupDrProtectionSummaryFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The Protection Summary service.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists ResourceBackupConfigs.
+     * 
+ */ + default void listResourceBackupConfigs( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListResourceBackupConfigsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service BackupDrProtectionSummary. + * + *
+   * The Protection Summary service.
+   * 
+ */ + public abstract static class BackupDrProtectionSummaryImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return BackupDrProtectionSummaryGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service BackupDrProtectionSummary. + * + *
+   * The Protection Summary service.
+   * 
+ */ + public static final class BackupDrProtectionSummaryStub + extends io.grpc.stub.AbstractAsyncStub { + private BackupDrProtectionSummaryStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BackupDrProtectionSummaryStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDrProtectionSummaryStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ResourceBackupConfigs.
+     * 
+ */ + public void listResourceBackupConfigs( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListResourceBackupConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service BackupDrProtectionSummary. + * + *
+   * The Protection Summary service.
+   * 
+ */ + public static final class BackupDrProtectionSummaryBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private BackupDrProtectionSummaryBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BackupDrProtectionSummaryBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDrProtectionSummaryBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ResourceBackupConfigs.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + listResourceBackupConfigs( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListResourceBackupConfigsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service + * BackupDrProtectionSummary. + * + *
+   * The Protection Summary service.
+   * 
+ */ + public static final class BackupDrProtectionSummaryBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private BackupDrProtectionSummaryBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BackupDrProtectionSummaryBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDrProtectionSummaryBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ResourceBackupConfigs.
+     * 
+ */ + public com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + listResourceBackupConfigs( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListResourceBackupConfigsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * BackupDrProtectionSummary. + * + *
+   * The Protection Summary service.
+   * 
+ */ + public static final class BackupDrProtectionSummaryFutureStub + extends io.grpc.stub.AbstractFutureStub { + private BackupDrProtectionSummaryFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BackupDrProtectionSummaryFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BackupDrProtectionSummaryFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists ResourceBackupConfigs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse> + listResourceBackupConfigs( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListResourceBackupConfigsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_RESOURCE_BACKUP_CONFIGS = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_RESOURCE_BACKUP_CONFIGS: + serviceImpl.listResourceBackupConfigs( + (com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListResourceBackupConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest, + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse>( + service, METHODID_LIST_RESOURCE_BACKUP_CONFIGS))) + .build(); + } + + private abstract static class BackupDrProtectionSummaryBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + BackupDrProtectionSummaryBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("BackupDrProtectionSummary"); + } + } + + private static final class BackupDrProtectionSummaryFileDescriptorSupplier + extends BackupDrProtectionSummaryBaseDescriptorSupplier { + BackupDrProtectionSummaryFileDescriptorSupplier() {} + } + + private static final class BackupDrProtectionSummaryMethodDescriptorSupplier + extends BackupDrProtectionSummaryBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + BackupDrProtectionSummaryMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (BackupDrProtectionSummaryGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new BackupDrProtectionSummaryFileDescriptorSupplier()) + .addMethod(getListResourceBackupConfigsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-backupdr/pom.xml b/java-backupdr/pom.xml index 67fa56c84168..93f958408bf2 100644 --- a/java-backupdr/pom.xml +++ b/java-backupdr/pom.xml @@ -37,11 +37,21 @@ grpc-google-cloud-backupdr-v1 0.57.0-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-backupdr-v1beta + 0.57.0-SNAPSHOT + com.google.api.grpc proto-google-cloud-backupdr-v1 0.57.0-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-backupdr-v1beta + 0.57.0-SNAPSHOT + @@ -51,7 +61,9 @@ google-cloud-backupdr grpc-google-cloud-backupdr-v1 + grpc-google-cloud-backupdr-v1beta proto-google-cloud-backupdr-v1 + proto-google-cloud-backupdr-v1beta google-cloud-backupdr-bom diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/clirr-ignored-differences.xml b/java-backupdr/proto-google-cloud-backupdr-v1beta/clirr-ignored-differences.xml new file mode 100644 index 000000000000..c96b3628347e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/backupdr/v1beta/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/backupdr/v1beta/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/backupdr/v1beta/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/backupdr/v1beta/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * clear() + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * clearField(*) + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * clone() + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * setField(*) + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/backupdr/v1beta/** + * setUnknownFields(*) + ** + + diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/pom.xml b/java-backupdr/proto-google-cloud-backupdr-v1beta/pom.xml new file mode 100644 index 000000000000..d214f3076d2e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/pom.xml @@ -0,0 +1,41 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-backupdr-v1beta + 0.57.0-SNAPSHOT + proto-google-cloud-backupdr-v1beta + Proto library for google-cloud-backupdr + + com.google.cloud + google-cloud-backupdr-parent + 0.57.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + org.jspecify + jspecify + + + diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AcceleratorConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AcceleratorConfig.java new file mode 100644 index 000000000000..f32cdb54afd5 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AcceleratorConfig.java @@ -0,0 +1,788 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A specification of the type and number of accelerator cards attached to the
+ * instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AcceleratorConfig} + */ +@com.google.protobuf.Generated +public final class AcceleratorConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AcceleratorConfig) + AcceleratorConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AcceleratorConfig"); + } + + // Use AcceleratorConfig.newBuilder() to construct. + private AcceleratorConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AcceleratorConfig() { + acceleratorType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AcceleratorConfig.class, + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder.class); + } + + private int bitField0_; + public static final int ACCELERATOR_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object acceleratorType_ = ""; + + /** + * + * + *
+   * Optional. Full or partial URL of the accelerator type resource to attach to
+   * this instance.
+   * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the acceleratorType field is set. + */ + @java.lang.Override + public boolean hasAcceleratorType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Full or partial URL of the accelerator type resource to attach to
+   * this instance.
+   * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceleratorType. + */ + @java.lang.Override + public java.lang.String getAcceleratorType() { + java.lang.Object ref = acceleratorType_; + 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(); + acceleratorType_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Full or partial URL of the accelerator type resource to attach to
+   * this instance.
+   * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for acceleratorType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAcceleratorTypeBytes() { + java.lang.Object ref = acceleratorType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + acceleratorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCELERATOR_COUNT_FIELD_NUMBER = 2; + private int acceleratorCount_ = 0; + + /** + * + * + *
+   * Optional. The number of the guest accelerator cards exposed to this
+   * instance.
+   * 
+ * + * optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the acceleratorCount field is set. + */ + @java.lang.Override + public boolean hasAcceleratorCount() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The number of the guest accelerator cards exposed to this
+   * instance.
+   * 
+ * + * optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceleratorCount. + */ + @java.lang.Override + public int getAcceleratorCount() { + return acceleratorCount_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, acceleratorType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(2, acceleratorCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, acceleratorType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, acceleratorCount_); + } + 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.backupdr.v1beta.AcceleratorConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AcceleratorConfig other = + (com.google.cloud.backupdr.v1beta.AcceleratorConfig) obj; + + if (hasAcceleratorType() != other.hasAcceleratorType()) return false; + if (hasAcceleratorType()) { + if (!getAcceleratorType().equals(other.getAcceleratorType())) return false; + } + if (hasAcceleratorCount() != other.hasAcceleratorCount()) return false; + if (hasAcceleratorCount()) { + if (getAcceleratorCount() != other.getAcceleratorCount()) 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 (hasAcceleratorType()) { + hash = (37 * hash) + ACCELERATOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorType().hashCode(); + } + if (hasAcceleratorCount()) { + hash = (37 * hash) + ACCELERATOR_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getAcceleratorCount(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig 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.backupdr.v1beta.AcceleratorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig 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.backupdr.v1beta.AcceleratorConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AcceleratorConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A specification of the type and number of accelerator cards attached to the
+   * instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AcceleratorConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AcceleratorConfig) + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AcceleratorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AcceleratorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AcceleratorConfig.class, + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AcceleratorConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + acceleratorType_ = ""; + acceleratorCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AcceleratorConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AcceleratorConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AcceleratorConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AcceleratorConfig build() { + com.google.cloud.backupdr.v1beta.AcceleratorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AcceleratorConfig buildPartial() { + com.google.cloud.backupdr.v1beta.AcceleratorConfig result = + new com.google.cloud.backupdr.v1beta.AcceleratorConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AcceleratorConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.acceleratorType_ = acceleratorType_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.acceleratorCount_ = acceleratorCount_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AcceleratorConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AcceleratorConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AcceleratorConfig other) { + if (other == com.google.cloud.backupdr.v1beta.AcceleratorConfig.getDefaultInstance()) + return this; + if (other.hasAcceleratorType()) { + acceleratorType_ = other.acceleratorType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAcceleratorCount()) { + setAcceleratorCount(other.getAcceleratorCount()); + } + 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: + { + acceleratorType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + acceleratorCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 acceleratorType_ = ""; + + /** + * + * + *
+     * Optional. Full or partial URL of the accelerator type resource to attach to
+     * this instance.
+     * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the acceleratorType field is set. + */ + public boolean hasAcceleratorType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Full or partial URL of the accelerator type resource to attach to
+     * this instance.
+     * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceleratorType. + */ + public java.lang.String getAcceleratorType() { + java.lang.Object ref = acceleratorType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + acceleratorType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Full or partial URL of the accelerator type resource to attach to
+     * this instance.
+     * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for acceleratorType. + */ + public com.google.protobuf.ByteString getAcceleratorTypeBytes() { + java.lang.Object ref = acceleratorType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + acceleratorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Full or partial URL of the accelerator type resource to attach to
+     * this instance.
+     * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + acceleratorType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Full or partial URL of the accelerator type resource to attach to
+     * this instance.
+     * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAcceleratorType() { + acceleratorType_ = getDefaultInstance().getAcceleratorType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Full or partial URL of the accelerator type resource to attach to
+     * this instance.
+     * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for acceleratorType to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + acceleratorType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int acceleratorCount_; + + /** + * + * + *
+     * Optional. The number of the guest accelerator cards exposed to this
+     * instance.
+     * 
+ * + * optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the acceleratorCount field is set. + */ + @java.lang.Override + public boolean hasAcceleratorCount() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The number of the guest accelerator cards exposed to this
+     * instance.
+     * 
+ * + * optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceleratorCount. + */ + @java.lang.Override + public int getAcceleratorCount() { + return acceleratorCount_; + } + + /** + * + * + *
+     * Optional. The number of the guest accelerator cards exposed to this
+     * instance.
+     * 
+ * + * optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The acceleratorCount to set. + * @return This builder for chaining. + */ + public Builder setAcceleratorCount(int value) { + + acceleratorCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The number of the guest accelerator cards exposed to this
+     * instance.
+     * 
+ * + * optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAcceleratorCount() { + bitField0_ = (bitField0_ & ~0x00000002); + acceleratorCount_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AcceleratorConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AcceleratorConfig) + private static final com.google.cloud.backupdr.v1beta.AcceleratorConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AcceleratorConfig(); + } + + public static com.google.cloud.backupdr.v1beta.AcceleratorConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceleratorConfig 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.backupdr.v1beta.AcceleratorConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AcceleratorConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AcceleratorConfigOrBuilder.java new file mode 100644 index 000000000000..f481b5a50828 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AcceleratorConfigOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AcceleratorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AcceleratorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Full or partial URL of the accelerator type resource to attach to
+   * this instance.
+   * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the acceleratorType field is set. + */ + boolean hasAcceleratorType(); + + /** + * + * + *
+   * Optional. Full or partial URL of the accelerator type resource to attach to
+   * this instance.
+   * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceleratorType. + */ + java.lang.String getAcceleratorType(); + + /** + * + * + *
+   * Optional. Full or partial URL of the accelerator type resource to attach to
+   * this instance.
+   * 
+ * + * optional string accelerator_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for acceleratorType. + */ + com.google.protobuf.ByteString getAcceleratorTypeBytes(); + + /** + * + * + *
+   * Optional. The number of the guest accelerator cards exposed to this
+   * instance.
+   * 
+ * + * optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the acceleratorCount field is set. + */ + boolean hasAcceleratorCount(); + + /** + * + * + *
+   * Optional. The number of the guest accelerator cards exposed to this
+   * instance.
+   * 
+ * + * optional int32 accelerator_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceleratorCount. + */ + int getAcceleratorCount(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AccessConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AccessConfig.java new file mode 100644 index 000000000000..1b3c4f1f6cd3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AccessConfig.java @@ -0,0 +1,2436 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * An access configuration attached to an instance's network interface.
+ * Only one access config per instance is supported.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AccessConfig} + */ +@com.google.protobuf.Generated +public final class AccessConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AccessConfig) + AccessConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AccessConfig"); + } + + // Use AccessConfig.newBuilder() to construct. + private AccessConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AccessConfig() { + type_ = 0; + name_ = ""; + externalIp_ = ""; + externalIpv6_ = ""; + publicPtrDomainName_ = ""; + networkTier_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AccessConfig.class, + com.google.cloud.backupdr.v1beta.AccessConfig.Builder.class); + } + + /** + * + * + *
+   * The type of configuration.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AccessConfig.AccessType} + */ + public enum AccessType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ACCESS_TYPE_UNSPECIFIED = 0; + */ + ACCESS_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * ONE_TO_ONE_NAT
+     * 
+ * + * ONE_TO_ONE_NAT = 1; + */ + ONE_TO_ONE_NAT(1), + /** + * + * + *
+     * Direct IPv6 access.
+     * 
+ * + * DIRECT_IPV6 = 2; + */ + DIRECT_IPV6(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AccessType"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ACCESS_TYPE_UNSPECIFIED = 0; + */ + public static final int ACCESS_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * ONE_TO_ONE_NAT
+     * 
+ * + * ONE_TO_ONE_NAT = 1; + */ + public static final int ONE_TO_ONE_NAT_VALUE = 1; + + /** + * + * + *
+     * Direct IPv6 access.
+     * 
+ * + * DIRECT_IPV6 = 2; + */ + public static final int DIRECT_IPV6_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 AccessType 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 AccessType forNumber(int value) { + switch (value) { + case 0: + return ACCESS_TYPE_UNSPECIFIED; + case 1: + return ONE_TO_ONE_NAT; + case 2: + return DIRECT_IPV6; + 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 AccessType findValueByNumber(int number) { + return AccessType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AccessConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final AccessType[] VALUES = values(); + + public static AccessType 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 AccessType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.AccessConfig.AccessType) + } + + /** + * + * + *
+   * Network tier property used by addresses, instances and forwarding rules.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AccessConfig.NetworkTier} + */ + public enum NetworkTier implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * NETWORK_TIER_UNSPECIFIED = 0; + */ + NETWORK_TIER_UNSPECIFIED(0), + /** + * + * + *
+     * High quality, Google-grade network tier, support for all networking
+     * products.
+     * 
+ * + * PREMIUM = 1; + */ + PREMIUM(1), + /** + * + * + *
+     * Public internet quality, only limited support for other networking
+     * products.
+     * 
+ * + * STANDARD = 2; + */ + STANDARD(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "NetworkTier"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * NETWORK_TIER_UNSPECIFIED = 0; + */ + public static final int NETWORK_TIER_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * High quality, Google-grade network tier, support for all networking
+     * products.
+     * 
+ * + * PREMIUM = 1; + */ + public static final int PREMIUM_VALUE = 1; + + /** + * + * + *
+     * Public internet quality, only limited support for other networking
+     * products.
+     * 
+ * + * STANDARD = 2; + */ + public static final int STANDARD_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 NetworkTier 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 NetworkTier forNumber(int value) { + switch (value) { + case 0: + return NETWORK_TIER_UNSPECIFIED; + case 1: + return PREMIUM; + case 2: + return STANDARD; + 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 NetworkTier findValueByNumber(int number) { + return NetworkTier.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AccessConfig.getDescriptor().getEnumTypes().get(1); + } + + private static final NetworkTier[] VALUES = values(); + + public static NetworkTier 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 NetworkTier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.AccessConfig.NetworkTier) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+   * Optional. In accessConfigs (IPv4), the
+   * default and only option is ONE_TO_ONE_NAT. In
+   * ipv6AccessConfigs, the default and only option is
+   * DIRECT_IPV6.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. In accessConfigs (IPv4), the
+   * default and only option is ONE_TO_ONE_NAT. In
+   * ipv6AccessConfigs, the default and only option is
+   * DIRECT_IPV6.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Optional. In accessConfigs (IPv4), the
+   * default and only option is ONE_TO_ONE_NAT. In
+   * ipv6AccessConfigs, the default and only option is
+   * DIRECT_IPV6.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig.AccessType getType() { + com.google.cloud.backupdr.v1beta.AccessConfig.AccessType result = + com.google.cloud.backupdr.v1beta.AccessConfig.AccessType.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.AccessConfig.AccessType.UNRECOGNIZED + : result; + } + + public static final int NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Optional. The name of this access configuration.
+   * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the name field is set. + */ + @java.lang.Override + public boolean hasName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The name of this access configuration.
+   * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The name of this access configuration.
+   * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 EXTERNAL_IP_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalIp_ = ""; + + /** + * + * + *
+   * Optional. The external IP address of this access configuration.
+   * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the externalIp field is set. + */ + @java.lang.Override + public boolean hasExternalIp() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The external IP address of this access configuration.
+   * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The externalIp. + */ + @java.lang.Override + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + 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(); + externalIp_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The external IP address of this access configuration.
+   * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for externalIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IPV6_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalIpv6_ = ""; + + /** + * + * + *
+   * Optional. The external IPv6 address of this access configuration.
+   * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the externalIpv6 field is set. + */ + @java.lang.Override + public boolean hasExternalIpv6() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. The external IPv6 address of this access configuration.
+   * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalIpv6. + */ + @java.lang.Override + public java.lang.String getExternalIpv6() { + java.lang.Object ref = externalIpv6_; + 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(); + externalIpv6_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The external IPv6 address of this access configuration.
+   * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalIpv6. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIpv6Bytes() { + java.lang.Object ref = externalIpv6_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIpv6_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IPV6_PREFIX_LENGTH_FIELD_NUMBER = 5; + private int externalIpv6PrefixLength_ = 0; + + /** + * + * + *
+   * Optional. The prefix length of the external IPv6 range.
+   * 
+ * + * optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the externalIpv6PrefixLength field is set. + */ + @java.lang.Override + public boolean hasExternalIpv6PrefixLength() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. The prefix length of the external IPv6 range.
+   * 
+ * + * optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The externalIpv6PrefixLength. + */ + @java.lang.Override + public int getExternalIpv6PrefixLength() { + return externalIpv6PrefixLength_; + } + + public static final int SET_PUBLIC_PTR_FIELD_NUMBER = 6; + private boolean setPublicPtr_ = false; + + /** + * + * + *
+   * Optional. Specifies whether a public DNS 'PTR' record should be created to
+   * map the external IP address of the instance to a DNS domain name.
+   * 
+ * + * optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the setPublicPtr field is set. + */ + @java.lang.Override + public boolean hasSetPublicPtr() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Specifies whether a public DNS 'PTR' record should be created to
+   * map the external IP address of the instance to a DNS domain name.
+   * 
+ * + * optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The setPublicPtr. + */ + @java.lang.Override + public boolean getSetPublicPtr() { + return setPublicPtr_; + } + + public static final int PUBLIC_PTR_DOMAIN_NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object publicPtrDomainName_ = ""; + + /** + * + * + *
+   * Optional. The DNS domain name for the public PTR record.
+   * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publicPtrDomainName field is set. + */ + @java.lang.Override + public boolean hasPublicPtrDomainName() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. The DNS domain name for the public PTR record.
+   * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publicPtrDomainName. + */ + @java.lang.Override + public java.lang.String getPublicPtrDomainName() { + java.lang.Object ref = publicPtrDomainName_; + 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(); + publicPtrDomainName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The DNS domain name for the public PTR record.
+   * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for publicPtrDomainName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicPtrDomainNameBytes() { + java.lang.Object ref = publicPtrDomainName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicPtrDomainName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_TIER_FIELD_NUMBER = 8; + private int networkTier_ = 0; + + /** + * + * + *
+   * Optional. This signifies the networking tier used for configuring this
+   * access
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkTier field is set. + */ + @java.lang.Override + public boolean hasNetworkTier() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. This signifies the networking tier used for configuring this
+   * access
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for networkTier. + */ + @java.lang.Override + public int getNetworkTierValue() { + return networkTier_; + } + + /** + * + * + *
+   * Optional. This signifies the networking tier used for configuring this
+   * access
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkTier. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier getNetworkTier() { + com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier result = + com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier.forNumber(networkTier_); + return result == null + ? com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, name_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, externalIp_); + } + if (((bitField0_ & 0x00000008) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, externalIpv6_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeInt32(5, externalIpv6PrefixLength_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeBool(6, setPublicPtr_); + } + if (((bitField0_ & 0x00000040) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, publicPtrDomainName_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeEnum(8, networkTier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, externalIp_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, externalIpv6_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, externalIpv6PrefixLength_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, setPublicPtr_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, publicPtrDomainName_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, networkTier_); + } + 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.backupdr.v1beta.AccessConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AccessConfig other = + (com.google.cloud.backupdr.v1beta.AccessConfig) obj; + + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (type_ != other.type_) return false; + } + if (hasName() != other.hasName()) return false; + if (hasName()) { + if (!getName().equals(other.getName())) return false; + } + if (hasExternalIp() != other.hasExternalIp()) return false; + if (hasExternalIp()) { + if (!getExternalIp().equals(other.getExternalIp())) return false; + } + if (hasExternalIpv6() != other.hasExternalIpv6()) return false; + if (hasExternalIpv6()) { + if (!getExternalIpv6().equals(other.getExternalIpv6())) return false; + } + if (hasExternalIpv6PrefixLength() != other.hasExternalIpv6PrefixLength()) return false; + if (hasExternalIpv6PrefixLength()) { + if (getExternalIpv6PrefixLength() != other.getExternalIpv6PrefixLength()) return false; + } + if (hasSetPublicPtr() != other.hasSetPublicPtr()) return false; + if (hasSetPublicPtr()) { + if (getSetPublicPtr() != other.getSetPublicPtr()) return false; + } + if (hasPublicPtrDomainName() != other.hasPublicPtrDomainName()) return false; + if (hasPublicPtrDomainName()) { + if (!getPublicPtrDomainName().equals(other.getPublicPtrDomainName())) return false; + } + if (hasNetworkTier() != other.hasNetworkTier()) return false; + if (hasNetworkTier()) { + if (networkTier_ != other.networkTier_) 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 (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + } + if (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + if (hasExternalIp()) { + hash = (37 * hash) + EXTERNAL_IP_FIELD_NUMBER; + hash = (53 * hash) + getExternalIp().hashCode(); + } + if (hasExternalIpv6()) { + hash = (37 * hash) + EXTERNAL_IPV6_FIELD_NUMBER; + hash = (53 * hash) + getExternalIpv6().hashCode(); + } + if (hasExternalIpv6PrefixLength()) { + hash = (37 * hash) + EXTERNAL_IPV6_PREFIX_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getExternalIpv6PrefixLength(); + } + if (hasSetPublicPtr()) { + hash = (37 * hash) + SET_PUBLIC_PTR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSetPublicPtr()); + } + if (hasPublicPtrDomainName()) { + hash = (37 * hash) + PUBLIC_PTR_DOMAIN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPublicPtrDomainName().hashCode(); + } + if (hasNetworkTier()) { + hash = (37 * hash) + NETWORK_TIER_FIELD_NUMBER; + hash = (53 * hash) + networkTier_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig 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.backupdr.v1beta.AccessConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig 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.backupdr.v1beta.AccessConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AccessConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An access configuration attached to an instance's network interface.
+   * Only one access config per instance is supported.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AccessConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AccessConfig) + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AccessConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AccessConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AccessConfig.class, + com.google.cloud.backupdr.v1beta.AccessConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AccessConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + name_ = ""; + externalIp_ = ""; + externalIpv6_ = ""; + externalIpv6PrefixLength_ = 0; + setPublicPtr_ = false; + publicPtrDomainName_ = ""; + networkTier_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AccessConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AccessConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig build() { + com.google.cloud.backupdr.v1beta.AccessConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig buildPartial() { + com.google.cloud.backupdr.v1beta.AccessConfig result = + new com.google.cloud.backupdr.v1beta.AccessConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AccessConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.externalIp_ = externalIp_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.externalIpv6_ = externalIpv6_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.externalIpv6PrefixLength_ = externalIpv6PrefixLength_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.setPublicPtr_ = setPublicPtr_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.publicPtrDomainName_ = publicPtrDomainName_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.networkTier_ = networkTier_; + to_bitField0_ |= 0x00000080; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AccessConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AccessConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AccessConfig other) { + if (other == com.google.cloud.backupdr.v1beta.AccessConfig.getDefaultInstance()) return this; + if (other.hasType()) { + setTypeValue(other.getTypeValue()); + } + if (other.hasName()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasExternalIp()) { + externalIp_ = other.externalIp_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasExternalIpv6()) { + externalIpv6_ = other.externalIpv6_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasExternalIpv6PrefixLength()) { + setExternalIpv6PrefixLength(other.getExternalIpv6PrefixLength()); + } + if (other.hasSetPublicPtr()) { + setSetPublicPtr(other.getSetPublicPtr()); + } + if (other.hasPublicPtrDomainName()) { + publicPtrDomainName_ = other.publicPtrDomainName_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasNetworkTier()) { + setNetworkTierValue(other.getNetworkTierValue()); + } + 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 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + externalIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + externalIpv6_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + externalIpv6PrefixLength_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + setPublicPtr_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + publicPtrDomainName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + networkTier_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + 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 int type_ = 0; + + /** + * + * + *
+     * Optional. In accessConfigs (IPv4), the
+     * default and only option is ONE_TO_ONE_NAT. In
+     * ipv6AccessConfigs, the default and only option is
+     * DIRECT_IPV6.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. In accessConfigs (IPv4), the
+     * default and only option is ONE_TO_ONE_NAT. In
+     * ipv6AccessConfigs, the default and only option is
+     * DIRECT_IPV6.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Optional. In accessConfigs (IPv4), the
+     * default and only option is ONE_TO_ONE_NAT. In
+     * ipv6AccessConfigs, the default and only option is
+     * DIRECT_IPV6.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. In accessConfigs (IPv4), the
+     * default and only option is ONE_TO_ONE_NAT. In
+     * ipv6AccessConfigs, the default and only option is
+     * DIRECT_IPV6.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig.AccessType getType() { + com.google.cloud.backupdr.v1beta.AccessConfig.AccessType result = + com.google.cloud.backupdr.v1beta.AccessConfig.AccessType.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.AccessConfig.AccessType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. In accessConfigs (IPv4), the
+     * default and only option is ONE_TO_ONE_NAT. In
+     * ipv6AccessConfigs, the default and only option is
+     * DIRECT_IPV6.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.backupdr.v1beta.AccessConfig.AccessType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. In accessConfigs (IPv4), the
+     * default and only option is ONE_TO_ONE_NAT. In
+     * ipv6AccessConfigs, the default and only option is
+     * DIRECT_IPV6.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Optional. The name of this access configuration.
+     * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the name field is set. + */ + public boolean hasName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The name of this access configuration.
+     * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The name of this access configuration.
+     * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The name of this access configuration.
+     * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of this access configuration.
+     * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of this access configuration.
+     * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object externalIp_ = ""; + + /** + * + * + *
+     * Optional. The external IP address of this access configuration.
+     * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the externalIp field is set. + */ + public boolean hasExternalIp() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The external IP address of this access configuration.
+     * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The externalIp. + */ + public java.lang.String getExternalIp() { + java.lang.Object ref = externalIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The external IP address of this access configuration.
+     * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for externalIp. + */ + public com.google.protobuf.ByteString getExternalIpBytes() { + java.lang.Object ref = externalIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The external IP address of this access configuration.
+     * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalIp_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The external IP address of this access configuration.
+     * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExternalIp() { + externalIp_ = getDefaultInstance().getExternalIp(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The external IP address of this access configuration.
+     * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for externalIp to set. + * @return This builder for chaining. + */ + public Builder setExternalIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalIp_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object externalIpv6_ = ""; + + /** + * + * + *
+     * Optional. The external IPv6 address of this access configuration.
+     * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the externalIpv6 field is set. + */ + public boolean hasExternalIpv6() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. The external IPv6 address of this access configuration.
+     * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalIpv6. + */ + public java.lang.String getExternalIpv6() { + java.lang.Object ref = externalIpv6_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIpv6_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The external IPv6 address of this access configuration.
+     * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalIpv6. + */ + public com.google.protobuf.ByteString getExternalIpv6Bytes() { + java.lang.Object ref = externalIpv6_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIpv6_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The external IPv6 address of this access configuration.
+     * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The externalIpv6 to set. + * @return This builder for chaining. + */ + public Builder setExternalIpv6(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalIpv6_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The external IPv6 address of this access configuration.
+     * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExternalIpv6() { + externalIpv6_ = getDefaultInstance().getExternalIpv6(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The external IPv6 address of this access configuration.
+     * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for externalIpv6 to set. + * @return This builder for chaining. + */ + public Builder setExternalIpv6Bytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalIpv6_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int externalIpv6PrefixLength_; + + /** + * + * + *
+     * Optional. The prefix length of the external IPv6 range.
+     * 
+ * + * + * optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the externalIpv6PrefixLength field is set. + */ + @java.lang.Override + public boolean hasExternalIpv6PrefixLength() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The prefix length of the external IPv6 range.
+     * 
+ * + * + * optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The externalIpv6PrefixLength. + */ + @java.lang.Override + public int getExternalIpv6PrefixLength() { + return externalIpv6PrefixLength_; + } + + /** + * + * + *
+     * Optional. The prefix length of the external IPv6 range.
+     * 
+ * + * + * optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The externalIpv6PrefixLength to set. + * @return This builder for chaining. + */ + public Builder setExternalIpv6PrefixLength(int value) { + + externalIpv6PrefixLength_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The prefix length of the external IPv6 range.
+     * 
+ * + * + * optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExternalIpv6PrefixLength() { + bitField0_ = (bitField0_ & ~0x00000010); + externalIpv6PrefixLength_ = 0; + onChanged(); + return this; + } + + private boolean setPublicPtr_; + + /** + * + * + *
+     * Optional. Specifies whether a public DNS 'PTR' record should be created to
+     * map the external IP address of the instance to a DNS domain name.
+     * 
+ * + * optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the setPublicPtr field is set. + */ + @java.lang.Override + public boolean hasSetPublicPtr() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. Specifies whether a public DNS 'PTR' record should be created to
+     * map the external IP address of the instance to a DNS domain name.
+     * 
+ * + * optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The setPublicPtr. + */ + @java.lang.Override + public boolean getSetPublicPtr() { + return setPublicPtr_; + } + + /** + * + * + *
+     * Optional. Specifies whether a public DNS 'PTR' record should be created to
+     * map the external IP address of the instance to a DNS domain name.
+     * 
+ * + * optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The setPublicPtr to set. + * @return This builder for chaining. + */ + public Builder setSetPublicPtr(boolean value) { + + setPublicPtr_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies whether a public DNS 'PTR' record should be created to
+     * map the external IP address of the instance to a DNS domain name.
+     * 
+ * + * optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSetPublicPtr() { + bitField0_ = (bitField0_ & ~0x00000020); + setPublicPtr_ = false; + onChanged(); + return this; + } + + private java.lang.Object publicPtrDomainName_ = ""; + + /** + * + * + *
+     * Optional. The DNS domain name for the public PTR record.
+     * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publicPtrDomainName field is set. + */ + public boolean hasPublicPtrDomainName() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. The DNS domain name for the public PTR record.
+     * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publicPtrDomainName. + */ + public java.lang.String getPublicPtrDomainName() { + java.lang.Object ref = publicPtrDomainName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicPtrDomainName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The DNS domain name for the public PTR record.
+     * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for publicPtrDomainName. + */ + public com.google.protobuf.ByteString getPublicPtrDomainNameBytes() { + java.lang.Object ref = publicPtrDomainName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicPtrDomainName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The DNS domain name for the public PTR record.
+     * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The publicPtrDomainName to set. + * @return This builder for chaining. + */ + public Builder setPublicPtrDomainName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publicPtrDomainName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The DNS domain name for the public PTR record.
+     * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPublicPtrDomainName() { + publicPtrDomainName_ = getDefaultInstance().getPublicPtrDomainName(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The DNS domain name for the public PTR record.
+     * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for publicPtrDomainName to set. + * @return This builder for chaining. + */ + public Builder setPublicPtrDomainNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + publicPtrDomainName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int networkTier_ = 0; + + /** + * + * + *
+     * Optional. This signifies the networking tier used for configuring this
+     * access
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkTier field is set. + */ + @java.lang.Override + public boolean hasNetworkTier() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. This signifies the networking tier used for configuring this
+     * access
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for networkTier. + */ + @java.lang.Override + public int getNetworkTierValue() { + return networkTier_; + } + + /** + * + * + *
+     * Optional. This signifies the networking tier used for configuring this
+     * access
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for networkTier to set. + * @return This builder for chaining. + */ + public Builder setNetworkTierValue(int value) { + networkTier_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This signifies the networking tier used for configuring this
+     * access
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkTier. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier getNetworkTier() { + com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier result = + com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier.forNumber(networkTier_); + return result == null + ? com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. This signifies the networking tier used for configuring this
+     * access
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The networkTier to set. + * @return This builder for chaining. + */ + public Builder setNetworkTier(com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + networkTier_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This signifies the networking tier used for configuring this
+     * access
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNetworkTier() { + bitField0_ = (bitField0_ & ~0x00000080); + networkTier_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AccessConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AccessConfig) + private static final com.google.cloud.backupdr.v1beta.AccessConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AccessConfig(); + } + + public static com.google.cloud.backupdr.v1beta.AccessConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessConfig 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.backupdr.v1beta.AccessConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AccessConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AccessConfigOrBuilder.java new file mode 100644 index 000000000000..7ef88fc6a84e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AccessConfigOrBuilder.java @@ -0,0 +1,351 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AccessConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AccessConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. In accessConfigs (IPv4), the
+   * default and only option is ONE_TO_ONE_NAT. In
+   * ipv6AccessConfigs, the default and only option is
+   * DIRECT_IPV6.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
+   * Optional. In accessConfigs (IPv4), the
+   * default and only option is ONE_TO_ONE_NAT. In
+   * ipv6AccessConfigs, the default and only option is
+   * DIRECT_IPV6.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Optional. In accessConfigs (IPv4), the
+   * default and only option is ONE_TO_ONE_NAT. In
+   * ipv6AccessConfigs, the default and only option is
+   * DIRECT_IPV6.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.AccessType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + com.google.cloud.backupdr.v1beta.AccessConfig.AccessType getType(); + + /** + * + * + *
+   * Optional. The name of this access configuration.
+   * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the name field is set. + */ + boolean hasName(); + + /** + * + * + *
+   * Optional. The name of this access configuration.
+   * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Optional. The name of this access configuration.
+   * 
+ * + * optional string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The external IP address of this access configuration.
+   * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the externalIp field is set. + */ + boolean hasExternalIp(); + + /** + * + * + *
+   * Optional. The external IP address of this access configuration.
+   * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The externalIp. + */ + java.lang.String getExternalIp(); + + /** + * + * + *
+   * Optional. The external IP address of this access configuration.
+   * 
+ * + * + * optional string external_ip = 3 [json_name = "natIP", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for externalIp. + */ + com.google.protobuf.ByteString getExternalIpBytes(); + + /** + * + * + *
+   * Optional. The external IPv6 address of this access configuration.
+   * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the externalIpv6 field is set. + */ + boolean hasExternalIpv6(); + + /** + * + * + *
+   * Optional. The external IPv6 address of this access configuration.
+   * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalIpv6. + */ + java.lang.String getExternalIpv6(); + + /** + * + * + *
+   * Optional. The external IPv6 address of this access configuration.
+   * 
+ * + * optional string external_ipv6 = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalIpv6. + */ + com.google.protobuf.ByteString getExternalIpv6Bytes(); + + /** + * + * + *
+   * Optional. The prefix length of the external IPv6 range.
+   * 
+ * + * optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the externalIpv6PrefixLength field is set. + */ + boolean hasExternalIpv6PrefixLength(); + + /** + * + * + *
+   * Optional. The prefix length of the external IPv6 range.
+   * 
+ * + * optional int32 external_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The externalIpv6PrefixLength. + */ + int getExternalIpv6PrefixLength(); + + /** + * + * + *
+   * Optional. Specifies whether a public DNS 'PTR' record should be created to
+   * map the external IP address of the instance to a DNS domain name.
+   * 
+ * + * optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the setPublicPtr field is set. + */ + boolean hasSetPublicPtr(); + + /** + * + * + *
+   * Optional. Specifies whether a public DNS 'PTR' record should be created to
+   * map the external IP address of the instance to a DNS domain name.
+   * 
+ * + * optional bool set_public_ptr = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The setPublicPtr. + */ + boolean getSetPublicPtr(); + + /** + * + * + *
+   * Optional. The DNS domain name for the public PTR record.
+   * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the publicPtrDomainName field is set. + */ + boolean hasPublicPtrDomainName(); + + /** + * + * + *
+   * Optional. The DNS domain name for the public PTR record.
+   * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The publicPtrDomainName. + */ + java.lang.String getPublicPtrDomainName(); + + /** + * + * + *
+   * Optional. The DNS domain name for the public PTR record.
+   * 
+ * + * optional string public_ptr_domain_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for publicPtrDomainName. + */ + com.google.protobuf.ByteString getPublicPtrDomainNameBytes(); + + /** + * + * + *
+   * Optional. This signifies the networking tier used for configuring this
+   * access
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkTier field is set. + */ + boolean hasNetworkTier(); + + /** + * + * + *
+   * Optional. This signifies the networking tier used for configuring this
+   * access
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for networkTier. + */ + int getNetworkTierValue(); + + /** + * + * + *
+   * Optional. This signifies the networking tier used for configuring this
+   * access
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AccessConfig.NetworkTier network_tier = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkTier. + */ + com.google.cloud.backupdr.v1beta.AccessConfig.NetworkTier getNetworkTier(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AdvancedMachineFeatures.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AdvancedMachineFeatures.java new file mode 100644 index 000000000000..cd2a76fcdbd9 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AdvancedMachineFeatures.java @@ -0,0 +1,1015 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Specifies options for controlling advanced machine features.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AdvancedMachineFeatures} + */ +@com.google.protobuf.Generated +public final class AdvancedMachineFeatures extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AdvancedMachineFeatures) + AdvancedMachineFeaturesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AdvancedMachineFeatures"); + } + + // Use AdvancedMachineFeatures.newBuilder() to construct. + private AdvancedMachineFeatures(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AdvancedMachineFeatures() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AdvancedMachineFeatures_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AdvancedMachineFeatures_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.class, + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.Builder.class); + } + + private int bitField0_; + public static final int ENABLE_NESTED_VIRTUALIZATION_FIELD_NUMBER = 1; + private boolean enableNestedVirtualization_ = false; + + /** + * + * + *
+   * Optional. Whether to enable nested virtualization or not (default is
+   * false).
+   * 
+ * + * optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableNestedVirtualization field is set. + */ + @java.lang.Override + public boolean hasEnableNestedVirtualization() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Whether to enable nested virtualization or not (default is
+   * false).
+   * 
+ * + * optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableNestedVirtualization. + */ + @java.lang.Override + public boolean getEnableNestedVirtualization() { + return enableNestedVirtualization_; + } + + public static final int THREADS_PER_CORE_FIELD_NUMBER = 2; + private int threadsPerCore_ = 0; + + /** + * + * + *
+   * Optional. The number of threads per physical core. To disable simultaneous
+   * multithreading (SMT) set this to 1. If unset, the maximum number
+   * of threads supported per core by the underlying processor is
+   * assumed.
+   * 
+ * + * optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the threadsPerCore field is set. + */ + @java.lang.Override + public boolean hasThreadsPerCore() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The number of threads per physical core. To disable simultaneous
+   * multithreading (SMT) set this to 1. If unset, the maximum number
+   * of threads supported per core by the underlying processor is
+   * assumed.
+   * 
+ * + * optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The threadsPerCore. + */ + @java.lang.Override + public int getThreadsPerCore() { + return threadsPerCore_; + } + + public static final int VISIBLE_CORE_COUNT_FIELD_NUMBER = 3; + private int visibleCoreCount_ = 0; + + /** + * + * + *
+   * Optional. The number of physical cores to expose to an instance. Multiply
+   * by the number of threads per core to compute the total number of virtual
+   * CPUs to expose to the instance. If unset, the number of cores is
+   * inferred from the instance's nominal CPU count and the underlying
+   * platform's SMT width.
+   * 
+ * + * optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the visibleCoreCount field is set. + */ + @java.lang.Override + public boolean hasVisibleCoreCount() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The number of physical cores to expose to an instance. Multiply
+   * by the number of threads per core to compute the total number of virtual
+   * CPUs to expose to the instance. If unset, the number of cores is
+   * inferred from the instance's nominal CPU count and the underlying
+   * platform's SMT width.
+   * 
+ * + * optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The visibleCoreCount. + */ + @java.lang.Override + public int getVisibleCoreCount() { + return visibleCoreCount_; + } + + public static final int ENABLE_UEFI_NETWORKING_FIELD_NUMBER = 4; + private boolean enableUefiNetworking_ = false; + + /** + * + * + *
+   * Optional. Whether to enable UEFI networking for instance creation.
+   * 
+ * + * optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableUefiNetworking field is set. + */ + @java.lang.Override + public boolean hasEnableUefiNetworking() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Whether to enable UEFI networking for instance creation.
+   * 
+ * + * optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableUefiNetworking. + */ + @java.lang.Override + public boolean getEnableUefiNetworking() { + return enableUefiNetworking_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(1, enableNestedVirtualization_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(2, threadsPerCore_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(3, visibleCoreCount_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeBool(4, enableUefiNetworking_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableNestedVirtualization_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, threadsPerCore_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, visibleCoreCount_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableUefiNetworking_); + } + 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.backupdr.v1beta.AdvancedMachineFeatures)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures other = + (com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures) obj; + + if (hasEnableNestedVirtualization() != other.hasEnableNestedVirtualization()) return false; + if (hasEnableNestedVirtualization()) { + if (getEnableNestedVirtualization() != other.getEnableNestedVirtualization()) return false; + } + if (hasThreadsPerCore() != other.hasThreadsPerCore()) return false; + if (hasThreadsPerCore()) { + if (getThreadsPerCore() != other.getThreadsPerCore()) return false; + } + if (hasVisibleCoreCount() != other.hasVisibleCoreCount()) return false; + if (hasVisibleCoreCount()) { + if (getVisibleCoreCount() != other.getVisibleCoreCount()) return false; + } + if (hasEnableUefiNetworking() != other.hasEnableUefiNetworking()) return false; + if (hasEnableUefiNetworking()) { + if (getEnableUefiNetworking() != other.getEnableUefiNetworking()) 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 (hasEnableNestedVirtualization()) { + hash = (37 * hash) + ENABLE_NESTED_VIRTUALIZATION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableNestedVirtualization()); + } + if (hasThreadsPerCore()) { + hash = (37 * hash) + THREADS_PER_CORE_FIELD_NUMBER; + hash = (53 * hash) + getThreadsPerCore(); + } + if (hasVisibleCoreCount()) { + hash = (37 * hash) + VISIBLE_CORE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getVisibleCoreCount(); + } + if (hasEnableUefiNetworking()) { + hash = (37 * hash) + ENABLE_UEFI_NETWORKING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableUefiNetworking()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures 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.backupdr.v1beta.AdvancedMachineFeatures parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures 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.backupdr.v1beta.AdvancedMachineFeatures parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AdvancedMachineFeatures 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Specifies options for controlling advanced machine features.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AdvancedMachineFeatures} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AdvancedMachineFeatures) + com.google.cloud.backupdr.v1beta.AdvancedMachineFeaturesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AdvancedMachineFeatures_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AdvancedMachineFeatures_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.class, + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableNestedVirtualization_ = false; + threadsPerCore_ = 0; + visibleCoreCount_ = 0; + enableUefiNetworking_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AdvancedMachineFeatures_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures build() { + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures buildPartial() { + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures result = + new com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableNestedVirtualization_ = enableNestedVirtualization_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.threadsPerCore_ = threadsPerCore_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.visibleCoreCount_ = visibleCoreCount_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.enableUefiNetworking_ = enableUefiNetworking_; + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures other) { + if (other == com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.getDefaultInstance()) + return this; + if (other.hasEnableNestedVirtualization()) { + setEnableNestedVirtualization(other.getEnableNestedVirtualization()); + } + if (other.hasThreadsPerCore()) { + setThreadsPerCore(other.getThreadsPerCore()); + } + if (other.hasVisibleCoreCount()) { + setVisibleCoreCount(other.getVisibleCoreCount()); + } + if (other.hasEnableUefiNetworking()) { + setEnableUefiNetworking(other.getEnableUefiNetworking()); + } + 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 8: + { + enableNestedVirtualization_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + threadsPerCore_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + visibleCoreCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + enableUefiNetworking_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 boolean enableNestedVirtualization_; + + /** + * + * + *
+     * Optional. Whether to enable nested virtualization or not (default is
+     * false).
+     * 
+ * + * + * optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableNestedVirtualization field is set. + */ + @java.lang.Override + public boolean hasEnableNestedVirtualization() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Whether to enable nested virtualization or not (default is
+     * false).
+     * 
+ * + * + * optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableNestedVirtualization. + */ + @java.lang.Override + public boolean getEnableNestedVirtualization() { + return enableNestedVirtualization_; + } + + /** + * + * + *
+     * Optional. Whether to enable nested virtualization or not (default is
+     * false).
+     * 
+ * + * + * optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableNestedVirtualization to set. + * @return This builder for chaining. + */ + public Builder setEnableNestedVirtualization(boolean value) { + + enableNestedVirtualization_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to enable nested virtualization or not (default is
+     * false).
+     * 
+ * + * + * optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableNestedVirtualization() { + bitField0_ = (bitField0_ & ~0x00000001); + enableNestedVirtualization_ = false; + onChanged(); + return this; + } + + private int threadsPerCore_; + + /** + * + * + *
+     * Optional. The number of threads per physical core. To disable simultaneous
+     * multithreading (SMT) set this to 1. If unset, the maximum number
+     * of threads supported per core by the underlying processor is
+     * assumed.
+     * 
+ * + * optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the threadsPerCore field is set. + */ + @java.lang.Override + public boolean hasThreadsPerCore() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The number of threads per physical core. To disable simultaneous
+     * multithreading (SMT) set this to 1. If unset, the maximum number
+     * of threads supported per core by the underlying processor is
+     * assumed.
+     * 
+ * + * optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The threadsPerCore. + */ + @java.lang.Override + public int getThreadsPerCore() { + return threadsPerCore_; + } + + /** + * + * + *
+     * Optional. The number of threads per physical core. To disable simultaneous
+     * multithreading (SMT) set this to 1. If unset, the maximum number
+     * of threads supported per core by the underlying processor is
+     * assumed.
+     * 
+ * + * optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The threadsPerCore to set. + * @return This builder for chaining. + */ + public Builder setThreadsPerCore(int value) { + + threadsPerCore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The number of threads per physical core. To disable simultaneous
+     * multithreading (SMT) set this to 1. If unset, the maximum number
+     * of threads supported per core by the underlying processor is
+     * assumed.
+     * 
+ * + * optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearThreadsPerCore() { + bitField0_ = (bitField0_ & ~0x00000002); + threadsPerCore_ = 0; + onChanged(); + return this; + } + + private int visibleCoreCount_; + + /** + * + * + *
+     * Optional. The number of physical cores to expose to an instance. Multiply
+     * by the number of threads per core to compute the total number of virtual
+     * CPUs to expose to the instance. If unset, the number of cores is
+     * inferred from the instance's nominal CPU count and the underlying
+     * platform's SMT width.
+     * 
+ * + * optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the visibleCoreCount field is set. + */ + @java.lang.Override + public boolean hasVisibleCoreCount() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The number of physical cores to expose to an instance. Multiply
+     * by the number of threads per core to compute the total number of virtual
+     * CPUs to expose to the instance. If unset, the number of cores is
+     * inferred from the instance's nominal CPU count and the underlying
+     * platform's SMT width.
+     * 
+ * + * optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The visibleCoreCount. + */ + @java.lang.Override + public int getVisibleCoreCount() { + return visibleCoreCount_; + } + + /** + * + * + *
+     * Optional. The number of physical cores to expose to an instance. Multiply
+     * by the number of threads per core to compute the total number of virtual
+     * CPUs to expose to the instance. If unset, the number of cores is
+     * inferred from the instance's nominal CPU count and the underlying
+     * platform's SMT width.
+     * 
+ * + * optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The visibleCoreCount to set. + * @return This builder for chaining. + */ + public Builder setVisibleCoreCount(int value) { + + visibleCoreCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The number of physical cores to expose to an instance. Multiply
+     * by the number of threads per core to compute the total number of virtual
+     * CPUs to expose to the instance. If unset, the number of cores is
+     * inferred from the instance's nominal CPU count and the underlying
+     * platform's SMT width.
+     * 
+ * + * optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearVisibleCoreCount() { + bitField0_ = (bitField0_ & ~0x00000004); + visibleCoreCount_ = 0; + onChanged(); + return this; + } + + private boolean enableUefiNetworking_; + + /** + * + * + *
+     * Optional. Whether to enable UEFI networking for instance creation.
+     * 
+ * + * optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableUefiNetworking field is set. + */ + @java.lang.Override + public boolean hasEnableUefiNetworking() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Whether to enable UEFI networking for instance creation.
+     * 
+ * + * optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableUefiNetworking. + */ + @java.lang.Override + public boolean getEnableUefiNetworking() { + return enableUefiNetworking_; + } + + /** + * + * + *
+     * Optional. Whether to enable UEFI networking for instance creation.
+     * 
+ * + * optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableUefiNetworking to set. + * @return This builder for chaining. + */ + public Builder setEnableUefiNetworking(boolean value) { + + enableUefiNetworking_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to enable UEFI networking for instance creation.
+     * 
+ * + * optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableUefiNetworking() { + bitField0_ = (bitField0_ & ~0x00000008); + enableUefiNetworking_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AdvancedMachineFeatures) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AdvancedMachineFeatures) + private static final com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures(); + } + + public static com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdvancedMachineFeatures 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.backupdr.v1beta.AdvancedMachineFeatures getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AdvancedMachineFeaturesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AdvancedMachineFeaturesOrBuilder.java new file mode 100644 index 000000000000..f7b9df09117b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AdvancedMachineFeaturesOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AdvancedMachineFeaturesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AdvancedMachineFeatures) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Whether to enable nested virtualization or not (default is
+   * false).
+   * 
+ * + * optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableNestedVirtualization field is set. + */ + boolean hasEnableNestedVirtualization(); + + /** + * + * + *
+   * Optional. Whether to enable nested virtualization or not (default is
+   * false).
+   * 
+ * + * optional bool enable_nested_virtualization = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableNestedVirtualization. + */ + boolean getEnableNestedVirtualization(); + + /** + * + * + *
+   * Optional. The number of threads per physical core. To disable simultaneous
+   * multithreading (SMT) set this to 1. If unset, the maximum number
+   * of threads supported per core by the underlying processor is
+   * assumed.
+   * 
+ * + * optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the threadsPerCore field is set. + */ + boolean hasThreadsPerCore(); + + /** + * + * + *
+   * Optional. The number of threads per physical core. To disable simultaneous
+   * multithreading (SMT) set this to 1. If unset, the maximum number
+   * of threads supported per core by the underlying processor is
+   * assumed.
+   * 
+ * + * optional int32 threads_per_core = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The threadsPerCore. + */ + int getThreadsPerCore(); + + /** + * + * + *
+   * Optional. The number of physical cores to expose to an instance. Multiply
+   * by the number of threads per core to compute the total number of virtual
+   * CPUs to expose to the instance. If unset, the number of cores is
+   * inferred from the instance's nominal CPU count and the underlying
+   * platform's SMT width.
+   * 
+ * + * optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the visibleCoreCount field is set. + */ + boolean hasVisibleCoreCount(); + + /** + * + * + *
+   * Optional. The number of physical cores to expose to an instance. Multiply
+   * by the number of threads per core to compute the total number of virtual
+   * CPUs to expose to the instance. If unset, the number of cores is
+   * inferred from the instance's nominal CPU count and the underlying
+   * platform's SMT width.
+   * 
+ * + * optional int32 visible_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The visibleCoreCount. + */ + int getVisibleCoreCount(); + + /** + * + * + *
+   * Optional. Whether to enable UEFI networking for instance creation.
+   * 
+ * + * optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableUefiNetworking field is set. + */ + boolean hasEnableUefiNetworking(); + + /** + * + * + *
+   * Optional. Whether to enable UEFI networking for instance creation.
+   * 
+ * + * optional bool enable_uefi_networking = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableUefiNetworking. + */ + boolean getEnableUefiNetworking(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AliasIpRange.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AliasIpRange.java new file mode 100644 index 000000000000..671e1865f6b8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AliasIpRange.java @@ -0,0 +1,888 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * An alias IP range attached to an instance's network interface.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AliasIpRange} + */ +@com.google.protobuf.Generated +public final class AliasIpRange extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AliasIpRange) + AliasIpRangeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AliasIpRange"); + } + + // Use AliasIpRange.newBuilder() to construct. + private AliasIpRange(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AliasIpRange() { + ipCidrRange_ = ""; + subnetworkRangeName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AliasIpRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AliasIpRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AliasIpRange.class, + com.google.cloud.backupdr.v1beta.AliasIpRange.Builder.class); + } + + private int bitField0_; + public static final int IP_CIDR_RANGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipCidrRange_ = ""; + + /** + * + * + *
+   * Optional. The IP alias ranges to allocate for this interface.
+   * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipCidrRange field is set. + */ + @java.lang.Override + public boolean hasIpCidrRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The IP alias ranges to allocate for this interface.
+   * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipCidrRange. + */ + @java.lang.Override + public java.lang.String getIpCidrRange() { + java.lang.Object ref = ipCidrRange_; + 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(); + ipCidrRange_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The IP alias ranges to allocate for this interface.
+   * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipCidrRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpCidrRangeBytes() { + java.lang.Object ref = ipCidrRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipCidrRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNETWORK_RANGE_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnetworkRangeName_ = ""; + + /** + * + * + *
+   * Optional. The name of a subnetwork secondary IP range from which to
+   * allocate an IP alias range. If not specified, the primary range of the
+   * subnetwork is used.
+   * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subnetworkRangeName field is set. + */ + @java.lang.Override + public boolean hasSubnetworkRangeName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The name of a subnetwork secondary IP range from which to
+   * allocate an IP alias range. If not specified, the primary range of the
+   * subnetwork is used.
+   * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subnetworkRangeName. + */ + @java.lang.Override + public java.lang.String getSubnetworkRangeName() { + java.lang.Object ref = subnetworkRangeName_; + 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(); + subnetworkRangeName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The name of a subnetwork secondary IP range from which to
+   * allocate an IP alias range. If not specified, the primary range of the
+   * subnetwork is used.
+   * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for subnetworkRangeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetworkRangeNameBytes() { + java.lang.Object ref = subnetworkRangeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetworkRangeName_ = 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ipCidrRange_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, subnetworkRangeName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ipCidrRange_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, subnetworkRangeName_); + } + 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.backupdr.v1beta.AliasIpRange)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AliasIpRange other = + (com.google.cloud.backupdr.v1beta.AliasIpRange) obj; + + if (hasIpCidrRange() != other.hasIpCidrRange()) return false; + if (hasIpCidrRange()) { + if (!getIpCidrRange().equals(other.getIpCidrRange())) return false; + } + if (hasSubnetworkRangeName() != other.hasSubnetworkRangeName()) return false; + if (hasSubnetworkRangeName()) { + if (!getSubnetworkRangeName().equals(other.getSubnetworkRangeName())) 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 (hasIpCidrRange()) { + hash = (37 * hash) + IP_CIDR_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpCidrRange().hashCode(); + } + if (hasSubnetworkRangeName()) { + hash = (37 * hash) + SUBNETWORK_RANGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSubnetworkRangeName().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange 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.backupdr.v1beta.AliasIpRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange 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.backupdr.v1beta.AliasIpRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AliasIpRange 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An alias IP range attached to an instance's network interface.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AliasIpRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AliasIpRange) + com.google.cloud.backupdr.v1beta.AliasIpRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AliasIpRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AliasIpRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AliasIpRange.class, + com.google.cloud.backupdr.v1beta.AliasIpRange.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AliasIpRange.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ipCidrRange_ = ""; + subnetworkRangeName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AliasIpRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AliasIpRange getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AliasIpRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AliasIpRange build() { + com.google.cloud.backupdr.v1beta.AliasIpRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AliasIpRange buildPartial() { + com.google.cloud.backupdr.v1beta.AliasIpRange result = + new com.google.cloud.backupdr.v1beta.AliasIpRange(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AliasIpRange result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ipCidrRange_ = ipCidrRange_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subnetworkRangeName_ = subnetworkRangeName_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AliasIpRange) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AliasIpRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AliasIpRange other) { + if (other == com.google.cloud.backupdr.v1beta.AliasIpRange.getDefaultInstance()) return this; + if (other.hasIpCidrRange()) { + ipCidrRange_ = other.ipCidrRange_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSubnetworkRangeName()) { + subnetworkRangeName_ = other.subnetworkRangeName_; + bitField0_ |= 0x00000002; + 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: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + subnetworkRangeName_ = input.readStringRequireUtf8(); + 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 java.lang.Object ipCidrRange_ = ""; + + /** + * + * + *
+     * Optional. The IP alias ranges to allocate for this interface.
+     * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipCidrRange field is set. + */ + public boolean hasIpCidrRange() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The IP alias ranges to allocate for this interface.
+     * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipCidrRange. + */ + public java.lang.String getIpCidrRange() { + java.lang.Object ref = ipCidrRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipCidrRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The IP alias ranges to allocate for this interface.
+     * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipCidrRange. + */ + public com.google.protobuf.ByteString getIpCidrRangeBytes() { + java.lang.Object ref = ipCidrRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipCidrRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The IP alias ranges to allocate for this interface.
+     * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ipCidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpCidrRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipCidrRange_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IP alias ranges to allocate for this interface.
+     * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIpCidrRange() { + ipCidrRange_ = getDefaultInstance().getIpCidrRange(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IP alias ranges to allocate for this interface.
+     * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ipCidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpCidrRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipCidrRange_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object subnetworkRangeName_ = ""; + + /** + * + * + *
+     * Optional. The name of a subnetwork secondary IP range from which to
+     * allocate an IP alias range. If not specified, the primary range of the
+     * subnetwork is used.
+     * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subnetworkRangeName field is set. + */ + public boolean hasSubnetworkRangeName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The name of a subnetwork secondary IP range from which to
+     * allocate an IP alias range. If not specified, the primary range of the
+     * subnetwork is used.
+     * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subnetworkRangeName. + */ + public java.lang.String getSubnetworkRangeName() { + java.lang.Object ref = subnetworkRangeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetworkRangeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of a subnetwork secondary IP range from which to
+     * allocate an IP alias range. If not specified, the primary range of the
+     * subnetwork is used.
+     * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for subnetworkRangeName. + */ + public com.google.protobuf.ByteString getSubnetworkRangeNameBytes() { + java.lang.Object ref = subnetworkRangeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetworkRangeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of a subnetwork secondary IP range from which to
+     * allocate an IP alias range. If not specified, the primary range of the
+     * subnetwork is used.
+     * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The subnetworkRangeName to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkRangeName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnetworkRangeName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of a subnetwork secondary IP range from which to
+     * allocate an IP alias range. If not specified, the primary range of the
+     * subnetwork is used.
+     * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSubnetworkRangeName() { + subnetworkRangeName_ = getDefaultInstance().getSubnetworkRangeName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of a subnetwork secondary IP range from which to
+     * allocate an IP alias range. If not specified, the primary range of the
+     * subnetwork is used.
+     * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for subnetworkRangeName to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkRangeNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnetworkRangeName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AliasIpRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AliasIpRange) + private static final com.google.cloud.backupdr.v1beta.AliasIpRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AliasIpRange(); + } + + public static com.google.cloud.backupdr.v1beta.AliasIpRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AliasIpRange 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.backupdr.v1beta.AliasIpRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AliasIpRangeOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AliasIpRangeOrBuilder.java new file mode 100644 index 000000000000..59667724aca4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AliasIpRangeOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AliasIpRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AliasIpRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The IP alias ranges to allocate for this interface.
+   * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the ipCidrRange field is set. + */ + boolean hasIpCidrRange(); + + /** + * + * + *
+   * Optional. The IP alias ranges to allocate for this interface.
+   * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipCidrRange. + */ + java.lang.String getIpCidrRange(); + + /** + * + * + *
+   * Optional. The IP alias ranges to allocate for this interface.
+   * 
+ * + * optional string ip_cidr_range = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipCidrRange. + */ + com.google.protobuf.ByteString getIpCidrRangeBytes(); + + /** + * + * + *
+   * Optional. The name of a subnetwork secondary IP range from which to
+   * allocate an IP alias range. If not specified, the primary range of the
+   * subnetwork is used.
+   * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the subnetworkRangeName field is set. + */ + boolean hasSubnetworkRangeName(); + + /** + * + * + *
+   * Optional. The name of a subnetwork secondary IP range from which to
+   * allocate an IP alias range. If not specified, the primary range of the
+   * subnetwork is used.
+   * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The subnetworkRangeName. + */ + java.lang.String getSubnetworkRangeName(); + + /** + * + * + *
+   * Optional. The name of a subnetwork secondary IP range from which to
+   * allocate an IP alias range. If not specified, the primary range of the
+   * subnetwork is used.
+   * 
+ * + * optional string subnetwork_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for subnetworkRangeName. + */ + com.google.protobuf.ByteString getSubnetworkRangeNameBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AllocationAffinity.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AllocationAffinity.java new file mode 100644 index 000000000000..e29ce70debbb --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AllocationAffinity.java @@ -0,0 +1,1348 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Specifies the reservations that this instance can consume from.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AllocationAffinity} + */ +@com.google.protobuf.Generated +public final class AllocationAffinity extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AllocationAffinity) + AllocationAffinityOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AllocationAffinity"); + } + + // Use AllocationAffinity.newBuilder() to construct. + private AllocationAffinity(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AllocationAffinity() { + consumeAllocationType_ = 0; + key_ = ""; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AllocationAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AllocationAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AllocationAffinity.class, + com.google.cloud.backupdr.v1beta.AllocationAffinity.Builder.class); + } + + /** + * + * + *
+   * Indicates whether to consume from a reservation or not.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AllocationAffinity.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Do not consume from any allocated capacity.
+     * 
+ * + * NO_RESERVATION = 1; + */ + NO_RESERVATION(1), + /** + * + * + *
+     * Consume any allocation available.
+     * 
+ * + * ANY_RESERVATION = 2; + */ + ANY_RESERVATION(2), + /** + * + * + *
+     * Must consume from a specific reservation. Must specify key value fields
+     * for specifying the reservations.
+     * 
+ * + * SPECIFIC_RESERVATION = 3; + */ + SPECIFIC_RESERVATION(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Do not consume from any allocated capacity.
+     * 
+ * + * NO_RESERVATION = 1; + */ + public static final int NO_RESERVATION_VALUE = 1; + + /** + * + * + *
+     * Consume any allocation available.
+     * 
+ * + * ANY_RESERVATION = 2; + */ + public static final int ANY_RESERVATION_VALUE = 2; + + /** + * + * + *
+     * Must consume from a specific reservation. Must specify key value fields
+     * for specifying the reservations.
+     * 
+ * + * SPECIFIC_RESERVATION = 3; + */ + public static final int SPECIFIC_RESERVATION_VALUE = 3; + + 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 NO_RESERVATION; + case 2: + return ANY_RESERVATION; + case 3: + return SPECIFIC_RESERVATION; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AllocationAffinity.getDescriptor() + .getEnumTypes() + .get(0); + } + + 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.backupdr.v1beta.AllocationAffinity.Type) + } + + private int bitField0_; + public static final int CONSUME_ALLOCATION_TYPE_FIELD_NUMBER = 1; + private int consumeAllocationType_ = 0; + + /** + * + * + *
+   * Optional. Specifies the type of reservation from which this instance can
+   * consume
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the consumeAllocationType field is set. + */ + @java.lang.Override + public boolean hasConsumeAllocationType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the type of reservation from which this instance can
+   * consume
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for consumeAllocationType. + */ + @java.lang.Override + public int getConsumeAllocationTypeValue() { + return consumeAllocationType_; + } + + /** + * + * + *
+   * Optional. Specifies the type of reservation from which this instance can
+   * consume
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The consumeAllocationType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AllocationAffinity.Type getConsumeAllocationType() { + com.google.cloud.backupdr.v1beta.AllocationAffinity.Type result = + com.google.cloud.backupdr.v1beta.AllocationAffinity.Type.forNumber(consumeAllocationType_); + return result == null + ? com.google.cloud.backupdr.v1beta.AllocationAffinity.Type.UNRECOGNIZED + : result; + } + + public static final int KEY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
+   * Optional. Corresponds to the label key of a reservation resource.
+   * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Corresponds to the label key of a reservation resource.
+   * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Corresponds to the label key of a reservation resource.
+   * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Corresponds to the label values of a reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + + /** + * + * + *
+   * Optional. Corresponds to the label values of a reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
+   * Optional. Corresponds to the label values of a reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
+   * Optional. Corresponds to the label values of a reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.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 { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, consumeAllocationType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, key_); + } + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, values_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, consumeAllocationType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, key_); + } + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().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.backupdr.v1beta.AllocationAffinity)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AllocationAffinity other = + (com.google.cloud.backupdr.v1beta.AllocationAffinity) obj; + + if (hasConsumeAllocationType() != other.hasConsumeAllocationType()) return false; + if (hasConsumeAllocationType()) { + if (consumeAllocationType_ != other.consumeAllocationType_) return false; + } + if (hasKey() != other.hasKey()) return false; + if (hasKey()) { + if (!getKey().equals(other.getKey())) return false; + } + if (!getValuesList().equals(other.getValuesList())) 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 (hasConsumeAllocationType()) { + hash = (37 * hash) + CONSUME_ALLOCATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + consumeAllocationType_; + } + if (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity 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.backupdr.v1beta.AllocationAffinity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity 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.backupdr.v1beta.AllocationAffinity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AllocationAffinity 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Specifies the reservations that this instance can consume from.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AllocationAffinity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AllocationAffinity) + com.google.cloud.backupdr.v1beta.AllocationAffinityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AllocationAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AllocationAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AllocationAffinity.class, + com.google.cloud.backupdr.v1beta.AllocationAffinity.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AllocationAffinity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + consumeAllocationType_ = 0; + key_ = ""; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AllocationAffinity_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AllocationAffinity getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AllocationAffinity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AllocationAffinity build() { + com.google.cloud.backupdr.v1beta.AllocationAffinity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AllocationAffinity buildPartial() { + com.google.cloud.backupdr.v1beta.AllocationAffinity result = + new com.google.cloud.backupdr.v1beta.AllocationAffinity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AllocationAffinity result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.consumeAllocationType_ = consumeAllocationType_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AllocationAffinity) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AllocationAffinity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AllocationAffinity other) { + if (other == com.google.cloud.backupdr.v1beta.AllocationAffinity.getDefaultInstance()) + return this; + if (other.hasConsumeAllocationType()) { + setConsumeAllocationTypeValue(other.getConsumeAllocationTypeValue()); + } + if (other.hasKey()) { + key_ = other.key_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000004; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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 8: + { + consumeAllocationType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.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 int consumeAllocationType_ = 0; + + /** + * + * + *
+     * Optional. Specifies the type of reservation from which this instance can
+     * consume
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the consumeAllocationType field is set. + */ + @java.lang.Override + public boolean hasConsumeAllocationType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the type of reservation from which this instance can
+     * consume
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for consumeAllocationType. + */ + @java.lang.Override + public int getConsumeAllocationTypeValue() { + return consumeAllocationType_; + } + + /** + * + * + *
+     * Optional. Specifies the type of reservation from which this instance can
+     * consume
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for consumeAllocationType to set. + * @return This builder for chaining. + */ + public Builder setConsumeAllocationTypeValue(int value) { + consumeAllocationType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the type of reservation from which this instance can
+     * consume
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The consumeAllocationType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AllocationAffinity.Type getConsumeAllocationType() { + com.google.cloud.backupdr.v1beta.AllocationAffinity.Type result = + com.google.cloud.backupdr.v1beta.AllocationAffinity.Type.forNumber( + consumeAllocationType_); + return result == null + ? com.google.cloud.backupdr.v1beta.AllocationAffinity.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies the type of reservation from which this instance can
+     * consume
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The consumeAllocationType to set. + * @return This builder for chaining. + */ + public Builder setConsumeAllocationType( + com.google.cloud.backupdr.v1beta.AllocationAffinity.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + consumeAllocationType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the type of reservation from which this instance can
+     * consume
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearConsumeAllocationType() { + bitField0_ = (bitField0_ & ~0x00000001); + consumeAllocationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + + /** + * + * + *
+     * Optional. Corresponds to the label key of a reservation resource.
+     * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Corresponds to the label key of a reservation resource.
+     * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Corresponds to the label key of a reservation resource.
+     * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Corresponds to the label key of a reservation resource.
+     * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Corresponds to the label key of a reservation resource.
+     * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Corresponds to the label key of a reservation resource.
+     * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of a reservation resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AllocationAffinity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AllocationAffinity) + private static final com.google.cloud.backupdr.v1beta.AllocationAffinity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AllocationAffinity(); + } + + public static com.google.cloud.backupdr.v1beta.AllocationAffinity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllocationAffinity 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.backupdr.v1beta.AllocationAffinity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AllocationAffinityOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AllocationAffinityOrBuilder.java new file mode 100644 index 000000000000..e3c62f608023 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AllocationAffinityOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AllocationAffinityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AllocationAffinity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Specifies the type of reservation from which this instance can
+   * consume
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the consumeAllocationType field is set. + */ + boolean hasConsumeAllocationType(); + + /** + * + * + *
+   * Optional. Specifies the type of reservation from which this instance can
+   * consume
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for consumeAllocationType. + */ + int getConsumeAllocationTypeValue(); + + /** + * + * + *
+   * Optional. Specifies the type of reservation from which this instance can
+   * consume
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity.Type consume_allocation_type = 1 [json_name = "consumeReservationType", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The consumeAllocationType. + */ + com.google.cloud.backupdr.v1beta.AllocationAffinity.Type getConsumeAllocationType(); + + /** + * + * + *
+   * Optional. Corresponds to the label key of a reservation resource.
+   * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + boolean hasKey(); + + /** + * + * + *
+   * Optional. Corresponds to the label key of a reservation resource.
+   * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
+   * Optional. Corresponds to the label key of a reservation resource.
+   * 
+ * + * optional string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * Optional. Corresponds to the label values of a reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + + /** + * + * + *
+   * Optional. Corresponds to the label values of a reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + int getValuesCount(); + + /** + * + * + *
+   * Optional. Corresponds to the label values of a reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + + /** + * + * + *
+   * Optional. Corresponds to the label values of a reservation resource.
+   * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterBackupPlanAssociationProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterBackupPlanAssociationProperties.java new file mode 100644 index 000000000000..aa247cf1f0c3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterBackupPlanAssociationProperties.java @@ -0,0 +1,643 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Properties for an AlloyDB cluster backup plan association.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties} + */ +@com.google.protobuf.Generated +public final class AlloyDBClusterBackupPlanAssociationProperties + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AlloyDBClusterBackupPlanAssociationProperties"); + } + + // Use AlloyDBClusterBackupPlanAssociationProperties.newBuilder() to construct. + private AlloyDBClusterBackupPlanAssociationProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AlloyDBClusterBackupPlanAssociationProperties() { + clusterUid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterBackupPlanAssociationProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterBackupPlanAssociationProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.class, + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.Builder + .class); + } + + public static final int CLUSTER_UID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterUid_ = ""; + + /** + * + * + *
+   * Output only. The cluster UID of the AlloyDB cluster.
+   * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The clusterUid. + */ + @java.lang.Override + public java.lang.String getClusterUid() { + java.lang.Object ref = clusterUid_; + 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(); + clusterUid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The cluster UID of the AlloyDB cluster.
+   * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for clusterUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterUidBytes() { + java.lang.Object ref = clusterUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUid_ = 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.GeneratedMessage.isStringEmpty(clusterUid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, clusterUid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterUid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, clusterUid_); + } + 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.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties other = + (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) obj; + + if (!getClusterUid().equals(other.getClusterUid())) 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) + CLUSTER_UID_FIELD_NUMBER; + hash = (53 * hash) + getClusterUid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + 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.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + 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.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Properties for an AlloyDB cluster backup plan association.
+   * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterBackupPlanAssociationProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterBackupPlanAssociationProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.class, + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.Builder + .class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clusterUid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterBackupPlanAssociationProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties build() { + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + buildPartial() { + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties result = + new com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clusterUid_ = clusterUid_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance()) return this; + if (!other.getClusterUid().isEmpty()) { + clusterUid_ = other.clusterUid_; + 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: + { + clusterUid_ = 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 clusterUid_ = ""; + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster.
+     * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The clusterUid. + */ + public java.lang.String getClusterUid() { + java.lang.Object ref = clusterUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster.
+     * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for clusterUid. + */ + public com.google.protobuf.ByteString getClusterUidBytes() { + java.lang.Object ref = clusterUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster.
+     * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The clusterUid to set. + * @return This builder for chaining. + */ + public Builder setClusterUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterUid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster.
+     * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearClusterUid() { + clusterUid_ = getDefaultInstance().getClusterUid(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster.
+     * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for clusterUid to set. + * @return This builder for chaining. + */ + public Builder setClusterUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterUid_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + private static final com.google.cloud.backupdr.v1beta + .AlloyDBClusterBackupPlanAssociationProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties(); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlloyDBClusterBackupPlanAssociationProperties 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.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder.java new file mode 100644 index 000000000000..6b2ab3dcee08 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The cluster UID of the AlloyDB cluster.
+   * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The clusterUid. + */ + java.lang.String getClusterUid(); + + /** + * + * + *
+   * Output only. The cluster UID of the AlloyDB cluster.
+   * 
+ * + * + * string cluster_uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for clusterUid. + */ + com.google.protobuf.ByteString getClusterUidBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceProperties.java new file mode 100644 index 000000000000..bbaf7da89332 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceProperties.java @@ -0,0 +1,1418 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * AlloyDBClusterDataSourceProperties represents the properties of a
+ * AlloyDB cluster resource that are stored in the DataSource.
+ * .
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties} + */ +@com.google.protobuf.Generated +public final class AlloyDBClusterDataSourceProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + AlloyDBClusterDataSourcePropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AlloyDBClusterDataSourceProperties"); + } + + // Use AlloyDBClusterDataSourceProperties.newBuilder() to construct. + private AlloyDBClusterDataSourceProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AlloyDBClusterDataSourceProperties() { + name_ = ""; + pitrWindows_ = java.util.Collections.emptyList(); + clusterUid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.class, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Name of the AlloyDB cluster backed up by the datasource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Name of the AlloyDB cluster backed up by the datasource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + public static final int PITR_WINDOWS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List pitrWindows_; + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPitrWindowsList() { + return pitrWindows_; + } + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPitrWindowsOrBuilderList() { + return pitrWindows_; + } + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPitrWindowsCount() { + return pitrWindows_.size(); + } + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow getPitrWindows(int index) { + return pitrWindows_.get(index); + } + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindowOrBuilder getPitrWindowsOrBuilder( + int index) { + return pitrWindows_.get(index); + } + + public static final int CLUSTER_UID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object clusterUid_ = ""; + + /** + * + * + *
+   * Output only. The cluster UID of the AlloyDB cluster backed up by the
+   * datasource.
+   * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterUid. + */ + @java.lang.Override + public java.lang.String getClusterUid() { + java.lang.Object ref = clusterUid_; + 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(); + clusterUid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The cluster UID of the AlloyDB cluster backed up by the
+   * datasource.
+   * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterUidBytes() { + java.lang.Object ref = clusterUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUid_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < pitrWindows_.size(); i++) { + output.writeMessage(2, pitrWindows_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterUid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, clusterUid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (int i = 0; i < pitrWindows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, pitrWindows_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clusterUid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, clusterUid_); + } + 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.backupdr.v1beta.AlloyDBClusterDataSourceProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties other = + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPitrWindowsList().equals(other.getPitrWindowsList())) return false; + if (!getClusterUid().equals(other.getClusterUid())) 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 (getPitrWindowsCount() > 0) { + hash = (37 * hash) + PITR_WINDOWS_FIELD_NUMBER; + hash = (53 * hash) + getPitrWindowsList().hashCode(); + } + hash = (37 * hash) + CLUSTER_UID_FIELD_NUMBER; + hash = (53 * hash) + getClusterUid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties 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.backupdr.v1beta.AlloyDBClusterDataSourceProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties 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.backupdr.v1beta.AlloyDBClusterDataSourceProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AlloyDBClusterDataSourceProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * AlloyDBClusterDataSourceProperties represents the properties of a
+   * AlloyDB cluster resource that are stored in the DataSource.
+   * .
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourcePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.class, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (pitrWindowsBuilder_ == null) { + pitrWindows_ = java.util.Collections.emptyList(); + } else { + pitrWindows_ = null; + pitrWindowsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + clusterUid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties build() { + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties buildPartial() { + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties result = + new com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties result) { + if (pitrWindowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + pitrWindows_ = java.util.Collections.unmodifiableList(pitrWindows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.pitrWindows_ = pitrWindows_; + } else { + result.pitrWindows_ = pitrWindowsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.clusterUid_ = clusterUid_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (pitrWindowsBuilder_ == null) { + if (!other.pitrWindows_.isEmpty()) { + if (pitrWindows_.isEmpty()) { + pitrWindows_ = other.pitrWindows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePitrWindowsIsMutable(); + pitrWindows_.addAll(other.pitrWindows_); + } + onChanged(); + } + } else { + if (!other.pitrWindows_.isEmpty()) { + if (pitrWindowsBuilder_.isEmpty()) { + pitrWindowsBuilder_.dispose(); + pitrWindowsBuilder_ = null; + pitrWindows_ = other.pitrWindows_; + bitField0_ = (bitField0_ & ~0x00000002); + pitrWindowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPitrWindowsFieldBuilder() + : null; + } else { + pitrWindowsBuilder_.addAllMessages(other.pitrWindows_); + } + } + } + if (!other.getClusterUid().isEmpty()) { + clusterUid_ = other.clusterUid_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.parser(), + extensionRegistry); + if (pitrWindowsBuilder_ == null) { + ensurePitrWindowsIsMutable(); + pitrWindows_.add(m); + } else { + pitrWindowsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + clusterUid_ = 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 name_ = ""; + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + private java.util.List pitrWindows_ = + java.util.Collections.emptyList(); + + private void ensurePitrWindowsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + pitrWindows_ = + new java.util.ArrayList( + pitrWindows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow, + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder, + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindowOrBuilder> + pitrWindowsBuilder_; + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPitrWindowsList() { + if (pitrWindowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pitrWindows_); + } else { + return pitrWindowsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPitrWindowsCount() { + if (pitrWindowsBuilder_ == null) { + return pitrWindows_.size(); + } else { + return pitrWindowsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow getPitrWindows(int index) { + if (pitrWindowsBuilder_ == null) { + return pitrWindows_.get(index); + } else { + return pitrWindowsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPitrWindows( + int index, com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow value) { + if (pitrWindowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePitrWindowsIsMutable(); + pitrWindows_.set(index, value); + onChanged(); + } else { + pitrWindowsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPitrWindows( + int index, com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder builderForValue) { + if (pitrWindowsBuilder_ == null) { + ensurePitrWindowsIsMutable(); + pitrWindows_.set(index, builderForValue.build()); + onChanged(); + } else { + pitrWindowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPitrWindows(com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow value) { + if (pitrWindowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePitrWindowsIsMutable(); + pitrWindows_.add(value); + onChanged(); + } else { + pitrWindowsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPitrWindows( + int index, com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow value) { + if (pitrWindowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePitrWindowsIsMutable(); + pitrWindows_.add(index, value); + onChanged(); + } else { + pitrWindowsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPitrWindows( + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder builderForValue) { + if (pitrWindowsBuilder_ == null) { + ensurePitrWindowsIsMutable(); + pitrWindows_.add(builderForValue.build()); + onChanged(); + } else { + pitrWindowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPitrWindows( + int index, com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder builderForValue) { + if (pitrWindowsBuilder_ == null) { + ensurePitrWindowsIsMutable(); + pitrWindows_.add(index, builderForValue.build()); + onChanged(); + } else { + pitrWindowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPitrWindows( + java.lang.Iterable values) { + if (pitrWindowsBuilder_ == null) { + ensurePitrWindowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pitrWindows_); + onChanged(); + } else { + pitrWindowsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPitrWindows() { + if (pitrWindowsBuilder_ == null) { + pitrWindows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + pitrWindowsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePitrWindows(int index) { + if (pitrWindowsBuilder_ == null) { + ensurePitrWindowsIsMutable(); + pitrWindows_.remove(index); + onChanged(); + } else { + pitrWindowsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder getPitrWindowsBuilder( + int index) { + return internalGetPitrWindowsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindowOrBuilder getPitrWindowsOrBuilder( + int index) { + if (pitrWindowsBuilder_ == null) { + return pitrWindows_.get(index); + } else { + return pitrWindowsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPitrWindowsOrBuilderList() { + if (pitrWindowsBuilder_ != null) { + return pitrWindowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pitrWindows_); + } + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder addPitrWindowsBuilder() { + return internalGetPitrWindowsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder addPitrWindowsBuilder( + int index) { + return internalGetPitrWindowsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Point in time recovery windows.
+     * The order is guaranteed to be ascending by start time.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPitrWindowsBuilderList() { + return internalGetPitrWindowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow, + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder, + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindowOrBuilder> + internalGetPitrWindowsFieldBuilder() { + if (pitrWindowsBuilder_ == null) { + pitrWindowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow, + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder, + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindowOrBuilder>( + pitrWindows_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + pitrWindows_ = null; + } + return pitrWindowsBuilder_; + } + + private java.lang.Object clusterUid_ = ""; + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster backed up by the
+     * datasource.
+     * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterUid. + */ + public java.lang.String getClusterUid() { + java.lang.Object ref = clusterUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster backed up by the
+     * datasource.
+     * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterUid. + */ + public com.google.protobuf.ByteString getClusterUidBytes() { + java.lang.Object ref = clusterUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster backed up by the
+     * datasource.
+     * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The clusterUid to set. + * @return This builder for chaining. + */ + public Builder setClusterUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterUid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster backed up by the
+     * datasource.
+     * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearClusterUid() { + clusterUid_ = getDefaultInstance().getClusterUid(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The cluster UID of the AlloyDB cluster backed up by the
+     * datasource.
+     * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for clusterUid to set. + * @return This builder for chaining. + */ + public Builder setClusterUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterUid_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + private static final com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties(); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlloyDBClusterDataSourceProperties 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.backupdr.v1beta.AlloyDBClusterDataSourceProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourcePropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourcePropertiesOrBuilder.java new file mode 100644 index 000000000000..e424de29bc28 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourcePropertiesOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AlloyDBClusterDataSourcePropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the AlloyDB cluster backed up by the datasource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Name of the AlloyDB cluster backed up by the datasource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPitrWindowsList(); + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow getPitrWindows(int index); + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPitrWindowsCount(); + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getPitrWindowsOrBuilderList(); + + /** + * + * + *
+   * Output only. Point in time recovery windows.
+   * The order is guaranteed to be ascending by start time.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AlloyDbPitrWindow pitr_windows = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindowOrBuilder getPitrWindowsOrBuilder(int index); + + /** + * + * + *
+   * Output only. The cluster UID of the AlloyDB cluster backed up by the
+   * datasource.
+   * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The clusterUid. + */ + java.lang.String getClusterUid(); + + /** + * + * + *
+   * Output only. The cluster UID of the AlloyDB cluster backed up by the
+   * datasource.
+   * 
+ * + * string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for clusterUid. + */ + com.google.protobuf.ByteString getClusterUidBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceReferenceProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceReferenceProperties.java new file mode 100644 index 000000000000..21406be67932 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceReferenceProperties.java @@ -0,0 +1,655 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * AlloyDBClusterDataSourceReferenceProperties represents the properties of an
+ * AlloyDB cluster that are stored in the DataSourceReference.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties} + */ +@com.google.protobuf.Generated +public final class AlloyDBClusterDataSourceReferenceProperties + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + AlloyDBClusterDataSourceReferencePropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AlloyDBClusterDataSourceReferenceProperties"); + } + + // Use AlloyDBClusterDataSourceReferenceProperties.newBuilder() to construct. + private AlloyDBClusterDataSourceReferenceProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AlloyDBClusterDataSourceReferenceProperties() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceReferenceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceReferenceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.class, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Name of the AlloyDB cluster backed up by the datasource.
+   * Format:
+   * projects/{project}/locations/{location}/clusters/{cluster}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Name of the AlloyDB cluster backed up by the datasource.
+   * Format:
+   * projects/{project}/locations/{location}/clusters/{cluster}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties other = + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) 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.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + 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.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + 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.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * AlloyDBClusterDataSourceReferenceProperties represents the properties of an
+   * AlloyDB cluster that are stored in the DataSourceReference.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferencePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceReferenceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceReferenceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.class, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.Builder + .class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceReferenceProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties build() { + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + buildPartial() { + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties result = + new com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .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_ = ""; + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * Format:
+     * projects/{project}/locations/{location}/clusters/{cluster}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * Format:
+     * projects/{project}/locations/{location}/clusters/{cluster}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * Format:
+     * projects/{project}/locations/{location}/clusters/{cluster}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * Format:
+     * projects/{project}/locations/{location}/clusters/{cluster}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the AlloyDB cluster backed up by the datasource.
+     * Format:
+     * projects/{project}/locations/{location}/clusters/{cluster}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + private static final com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties(); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlloyDBClusterDataSourceReferenceProperties 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.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceReferencePropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceReferencePropertiesOrBuilder.java new file mode 100644 index 000000000000..65cb6f19eb0d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDBClusterDataSourceReferencePropertiesOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AlloyDBClusterDataSourceReferencePropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the AlloyDB cluster backed up by the datasource.
+   * Format:
+   * projects/{project}/locations/{location}/clusters/{cluster}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Name of the AlloyDB cluster backed up by the datasource.
+   * Format:
+   * projects/{project}/locations/{location}/clusters/{cluster}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbClusterBackupProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbClusterBackupProperties.java new file mode 100644 index 000000000000..0ba2b9666214 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbClusterBackupProperties.java @@ -0,0 +1,1144 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * AlloyDbClusterBackupProperties represents AlloyDB cluster
+ * backup properties.
+ * .
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties} + */ +@com.google.protobuf.Generated +public final class AlloyDbClusterBackupProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) + AlloyDbClusterBackupPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AlloyDbClusterBackupProperties"); + } + + // Use AlloyDbClusterBackupProperties.newBuilder() to construct. + private AlloyDbClusterBackupProperties(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AlloyDbClusterBackupProperties() { + description_ = ""; + chainId_ = ""; + databaseVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbClusterBackupProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbClusterBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.class, + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.Builder.class); + } + + private int bitField0_; + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * An optional text description for the backup.
+   * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * An optional text description for the backup.
+   * 
+ * + * optional string description = 1; + * + * @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; + } + } + + /** + * + * + *
+   * An optional text description for the backup.
+   * 
+ * + * optional string description = 1; + * + * @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 STORED_BYTES_FIELD_NUMBER = 2; + private long storedBytes_ = 0L; + + /** + * + * + *
+   * Output only. Storage usage of this particular backup
+   * 
+ * + * int64 stored_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The storedBytes. + */ + @java.lang.Override + public long getStoredBytes() { + return storedBytes_; + } + + public static final int CHAIN_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object chainId_ = ""; + + /** + * + * + *
+   * Output only. The chain id of this backup. Backups belonging to the same
+   * chain are sharing the same chain id. This property is calculated and
+   * maintained by BackupDR.
+   * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The chainId. + */ + @java.lang.Override + public java.lang.String getChainId() { + java.lang.Object ref = chainId_; + 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(); + chainId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The chain id of this backup. Backups belonging to the same
+   * chain are sharing the same chain id. This property is calculated and
+   * maintained by BackupDR.
+   * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for chainId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChainIdBytes() { + java.lang.Object ref = chainId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chainId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_VERSION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseVersion_ = ""; + + /** + * + * + *
+   * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+   * backup was taken.
+   * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The databaseVersion. + */ + @java.lang.Override + public java.lang.String getDatabaseVersion() { + java.lang.Object ref = databaseVersion_; + 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(); + databaseVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+   * backup was taken.
+   * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for databaseVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseVersionBytes() { + java.lang.Object ref = databaseVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseVersion_ = 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + if (storedBytes_ != 0L) { + output.writeInt64(2, storedBytes_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chainId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, chainId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, databaseVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + if (storedBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, storedBytes_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chainId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, chainId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, databaseVersion_); + } + 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.backupdr.v1beta.AlloyDbClusterBackupProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties other = + (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) obj; + + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription().equals(other.getDescription())) return false; + } + if (getStoredBytes() != other.getStoredBytes()) return false; + if (!getChainId().equals(other.getChainId())) return false; + if (!getDatabaseVersion().equals(other.getDatabaseVersion())) 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 (hasDescription()) { + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + } + hash = (37 * hash) + STORED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStoredBytes()); + hash = (37 * hash) + CHAIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getChainId().hashCode(); + hash = (37 * hash) + DATABASE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties 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.backupdr.v1beta.AlloyDbClusterBackupProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties 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.backupdr.v1beta.AlloyDbClusterBackupProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AlloyDbClusterBackupProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * AlloyDbClusterBackupProperties represents AlloyDB cluster
+   * backup properties.
+   * .
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbClusterBackupProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbClusterBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.class, + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + storedBytes_ = 0L; + chainId_ = ""; + databaseVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbClusterBackupProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties build() { + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties buildPartial() { + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties result = + new com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.storedBytes_ = storedBytes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.chainId_ = chainId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.databaseVersion_ = databaseVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.getDefaultInstance()) + return this; + if (other.hasDescription()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getStoredBytes() != 0L) { + setStoredBytes(other.getStoredBytes()); + } + if (!other.getChainId().isEmpty()) { + chainId_ = other.chainId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDatabaseVersion().isEmpty()) { + databaseVersion_ = other.databaseVersion_; + bitField0_ |= 0x00000008; + 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: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + storedBytes_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + chainId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + databaseVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 description_ = ""; + + /** + * + * + *
+     * An optional text description for the backup.
+     * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * An optional text description for the backup.
+     * 
+ * + * optional string description = 1; + * + * @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; + } + } + + /** + * + * + *
+     * An optional text description for the backup.
+     * 
+ * + * optional string description = 1; + * + * @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; + } + } + + /** + * + * + *
+     * An optional text description for the backup.
+     * 
+ * + * optional string description = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional text description for the backup.
+     * 
+ * + * optional string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional text description for the backup.
+     * 
+ * + * optional string description = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private long storedBytes_; + + /** + * + * + *
+     * Output only. Storage usage of this particular backup
+     * 
+ * + * int64 stored_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The storedBytes. + */ + @java.lang.Override + public long getStoredBytes() { + return storedBytes_; + } + + /** + * + * + *
+     * Output only. Storage usage of this particular backup
+     * 
+ * + * int64 stored_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The storedBytes to set. + * @return This builder for chaining. + */ + public Builder setStoredBytes(long value) { + + storedBytes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Storage usage of this particular backup
+     * 
+ * + * int64 stored_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStoredBytes() { + bitField0_ = (bitField0_ & ~0x00000002); + storedBytes_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object chainId_ = ""; + + /** + * + * + *
+     * Output only. The chain id of this backup. Backups belonging to the same
+     * chain are sharing the same chain id. This property is calculated and
+     * maintained by BackupDR.
+     * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The chainId. + */ + public java.lang.String getChainId() { + java.lang.Object ref = chainId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chainId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The chain id of this backup. Backups belonging to the same
+     * chain are sharing the same chain id. This property is calculated and
+     * maintained by BackupDR.
+     * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for chainId. + */ + public com.google.protobuf.ByteString getChainIdBytes() { + java.lang.Object ref = chainId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chainId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The chain id of this backup. Backups belonging to the same
+     * chain are sharing the same chain id. This property is calculated and
+     * maintained by BackupDR.
+     * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The chainId to set. + * @return This builder for chaining. + */ + public Builder setChainId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + chainId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The chain id of this backup. Backups belonging to the same
+     * chain are sharing the same chain id. This property is calculated and
+     * maintained by BackupDR.
+     * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearChainId() { + chainId_ = getDefaultInstance().getChainId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The chain id of this backup. Backups belonging to the same
+     * chain are sharing the same chain id. This property is calculated and
+     * maintained by BackupDR.
+     * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for chainId to set. + * @return This builder for chaining. + */ + public Builder setChainIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + chainId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object databaseVersion_ = ""; + + /** + * + * + *
+     * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+     * backup was taken.
+     * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The databaseVersion. + */ + public java.lang.String getDatabaseVersion() { + java.lang.Object ref = databaseVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+     * backup was taken.
+     * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for databaseVersion. + */ + public com.google.protobuf.ByteString getDatabaseVersionBytes() { + java.lang.Object ref = databaseVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+     * backup was taken.
+     * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The databaseVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+     * backup was taken.
+     * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDatabaseVersion() { + databaseVersion_ = getDefaultInstance().getDatabaseVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+     * backup was taken.
+     * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for databaseVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) + private static final com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties(); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlloyDbClusterBackupProperties 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.backupdr.v1beta.AlloyDbClusterBackupProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbClusterBackupPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbClusterBackupPropertiesOrBuilder.java new file mode 100644 index 000000000000..a41fbdc96b8a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbClusterBackupPropertiesOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AlloyDbClusterBackupPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An optional text description for the backup.
+   * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + boolean hasDescription(); + + /** + * + * + *
+   * An optional text description for the backup.
+   * 
+ * + * optional string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * An optional text description for the backup.
+   * 
+ * + * optional string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Storage usage of this particular backup
+   * 
+ * + * int64 stored_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The storedBytes. + */ + long getStoredBytes(); + + /** + * + * + *
+   * Output only. The chain id of this backup. Backups belonging to the same
+   * chain are sharing the same chain id. This property is calculated and
+   * maintained by BackupDR.
+   * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The chainId. + */ + java.lang.String getChainId(); + + /** + * + * + *
+   * Output only. The chain id of this backup. Backups belonging to the same
+   * chain are sharing the same chain id. This property is calculated and
+   * maintained by BackupDR.
+   * 
+ * + * string chain_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for chainId. + */ + com.google.protobuf.ByteString getChainIdBytes(); + + /** + * + * + *
+   * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+   * backup was taken.
+   * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The databaseVersion. + */ + java.lang.String getDatabaseVersion(); + + /** + * + * + *
+   * Output only. The PostgreSQL major version of the AlloyDB cluster when the
+   * backup was taken.
+   * 
+ * + * string database_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for databaseVersion. + */ + com.google.protobuf.ByteString getDatabaseVersionBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbPitrWindow.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbPitrWindow.java new file mode 100644 index 000000000000..519c9656f500 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbPitrWindow.java @@ -0,0 +1,1095 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Point in time recovery window for an AlloyDB cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDbPitrWindow} + */ +@com.google.protobuf.Generated +public final class AlloyDbPitrWindow extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AlloyDbPitrWindow) + AlloyDbPitrWindowOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AlloyDbPitrWindow"); + } + + // Use AlloyDbPitrWindow.newBuilder() to construct. + private AlloyDbPitrWindow(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AlloyDbPitrWindow() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbPitrWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbPitrWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.class, + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder.class); + } + + private int bitField0_; + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+   * Output only. The start time of the PITR window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The start time of the PITR window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+   * Output only. The start time of the PITR window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The end time of the PITR window. It is not set if the
+   * corresponding Backup Plan Association is active.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The end time of the PITR window. It is not set if the
+   * corresponding Backup Plan Association is active.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The end time of the PITR window. It is not set if the
+   * corresponding Backup Plan Association is active.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int LOG_RETENTION_DAYS_FIELD_NUMBER = 3; + private long logRetentionDays_ = 0L; + + /** + * + * + *
+   * Output only. Log retention days for the PITR window.
+   * 
+ * + * int64 log_retention_days = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logRetentionDays. + */ + @java.lang.Override + public long getLogRetentionDays() { + return logRetentionDays_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (logRetentionDays_ != 0L) { + output.writeInt64(3, logRetentionDays_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (logRetentionDays_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, logRetentionDays_); + } + 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.backupdr.v1beta.AlloyDbPitrWindow)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow other = + (com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (getLogRetentionDays() != other.getLogRetentionDays()) 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 (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + LOG_RETENTION_DAYS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLogRetentionDays()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow 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.backupdr.v1beta.AlloyDbPitrWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow 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.backupdr.v1beta.AlloyDbPitrWindow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AlloyDbPitrWindow 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Point in time recovery window for an AlloyDB cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AlloyDbPitrWindow} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AlloyDbPitrWindow) + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbPitrWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbPitrWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.class, + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + logRetentionDays_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto + .internal_static_google_cloud_backupdr_v1beta_AlloyDbPitrWindow_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow build() { + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow buildPartial() { + com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow result = + new com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.logRetentionDays_ = logRetentionDays_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow other) { + if (other == com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow.getDefaultInstance()) + return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.getLogRetentionDays() != 0L) { + setLogRetentionDays(other.getLogRetentionDays()); + } + 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( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + logRetentionDays_ = input.readInt64(); + 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.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
+     * Output only. The start time of the PITR window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The end time of the PITR window. It is not set if the
+     * corresponding Backup Plan Association is active.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private long logRetentionDays_; + + /** + * + * + *
+     * Output only. Log retention days for the PITR window.
+     * 
+ * + * int64 log_retention_days = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logRetentionDays. + */ + @java.lang.Override + public long getLogRetentionDays() { + return logRetentionDays_; + } + + /** + * + * + *
+     * Output only. Log retention days for the PITR window.
+     * 
+ * + * int64 log_retention_days = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The logRetentionDays to set. + * @return This builder for chaining. + */ + public Builder setLogRetentionDays(long value) { + + logRetentionDays_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Log retention days for the PITR window.
+     * 
+ * + * int64 log_retention_days = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLogRetentionDays() { + bitField0_ = (bitField0_ & ~0x00000004); + logRetentionDays_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AlloyDbPitrWindow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AlloyDbPitrWindow) + private static final com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow(); + } + + public static com.google.cloud.backupdr.v1beta.AlloyDbPitrWindow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlloyDbPitrWindow 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.backupdr.v1beta.AlloyDbPitrWindow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbPitrWindowOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbPitrWindowOrBuilder.java new file mode 100644 index 000000000000..7bc8b83f65e9 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AlloyDbPitrWindowOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AlloyDbPitrWindowOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AlloyDbPitrWindow) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The start time of the PITR window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+   * Output only. The start time of the PITR window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+   * Output only. The start time of the PITR window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The end time of the PITR window. It is not set if the
+   * corresponding Backup Plan Association is active.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The end time of the PITR window. It is not set if the
+   * corresponding Backup Plan Association is active.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The end time of the PITR window. It is not set if the
+   * corresponding Backup Plan Association is active.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Log retention days for the PITR window.
+   * 
+ * + * int64 log_retention_days = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The logRetentionDays. + */ + long getLogRetentionDays(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicy.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicy.java new file mode 100644 index 000000000000..6e5661725b2c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicy.java @@ -0,0 +1,3073 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * AppliedAutoProtectionPolicy is a read-only view of AutoProtectionPolicy
+ * and AutoProtectionPolicyBinding resources that apply to a given workload
+ * project.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy} + */ +@com.google.protobuf.Generated +public final class AppliedAutoProtectionPolicy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy) + AppliedAutoProtectionPolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AppliedAutoProtectionPolicy"); + } + + // Use AppliedAutoProtectionPolicy.newBuilder() to construct. + private AppliedAutoProtectionPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AppliedAutoProtectionPolicy() { + name_ = ""; + sourceBinding_ = ""; + backupPlanDetails_ = java.util.Collections.emptyList(); + status_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.class, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder.class); + } + + /** + * + * + *
+   * Represents the various states an applied auto protection policy can be in.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The policy is in the process of being applied.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The policy has been applied and is active.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The policy is in the process of being removed.
+     * 
+ * + * DELETION_INITIATED = 3; + */ + DELETION_INITIATED(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State is not specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The policy is in the process of being applied.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The policy has been applied and is active.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The policy is in the process of being removed.
+     * 
+ * + * DELETION_INITIATED = 3; + */ + public static final int DELETION_INITIATED_VALUE = 3; + + 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 ACTIVE; + case 3: + return DELETION_INITIATED; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.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.backupdr.v1beta.AppliedAutoProtectionPolicy.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Canonical resource name.
+   * Format:
+   * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{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. Canonical resource name.
+   * Format:
+   * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{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 SOURCE_BINDING_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceBinding_ = ""; + + /** + * + * + *
+   * Output only. The full resource name of the AutoProtectionPolicyBinding that
+   * applies the source policy to a scope including this workload project. e.g.,
+   * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+   * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceBinding. + */ + @java.lang.Override + public java.lang.String getSourceBinding() { + java.lang.Object ref = sourceBinding_; + 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(); + sourceBinding_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The full resource name of the AutoProtectionPolicyBinding that
+   * applies the source policy to a scope including this workload project. e.g.,
+   * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+   * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceBinding. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBindingBytes() { + java.lang.Object ref = sourceBinding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CRITERIA_FIELD_NUMBER = 3; + private com.google.cloud.backupdr.v1beta.Criteria criteria_; + + /** + * + * + *
+   * Output only. The criteria resources must meet for this rule to apply. From
+   * AutoProtectionPolicy.criteria.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the criteria field is set. + */ + @java.lang.Override + public boolean hasCriteria() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The criteria resources must meet for this rule to apply. From
+   * AutoProtectionPolicy.criteria.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The criteria. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Criteria getCriteria() { + return criteria_ == null + ? com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance() + : criteria_; + } + + /** + * + * + *
+   * Output only. The criteria resources must meet for this rule to apply. From
+   * AutoProtectionPolicy.criteria.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CriteriaOrBuilder getCriteriaOrBuilder() { + return criteria_ == null + ? com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance() + : criteria_; + } + + public static final int BACKUP_PLAN_DETAILS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List backupPlanDetails_; + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanDetailsList() { + return backupPlanDetails_; + } + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanDetailsOrBuilderList() { + return backupPlanDetails_; + } + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getBackupPlanDetailsCount() { + return backupPlanDetails_.size(); + } + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanDetail getBackupPlanDetails(int index) { + return backupPlanDetails_.get(index); + } + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder getBackupPlanDetailsOrBuilder( + int index) { + return backupPlanDetails_.get(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp indicating when the binding was last created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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 BINDING_EVALUATION_SUMMARY_FIELD_NUMBER = 7; + private com.google.cloud.backupdr.v1beta.BindingEvaluationSummary bindingEvaluationSummary_; + + /** + * + * + *
+   * Output only. The summary of the last policy application when the job has
+   * run.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingEvaluationSummary field is set. + */ + @java.lang.Override + public boolean hasBindingEvaluationSummary() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. The summary of the last policy application when the job has
+   * run.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingEvaluationSummary. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary getBindingEvaluationSummary() { + return bindingEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance() + : bindingEvaluationSummary_; + } + + /** + * + * + *
+   * Output only. The summary of the last policy application when the job has
+   * run.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder + getBindingEvaluationSummaryOrBuilder() { + return bindingEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance() + : bindingEvaluationSummary_; + } + + public static final int STATUS_FIELD_NUMBER = 8; + private int status_ = 0; + + /** + * + * + *
+   * Output only. The status of the applied auto protection policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + + /** + * + * + *
+   * Output only. The status of the applied auto protection policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The status. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State getStatus() { + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State result = + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State.forNumber(status_); + return result == null + ? com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBinding_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sourceBinding_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCriteria()); + } + for (int i = 0; i < backupPlanDetails_.size(); i++) { + output.writeMessage(4, backupPlanDetails_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getBindingEvaluationSummary()); + } + if (status_ + != com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, status_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceBinding_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sourceBinding_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCriteria()); + } + for (int i = 0; i < backupPlanDetails_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, backupPlanDetails_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getBindingEvaluationSummary()); + } + if (status_ + != com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, status_); + } + 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.backupdr.v1beta.AppliedAutoProtectionPolicy)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy other = + (com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSourceBinding().equals(other.getSourceBinding())) return false; + if (hasCriteria() != other.hasCriteria()) return false; + if (hasCriteria()) { + if (!getCriteria().equals(other.getCriteria())) return false; + } + if (!getBackupPlanDetailsList().equals(other.getBackupPlanDetailsList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasBindingEvaluationSummary() != other.hasBindingEvaluationSummary()) return false; + if (hasBindingEvaluationSummary()) { + if (!getBindingEvaluationSummary().equals(other.getBindingEvaluationSummary())) return false; + } + if (status_ != other.status_) 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) + SOURCE_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getSourceBinding().hashCode(); + if (hasCriteria()) { + hash = (37 * hash) + CRITERIA_FIELD_NUMBER; + hash = (53 * hash) + getCriteria().hashCode(); + } + if (getBackupPlanDetailsCount() > 0) { + hash = (37 * hash) + BACKUP_PLAN_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanDetailsList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasBindingEvaluationSummary()) { + hash = (37 * hash) + BINDING_EVALUATION_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getBindingEvaluationSummary().hashCode(); + } + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy 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.backupdr.v1beta.AppliedAutoProtectionPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy 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.backupdr.v1beta.AppliedAutoProtectionPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AppliedAutoProtectionPolicy 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * AppliedAutoProtectionPolicy is a read-only view of AutoProtectionPolicy
+   * and AutoProtectionPolicyBinding resources that apply to a given workload
+   * project.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy) + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.class, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCriteriaFieldBuilder(); + internalGetBackupPlanDetailsFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetBindingEvaluationSummaryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + sourceBinding_ = ""; + criteria_ = null; + if (criteriaBuilder_ != null) { + criteriaBuilder_.dispose(); + criteriaBuilder_ = null; + } + if (backupPlanDetailsBuilder_ == null) { + backupPlanDetails_ = java.util.Collections.emptyList(); + } else { + backupPlanDetails_ = null; + backupPlanDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + bindingEvaluationSummary_ = null; + if (bindingEvaluationSummaryBuilder_ != null) { + bindingEvaluationSummaryBuilder_.dispose(); + bindingEvaluationSummaryBuilder_ = null; + } + status_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy build() { + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy buildPartial() { + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy result = + new com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy result) { + if (backupPlanDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + backupPlanDetails_ = java.util.Collections.unmodifiableList(backupPlanDetails_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.backupPlanDetails_ = backupPlanDetails_; + } else { + result.backupPlanDetails_ = backupPlanDetailsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sourceBinding_ = sourceBinding_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.criteria_ = criteriaBuilder_ == null ? criteria_ : criteriaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.bindingEvaluationSummary_ = + bindingEvaluationSummaryBuilder_ == null + ? bindingEvaluationSummary_ + : bindingEvaluationSummaryBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.status_ = status_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy other) { + if (other + == com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSourceBinding().isEmpty()) { + sourceBinding_ = other.sourceBinding_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCriteria()) { + mergeCriteria(other.getCriteria()); + } + if (backupPlanDetailsBuilder_ == null) { + if (!other.backupPlanDetails_.isEmpty()) { + if (backupPlanDetails_.isEmpty()) { + backupPlanDetails_ = other.backupPlanDetails_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.addAll(other.backupPlanDetails_); + } + onChanged(); + } + } else { + if (!other.backupPlanDetails_.isEmpty()) { + if (backupPlanDetailsBuilder_.isEmpty()) { + backupPlanDetailsBuilder_.dispose(); + backupPlanDetailsBuilder_ = null; + backupPlanDetails_ = other.backupPlanDetails_; + bitField0_ = (bitField0_ & ~0x00000008); + backupPlanDetailsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupPlanDetailsFieldBuilder() + : null; + } else { + backupPlanDetailsBuilder_.addAllMessages(other.backupPlanDetails_); + } + } + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasBindingEvaluationSummary()) { + mergeBindingEvaluationSummary(other.getBindingEvaluationSummary()); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + 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 18: + { + sourceBinding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCriteriaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.backupdr.v1beta.BackupPlanDetail m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupPlanDetail.parser(), + extensionRegistry); + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(m); + } else { + backupPlanDetailsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetBindingEvaluationSummaryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + status_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + 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. Canonical resource name.
+     * Format:
+     * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{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. Canonical resource name.
+     * Format:
+     * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{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. Canonical resource name.
+     * Format:
+     * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{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. Canonical resource name.
+     * Format:
+     * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{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. Canonical resource name.
+     * Format:
+     * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{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 java.lang.Object sourceBinding_ = ""; + + /** + * + * + *
+     * Output only. The full resource name of the AutoProtectionPolicyBinding that
+     * applies the source policy to a scope including this workload project. e.g.,
+     * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+     * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceBinding. + */ + public java.lang.String getSourceBinding() { + java.lang.Object ref = sourceBinding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceBinding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The full resource name of the AutoProtectionPolicyBinding that
+     * applies the source policy to a scope including this workload project. e.g.,
+     * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+     * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceBinding. + */ + public com.google.protobuf.ByteString getSourceBindingBytes() { + java.lang.Object ref = sourceBinding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The full resource name of the AutoProtectionPolicyBinding that
+     * applies the source policy to a scope including this workload project. e.g.,
+     * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+     * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sourceBinding to set. + * @return This builder for chaining. + */ + public Builder setSourceBinding(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceBinding_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The full resource name of the AutoProtectionPolicyBinding that
+     * applies the source policy to a scope including this workload project. e.g.,
+     * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+     * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSourceBinding() { + sourceBinding_ = getDefaultInstance().getSourceBinding(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The full resource name of the AutoProtectionPolicyBinding that
+     * applies the source policy to a scope including this workload project. e.g.,
+     * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+     * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for sourceBinding to set. + * @return This builder for chaining. + */ + public Builder setSourceBindingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceBinding_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.Criteria criteria_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Criteria, + com.google.cloud.backupdr.v1beta.Criteria.Builder, + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder> + criteriaBuilder_; + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the criteria field is set. + */ + public boolean hasCriteria() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The criteria. + */ + public com.google.cloud.backupdr.v1beta.Criteria getCriteria() { + if (criteriaBuilder_ == null) { + return criteria_ == null + ? com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance() + : criteria_; + } else { + return criteriaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCriteria(com.google.cloud.backupdr.v1beta.Criteria value) { + if (criteriaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + criteria_ = value; + } else { + criteriaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCriteria(com.google.cloud.backupdr.v1beta.Criteria.Builder builderForValue) { + if (criteriaBuilder_ == null) { + criteria_ = builderForValue.build(); + } else { + criteriaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCriteria(com.google.cloud.backupdr.v1beta.Criteria value) { + if (criteriaBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && criteria_ != null + && criteria_ != com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance()) { + getCriteriaBuilder().mergeFrom(value); + } else { + criteria_ = value; + } + } else { + criteriaBuilder_.mergeFrom(value); + } + if (criteria_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCriteria() { + bitField0_ = (bitField0_ & ~0x00000004); + criteria_ = null; + if (criteriaBuilder_ != null) { + criteriaBuilder_.dispose(); + criteriaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.Criteria.Builder getCriteriaBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCriteriaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.CriteriaOrBuilder getCriteriaOrBuilder() { + if (criteriaBuilder_ != null) { + return criteriaBuilder_.getMessageOrBuilder(); + } else { + return criteria_ == null + ? com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance() + : criteria_; + } + } + + /** + * + * + *
+     * Output only. The criteria resources must meet for this rule to apply. From
+     * AutoProtectionPolicy.criteria.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Criteria, + com.google.cloud.backupdr.v1beta.Criteria.Builder, + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder> + internalGetCriteriaFieldBuilder() { + if (criteriaBuilder_ == null) { + criteriaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Criteria, + com.google.cloud.backupdr.v1beta.Criteria.Builder, + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder>( + getCriteria(), getParentForChildren(), isClean()); + criteria_ = null; + } + return criteriaBuilder_; + } + + private java.util.List backupPlanDetails_ = + java.util.Collections.emptyList(); + + private void ensureBackupPlanDetailsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + backupPlanDetails_ = + new java.util.ArrayList( + backupPlanDetails_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanDetail, + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder> + backupPlanDetailsBuilder_; + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getBackupPlanDetailsList() { + if (backupPlanDetailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupPlanDetails_); + } else { + return backupPlanDetailsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getBackupPlanDetailsCount() { + if (backupPlanDetailsBuilder_ == null) { + return backupPlanDetails_.size(); + } else { + return backupPlanDetailsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetail getBackupPlanDetails(int index) { + if (backupPlanDetailsBuilder_ == null) { + return backupPlanDetails_.get(index); + } else { + return backupPlanDetailsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBackupPlanDetails( + int index, com.google.cloud.backupdr.v1beta.BackupPlanDetail value) { + if (backupPlanDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.set(index, value); + onChanged(); + } else { + backupPlanDetailsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBackupPlanDetails( + int index, com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder builderForValue) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.set(index, builderForValue.build()); + onChanged(); + } else { + backupPlanDetailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBackupPlanDetails(com.google.cloud.backupdr.v1beta.BackupPlanDetail value) { + if (backupPlanDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(value); + onChanged(); + } else { + backupPlanDetailsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBackupPlanDetails( + int index, com.google.cloud.backupdr.v1beta.BackupPlanDetail value) { + if (backupPlanDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(index, value); + onChanged(); + } else { + backupPlanDetailsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBackupPlanDetails( + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder builderForValue) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(builderForValue.build()); + onChanged(); + } else { + backupPlanDetailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBackupPlanDetails( + int index, com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder builderForValue) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(index, builderForValue.build()); + onChanged(); + } else { + backupPlanDetailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllBackupPlanDetails( + java.lang.Iterable values) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPlanDetails_); + onChanged(); + } else { + backupPlanDetailsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBackupPlanDetails() { + if (backupPlanDetailsBuilder_ == null) { + backupPlanDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + backupPlanDetailsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeBackupPlanDetails(int index) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.remove(index); + onChanged(); + } else { + backupPlanDetailsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder getBackupPlanDetailsBuilder( + int index) { + return internalGetBackupPlanDetailsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder getBackupPlanDetailsOrBuilder( + int index) { + if (backupPlanDetailsBuilder_ == null) { + return backupPlanDetails_.get(index); + } else { + return backupPlanDetailsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getBackupPlanDetailsOrBuilderList() { + if (backupPlanDetailsBuilder_ != null) { + return backupPlanDetailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupPlanDetails_); + } + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder addBackupPlanDetailsBuilder() { + return internalGetBackupPlanDetailsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupPlanDetail.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder addBackupPlanDetailsBuilder( + int index) { + return internalGetBackupPlanDetailsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.BackupPlanDetail.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The set of backup plan configurations, mirroring the
+     * backup_plan_details from the source AutoProtectionPolicy. Each element
+     * specifies a backup plan for a given resource type.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getBackupPlanDetailsBuilderList() { + return internalGetBackupPlanDetailsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanDetail, + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder> + internalGetBackupPlanDetailsFieldBuilder() { + if (backupPlanDetailsBuilder_ == null) { + backupPlanDetailsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanDetail, + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder>( + backupPlanDetails_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + backupPlanDetails_ = null; + } + return backupPlanDetailsBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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. Timestamp indicating when the binding was last created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.cloud.backupdr.v1beta.BindingEvaluationSummary bindingEvaluationSummary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder> + bindingEvaluationSummaryBuilder_; + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingEvaluationSummary field is set. + */ + public boolean hasBindingEvaluationSummary() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingEvaluationSummary. + */ + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary getBindingEvaluationSummary() { + if (bindingEvaluationSummaryBuilder_ == null) { + return bindingEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance() + : bindingEvaluationSummary_; + } else { + return bindingEvaluationSummaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBindingEvaluationSummary( + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary value) { + if (bindingEvaluationSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bindingEvaluationSummary_ = value; + } else { + bindingEvaluationSummaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBindingEvaluationSummary( + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder builderForValue) { + if (bindingEvaluationSummaryBuilder_ == null) { + bindingEvaluationSummary_ = builderForValue.build(); + } else { + bindingEvaluationSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeBindingEvaluationSummary( + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary value) { + if (bindingEvaluationSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && bindingEvaluationSummary_ != null + && bindingEvaluationSummary_ + != com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance()) { + getBindingEvaluationSummaryBuilder().mergeFrom(value); + } else { + bindingEvaluationSummary_ = value; + } + } else { + bindingEvaluationSummaryBuilder_.mergeFrom(value); + } + if (bindingEvaluationSummary_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBindingEvaluationSummary() { + bitField0_ = (bitField0_ & ~0x00000040); + bindingEvaluationSummary_ = null; + if (bindingEvaluationSummaryBuilder_ != null) { + bindingEvaluationSummaryBuilder_.dispose(); + bindingEvaluationSummaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder + getBindingEvaluationSummaryBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetBindingEvaluationSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder + getBindingEvaluationSummaryOrBuilder() { + if (bindingEvaluationSummaryBuilder_ != null) { + return bindingEvaluationSummaryBuilder_.getMessageOrBuilder(); + } else { + return bindingEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance() + : bindingEvaluationSummary_; + } + } + + /** + * + * + *
+     * Output only. The summary of the last policy application when the job has
+     * run.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder> + internalGetBindingEvaluationSummaryFieldBuilder() { + if (bindingEvaluationSummaryBuilder_ == null) { + bindingEvaluationSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder>( + getBindingEvaluationSummary(), getParentForChildren(), isClean()); + bindingEvaluationSummary_ = null; + } + return bindingEvaluationSummaryBuilder_; + } + + private int status_ = 0; + + /** + * + * + *
+     * Output only. The status of the applied auto protection policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + + /** + * + * + *
+     * Output only. The status of the applied auto protection policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + status_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of the applied auto protection policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The status. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State getStatus() { + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State result = + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State.forNumber(status_); + return result == null + ? com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The status of the applied auto protection policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + status_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of the applied auto protection policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000080); + status_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy) + private static final com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy(); + } + + public static com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppliedAutoProtectionPolicy 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.backupdr.v1beta.AppliedAutoProtectionPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicyOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicyOrBuilder.java new file mode 100644 index 000000000000..a03aebcf4b2f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicyOrBuilder.java @@ -0,0 +1,368 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AppliedAutoProtectionPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Canonical resource name.
+   * Format:
+   * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Canonical resource name.
+   * Format:
+   * projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The full resource name of the AutoProtectionPolicyBinding that
+   * applies the source policy to a scope including this workload project. e.g.,
+   * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+   * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourceBinding. + */ + java.lang.String getSourceBinding(); + + /** + * + * + *
+   * Output only. The full resource name of the AutoProtectionPolicyBinding that
+   * applies the source policy to a scope including this workload project. e.g.,
+   * projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
+   * 
+ * + * string source_binding = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourceBinding. + */ + com.google.protobuf.ByteString getSourceBindingBytes(); + + /** + * + * + *
+   * Output only. The criteria resources must meet for this rule to apply. From
+   * AutoProtectionPolicy.criteria.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the criteria field is set. + */ + boolean hasCriteria(); + + /** + * + * + *
+   * Output only. The criteria resources must meet for this rule to apply. From
+   * AutoProtectionPolicy.criteria.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The criteria. + */ + com.google.cloud.backupdr.v1beta.Criteria getCriteria(); + + /** + * + * + *
+   * Output only. The criteria resources must meet for this rule to apply. From
+   * AutoProtectionPolicy.criteria.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder getCriteriaOrBuilder(); + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getBackupPlanDetailsList(); + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanDetail getBackupPlanDetails(int index); + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getBackupPlanDetailsCount(); + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getBackupPlanDetailsOrBuilderList(); + + /** + * + * + *
+   * Output only. The set of backup plan configurations, mirroring the
+   * backup_plan_details from the source AutoProtectionPolicy. Each element
+   * specifies a backup plan for a given resource type.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder getBackupPlanDetailsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Timestamp indicating when the binding was last created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The summary of the last policy application when the job has
+   * run.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingEvaluationSummary field is set. + */ + boolean hasBindingEvaluationSummary(); + + /** + * + * + *
+   * Output only. The summary of the last policy application when the job has
+   * run.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingEvaluationSummary. + */ + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary getBindingEvaluationSummary(); + + /** + * + * + *
+   * Output only. The summary of the last policy application when the job has
+   * run.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder + getBindingEvaluationSummaryOrBuilder(); + + /** + * + * + *
+   * Output only. The status of the applied auto protection policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + + /** + * + * + *
+   * Output only. The status of the applied auto protection policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The status. + */ + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.State getStatus(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicyProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicyProto.java new file mode 100644 index 000000000000..4f2ae0292b61 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AppliedAutoProtectionPolicyProto.java @@ -0,0 +1,167 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class AppliedAutoProtectionPolicyProto extends com.google.protobuf.GeneratedFile { + private AppliedAutoProtectionPolicyProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AppliedAutoProtectionPolicyProto"); + } + + 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_backupdr_v1beta_AppliedAutoProtectionPolicy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_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/backupdr/v1beta/appliedautoprotectionpolicy.proto\022\034google.cloud.b" + + "ackupdr.v1beta\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\0327goog" + + "le/cloud/backupdr/v1beta/autoprotectionpolicy.proto\032>google/cloud/backupdr/v1bet" + + "a/autoprotectionpolicybinding.proto\032\037google/protobuf/timestamp.proto\"\263\006\n" + + "\033AppliedAutoProtectionPolicy\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\033\n" + + "\016source_binding\030\002 \001(\tB\003\340A\003\022=\n" + + "\010criteria\030\003" + + " \001(\0132&.google.cloud.backupdr.v1beta.CriteriaB\003\340A\003\022P\n" + + "\023backup_plan_details\030\004 \003(\013" + + "2..google.cloud.backupdr.v1beta.BackupPlanDetailB\003\340A\003\0224\n" + + "\013update_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022_\n" + + "\032binding_evaluation_summary\030\007 \001(\01326." + + "google.cloud.backupdr.v1beta.BindingEvaluationSummaryB\003\340A\003\022T\n" + + "\006status\030\010 \001(\0162?.goo" + + "gle.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.StateB\003\340A\003\"P\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\026\n" + + "\022DELETION_INITIATED\020\003:\335\001\352A\331\001\n" + + "3backupdr.googleapis.com/AppliedAutoProtection" + + "Policy\022fprojects/{project}/locations/{location}/appliedAutoProtectionPolicies/{a" + + "pplied_auto_protection_policy}*\035appliedA" + + "utoProtectionPolicies2\033appliedAutoProtectionPolicy\"\302\001\n" + + "(ListAppliedAutoProtectionPoliciesRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\303\001\n" + + ")ListAppliedAutoProtectionPoliciesResponse\022c\n" + + " applied_auto_protection_policies\030\001" + + " \003(\01329.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\030\n" + + "\013unreachable\030\003 \003(\tB\003\340A\006B\344\001\n" + + " com.google.cloud.backupdr.v1betaB AppliedAutoProtectionPolicyProtoP\001Z<" + + "cloud.google.com/go/backupdr/apiv1beta/b" + + "ackupdrpb;backupdrpb\252\002\034Google.Cloud.Back" + + "upDR.V1Beta\312\002\034Google\\Cloud\\BackupDR\\V1be" + + "ta\352\002\037Google::Cloud::BackupDR::V1betab\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.cloud.backupdr.v1beta.AutoProtectionPolicyProto.getDescriptor(), + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_AppliedAutoProtectionPolicy_descriptor, + new java.lang.String[] { + "Name", + "SourceBinding", + "Criteria", + "BackupPlanDetails", + "UpdateTime", + "CreateTime", + "BindingEvaluationSummary", + "Status", + }); + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_descriptor, + new java.lang.String[] { + "AppliedAutoProtectionPolicies", "NextPageToken", "Unreachable", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto.getDescriptor(); + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + 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); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AttachedDisk.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AttachedDisk.java new file mode 100644 index 000000000000..6a11bfceb087 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AttachedDisk.java @@ -0,0 +1,6339 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * An instance-attached disk resource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AttachedDisk} + */ +@com.google.protobuf.Generated +public final class AttachedDisk extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AttachedDisk) + AttachedDiskOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AttachedDisk"); + } + + // Use AttachedDisk.newBuilder() to construct. + private AttachedDisk(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AttachedDisk() { + deviceName_ = ""; + kind_ = ""; + diskTypeDeprecated_ = 0; + mode_ = 0; + source_ = ""; + license_ = com.google.protobuf.LazyStringArrayList.emptyList(); + diskInterface_ = 0; + guestOsFeature_ = java.util.Collections.emptyList(); + savedState_ = 0; + diskType_ = ""; + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AttachedDisk.class, + com.google.cloud.backupdr.v1beta.AttachedDisk.Builder.class); + } + + /** + * + * + *
+   * List of the Disk Types.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AttachedDisk.DiskType} + */ + public enum DiskType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value, which is unused.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + DISK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A scratch disk type.
+     * 
+ * + * SCRATCH = 1; + */ + SCRATCH(1), + /** + * + * + *
+     * A persistent disk type.
+     * 
+ * + * PERSISTENT = 2; + */ + PERSISTENT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskType"); + } + + /** + * + * + *
+     * Default value, which is unused.
+     * 
+ * + * DISK_TYPE_UNSPECIFIED = 0; + */ + public static final int DISK_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * A scratch disk type.
+     * 
+ * + * SCRATCH = 1; + */ + public static final int SCRATCH_VALUE = 1; + + /** + * + * + *
+     * A persistent disk type.
+     * 
+ * + * PERSISTENT = 2; + */ + public static final int PERSISTENT_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 DiskType 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 DiskType forNumber(int value) { + switch (value) { + case 0: + return DISK_TYPE_UNSPECIFIED; + case 1: + return SCRATCH; + case 2: + return PERSISTENT; + 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 DiskType findValueByNumber(int number) { + return DiskType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AttachedDisk.getDescriptor().getEnumTypes().get(0); + } + + private static final DiskType[] VALUES = values(); + + public static DiskType 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 DiskType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.AttachedDisk.DiskType) + } + + /** + * + * + *
+   * List of the Disk Modes.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AttachedDisk.DiskMode} + */ + public enum DiskMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value, which is unused.
+     * 
+ * + * DISK_MODE_UNSPECIFIED = 0; + */ + DISK_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Attaches this disk in read-write mode. Only one
+     * virtual machine at a time can be attached to a disk in read-write mode.
+     * 
+ * + * READ_WRITE = 1; + */ + READ_WRITE(1), + /** + * + * + *
+     * Attaches this disk in read-only mode. Multiple virtual machines can use
+     * a disk in read-only mode at a time.
+     * 
+ * + * READ_ONLY = 2; + */ + READ_ONLY(2), + /** + * + * + *
+     * The disk is locked for administrative reasons. Nobody else
+     * can use the disk. This mode is used (for example) when taking
+     * a snapshot of a disk to prevent mounting the disk while it is
+     * being snapshotted.
+     * 
+ * + * LOCKED = 3; + */ + LOCKED(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskMode"); + } + + /** + * + * + *
+     * Default value, which is unused.
+     * 
+ * + * DISK_MODE_UNSPECIFIED = 0; + */ + public static final int DISK_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Attaches this disk in read-write mode. Only one
+     * virtual machine at a time can be attached to a disk in read-write mode.
+     * 
+ * + * READ_WRITE = 1; + */ + public static final int READ_WRITE_VALUE = 1; + + /** + * + * + *
+     * Attaches this disk in read-only mode. Multiple virtual machines can use
+     * a disk in read-only mode at a time.
+     * 
+ * + * READ_ONLY = 2; + */ + public static final int READ_ONLY_VALUE = 2; + + /** + * + * + *
+     * The disk is locked for administrative reasons. Nobody else
+     * can use the disk. This mode is used (for example) when taking
+     * a snapshot of a disk to prevent mounting the disk while it is
+     * being snapshotted.
+     * 
+ * + * LOCKED = 3; + */ + public static final int LOCKED_VALUE = 3; + + 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 DiskMode 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 DiskMode forNumber(int value) { + switch (value) { + case 0: + return DISK_MODE_UNSPECIFIED; + case 1: + return READ_WRITE; + case 2: + return READ_ONLY; + case 3: + return LOCKED; + 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 DiskMode findValueByNumber(int number) { + return DiskMode.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AttachedDisk.getDescriptor().getEnumTypes().get(1); + } + + private static final DiskMode[] VALUES = values(); + + public static DiskMode 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 DiskMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.AttachedDisk.DiskMode) + } + + /** + * + * + *
+   * List of the Disk Interfaces.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface} + */ + public enum DiskInterface implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value, which is unused.
+     * 
+ * + * DISK_INTERFACE_UNSPECIFIED = 0; + */ + DISK_INTERFACE_UNSPECIFIED(0), + /** + * + * + *
+     * SCSI Disk Interface.
+     * 
+ * + * SCSI = 1; + */ + SCSI(1), + /** + * + * + *
+     * NVME Disk Interface.
+     * 
+ * + * NVME = 2; + */ + NVME(2), + /** + * + * + *
+     * NVDIMM Disk Interface.
+     * 
+ * + * NVDIMM = 3; + */ + NVDIMM(3), + /** + * + * + *
+     * ISCSI Disk Interface.
+     * 
+ * + * ISCSI = 4; + */ + ISCSI(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskInterface"); + } + + /** + * + * + *
+     * Default value, which is unused.
+     * 
+ * + * DISK_INTERFACE_UNSPECIFIED = 0; + */ + public static final int DISK_INTERFACE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * SCSI Disk Interface.
+     * 
+ * + * SCSI = 1; + */ + public static final int SCSI_VALUE = 1; + + /** + * + * + *
+     * NVME Disk Interface.
+     * 
+ * + * NVME = 2; + */ + public static final int NVME_VALUE = 2; + + /** + * + * + *
+     * NVDIMM Disk Interface.
+     * 
+ * + * NVDIMM = 3; + */ + public static final int NVDIMM_VALUE = 3; + + /** + * + * + *
+     * ISCSI Disk Interface.
+     * 
+ * + * ISCSI = 4; + */ + public static final int ISCSI_VALUE = 4; + + 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 DiskInterface 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 DiskInterface forNumber(int value) { + switch (value) { + case 0: + return DISK_INTERFACE_UNSPECIFIED; + case 1: + return SCSI; + case 2: + return NVME; + case 3: + return NVDIMM; + case 4: + return ISCSI; + 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 DiskInterface findValueByNumber(int number) { + return DiskInterface.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AttachedDisk.getDescriptor().getEnumTypes().get(2); + } + + private static final DiskInterface[] VALUES = values(); + + public static DiskInterface 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 DiskInterface(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface) + } + + /** + * + * + *
+   * List of the states of the Disk.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState} + */ + public enum DiskSavedState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default Disk state has not been preserved.
+     * 
+ * + * DISK_SAVED_STATE_UNSPECIFIED = 0; + */ + DISK_SAVED_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Disk state has been preserved.
+     * 
+ * + * PRESERVED = 1; + */ + PRESERVED(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskSavedState"); + } + + /** + * + * + *
+     * Default Disk state has not been preserved.
+     * 
+ * + * DISK_SAVED_STATE_UNSPECIFIED = 0; + */ + public static final int DISK_SAVED_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Disk state has been preserved.
+     * 
+ * + * PRESERVED = 1; + */ + public static final int PRESERVED_VALUE = 1; + + 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 DiskSavedState 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 DiskSavedState forNumber(int value) { + switch (value) { + case 0: + return DISK_SAVED_STATE_UNSPECIFIED; + case 1: + return PRESERVED; + 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 DiskSavedState findValueByNumber(int number) { + return DiskSavedState.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AttachedDisk.getDescriptor().getEnumTypes().get(3); + } + + private static final DiskSavedState[] VALUES = values(); + + public static DiskSavedState 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 DiskSavedState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState) + } + + public interface InitializeParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to
+     * use the name of the instance.
+     * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the diskName field is set. + */ + boolean hasDiskName(); + + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to
+     * use the name of the instance.
+     * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskName. + */ + java.lang.String getDiskName(); + + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to
+     * use the name of the instance.
+     * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for diskName. + */ + com.google.protobuf.ByteString getDiskNameBytes(); + + /** + * + * + *
+     * Optional. URL of the zone where the disk should be created.
+     * Required for each regional disk associated with the instance.
+     * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the replicaZones. + */ + java.util.List getReplicaZonesList(); + + /** + * + * + *
+     * Optional. URL of the zone where the disk should be created.
+     * Required for each regional disk associated with the instance.
+     * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of replicaZones. + */ + int getReplicaZonesCount(); + + /** + * + * + *
+     * Optional. URL of the zone where the disk should be created.
+     * Required for each regional disk associated with the instance.
+     * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + java.lang.String getReplicaZones(int index); + + /** + * + * + *
+     * Optional. URL of the zone where the disk should be created.
+     * Required for each regional disk associated with the instance.
+     * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + com.google.protobuf.ByteString getReplicaZonesBytes(int index); + } + + /** + * + * + *
+   * Specifies the parameters to initialize this disk.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams} + */ + public static final class InitializeParams extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams) + InitializeParamsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InitializeParams"); + } + + // Use InitializeParams.newBuilder() to construct. + private InitializeParams(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InitializeParams() { + diskName_ = ""; + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_InitializeParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_InitializeParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.class, + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.Builder.class); + } + + private int bitField0_; + public static final int DISK_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object diskName_ = ""; + + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to
+     * use the name of the instance.
+     * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the diskName field is set. + */ + @java.lang.Override + public boolean hasDiskName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to
+     * use the name of the instance.
+     * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskName. + */ + @java.lang.Override + public java.lang.String getDiskName() { + java.lang.Object ref = diskName_; + 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(); + diskName_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. Specifies the disk name. If not specified, the default is to
+     * use the name of the instance.
+     * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for diskName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDiskNameBytes() { + java.lang.Object ref = diskName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLICA_ZONES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList replicaZones_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Optional. URL of the zone where the disk should be created.
+     * Required for each regional disk associated with the instance.
+     * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the replicaZones. + */ + public com.google.protobuf.ProtocolStringList getReplicaZonesList() { + return replicaZones_; + } + + /** + * + * + *
+     * Optional. URL of the zone where the disk should be created.
+     * Required for each regional disk associated with the instance.
+     * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of replicaZones. + */ + public int getReplicaZonesCount() { + return replicaZones_.size(); + } + + /** + * + * + *
+     * Optional. URL of the zone where the disk should be created.
+     * Required for each regional disk associated with the instance.
+     * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + public java.lang.String getReplicaZones(int index) { + return replicaZones_.get(index); + } + + /** + * + * + *
+     * Optional. URL of the zone where the disk should be created.
+     * Required for each regional disk associated with the instance.
+     * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + public com.google.protobuf.ByteString getReplicaZonesBytes(int index) { + return replicaZones_.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 { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, diskName_); + } + for (int i = 0; i < replicaZones_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, replicaZones_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, diskName_); + } + { + int dataSize = 0; + for (int i = 0; i < replicaZones_.size(); i++) { + dataSize += computeStringSizeNoTag(replicaZones_.getRaw(i)); + } + size += dataSize; + size += 1 * getReplicaZonesList().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.backupdr.v1beta.AttachedDisk.InitializeParams)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams other = + (com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams) obj; + + if (hasDiskName() != other.hasDiskName()) return false; + if (hasDiskName()) { + if (!getDiskName().equals(other.getDiskName())) return false; + } + if (!getReplicaZonesList().equals(other.getReplicaZonesList())) 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 (hasDiskName()) { + hash = (37 * hash) + DISK_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDiskName().hashCode(); + } + if (getReplicaZonesCount() > 0) { + hash = (37 * hash) + REPLICA_ZONES_FIELD_NUMBER; + hash = (53 * hash) + getReplicaZonesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams 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.backupdr.v1beta.AttachedDisk.InitializeParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams 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.backupdr.v1beta.AttachedDisk.InitializeParams parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AttachedDisk.InitializeParams 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Specifies the parameters to initialize this disk.
+     * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams) + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_InitializeParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_InitializeParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.class, + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + diskName_ = ""; + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_InitializeParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams build() { + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams buildPartial() { + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams result = + new com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.diskName_ = diskName_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + replicaZones_.makeImmutable(); + result.replicaZones_ = replicaZones_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams other) { + if (other + == com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.getDefaultInstance()) + return this; + if (other.hasDiskName()) { + diskName_ = other.diskName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.replicaZones_.isEmpty()) { + if (replicaZones_.isEmpty()) { + replicaZones_ = other.replicaZones_; + bitField0_ |= 0x00000002; + } else { + ensureReplicaZonesIsMutable(); + replicaZones_.addAll(other.replicaZones_); + } + 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: + { + diskName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReplicaZonesIsMutable(); + replicaZones_.add(s); + 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 java.lang.Object diskName_ = ""; + + /** + * + * + *
+       * Optional. Specifies the disk name. If not specified, the default is to
+       * use the name of the instance.
+       * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the diskName field is set. + */ + public boolean hasDiskName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Optional. Specifies the disk name. If not specified, the default is to
+       * use the name of the instance.
+       * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskName. + */ + public java.lang.String getDiskName() { + java.lang.Object ref = diskName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. Specifies the disk name. If not specified, the default is to
+       * use the name of the instance.
+       * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for diskName. + */ + public com.google.protobuf.ByteString getDiskNameBytes() { + java.lang.Object ref = diskName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. Specifies the disk name. If not specified, the default is to
+       * use the name of the instance.
+       * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The diskName to set. + * @return This builder for chaining. + */ + public Builder setDiskName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + diskName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Specifies the disk name. If not specified, the default is to
+       * use the name of the instance.
+       * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDiskName() { + diskName_ = getDefaultInstance().getDiskName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Specifies the disk name. If not specified, the default is to
+       * use the name of the instance.
+       * 
+ * + * optional string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for diskName to set. + * @return This builder for chaining. + */ + public Builder setDiskNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + diskName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList replicaZones_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReplicaZonesIsMutable() { + if (!replicaZones_.isModifiable()) { + replicaZones_ = new com.google.protobuf.LazyStringArrayList(replicaZones_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the replicaZones. + */ + public com.google.protobuf.ProtocolStringList getReplicaZonesList() { + replicaZones_.makeImmutable(); + return replicaZones_; + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of replicaZones. + */ + public int getReplicaZonesCount() { + return replicaZones_.size(); + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + public java.lang.String getReplicaZones(int index) { + return replicaZones_.get(index); + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + public com.google.protobuf.ByteString getReplicaZonesBytes(int index) { + return replicaZones_.getByteString(index); + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The replicaZones to set. + * @return This builder for chaining. + */ + public Builder setReplicaZones(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaZonesIsMutable(); + replicaZones_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The replicaZones to add. + * @return This builder for chaining. + */ + public Builder addReplicaZones(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaZonesIsMutable(); + replicaZones_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The replicaZones to add. + * @return This builder for chaining. + */ + public Builder addAllReplicaZones(java.lang.Iterable values) { + ensureReplicaZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, replicaZones_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReplicaZones() { + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. URL of the zone where the disk should be created.
+       * Required for each regional disk associated with the instance.
+       * 
+ * + * repeated string replica_zones = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the replicaZones to add. + * @return This builder for chaining. + */ + public Builder addReplicaZonesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReplicaZonesIsMutable(); + replicaZones_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams) + private static final com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams(); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InitializeParams 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.backupdr.v1beta.AttachedDisk.InitializeParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int INITIALIZE_PARAMS_FIELD_NUMBER = 1; + private com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initializeParams_; + + /** + * + * + *
+   * Optional. Specifies the parameters to initialize this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the initializeParams field is set. + */ + @java.lang.Override + public boolean hasInitializeParams() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the parameters to initialize this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The initializeParams. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams getInitializeParams() { + return initializeParams_ == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.getDefaultInstance() + : initializeParams_; + } + + /** + * + * + *
+   * Optional. Specifies the parameters to initialize this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParamsOrBuilder + getInitializeParamsOrBuilder() { + return initializeParams_ == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.getDefaultInstance() + : initializeParams_; + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object deviceName_ = ""; + + /** + * + * + *
+   * Optional. This is used as an identifier for the disks. This is the unique
+   * name has to provided to modify disk parameters like disk_name and
+   * replica_zones (in case of RePDs)
+   * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the deviceName field is set. + */ + @java.lang.Override + public boolean hasDeviceName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. This is used as an identifier for the disks. This is the unique
+   * name has to provided to modify disk parameters like disk_name and
+   * replica_zones (in case of RePDs)
+   * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deviceName. + */ + @java.lang.Override + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + 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(); + deviceName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. This is used as an identifier for the disks. This is the unique
+   * name has to provided to modify disk parameters like disk_name and
+   * replica_zones (in case of RePDs)
+   * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for deviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + + /** + * + * + *
+   * Optional. Type of the resource.
+   * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the kind field is set. + */ + @java.lang.Override + public boolean hasKind() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Type of the resource.
+   * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + 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(); + kind_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Type of the resource.
+   * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_TYPE_DEPRECATED_FIELD_NUMBER = 6; + private int diskTypeDeprecated_ = 0; + + /** + * + * + *
+   * Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return Whether the diskTypeDeprecated field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasDiskTypeDeprecated() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return The enum numeric value on the wire for diskTypeDeprecated. + */ + @java.lang.Override + @java.lang.Deprecated + public int getDiskTypeDeprecatedValue() { + return diskTypeDeprecated_; + } + + /** + * + * + *
+   * Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return The diskTypeDeprecated. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType getDiskTypeDeprecated() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType.forNumber(diskTypeDeprecated_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType.UNRECOGNIZED + : result; + } + + public static final int MODE_FIELD_NUMBER = 7; + private int mode_ = 0; + + /** + * + * + *
+   * Optional. The mode in which to attach this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mode field is set. + */ + @java.lang.Override + public boolean hasMode() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. The mode in which to attach this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + + /** + * + * + *
+   * Optional. The mode in which to attach this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode getMode() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode.forNumber(mode_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode.UNRECOGNIZED + : result; + } + + public static final int SOURCE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + + /** + * + * + *
+   * Optional. Specifies a valid partial or full URL to an existing Persistent
+   * Disk resource.
+   * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Specifies a valid partial or full URL to an existing Persistent
+   * Disk resource.
+   * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object 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(); + source_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Specifies a valid partial or full URL to an existing Persistent
+   * Disk resource.
+   * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDEX_FIELD_NUMBER = 9; + private long index_ = 0L; + + /** + * + * + *
+   * Optional. A zero-based index to this disk, where 0 is reserved for the
+   * boot disk.
+   * 
+ * + * optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the index field is set. + */ + @java.lang.Override + public boolean hasIndex() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. A zero-based index to this disk, where 0 is reserved for the
+   * boot disk.
+   * 
+ * + * optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The index. + */ + @java.lang.Override + public long getIndex() { + return index_; + } + + public static final int BOOT_FIELD_NUMBER = 10; + private boolean boot_ = false; + + /** + * + * + *
+   * Optional. Indicates that this is a boot disk. The virtual machine will use
+   * the first partition of the disk for its root filesystem.
+   * 
+ * + * optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the boot field is set. + */ + @java.lang.Override + public boolean hasBoot() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. Indicates that this is a boot disk. The virtual machine will use
+   * the first partition of the disk for its root filesystem.
+   * 
+ * + * optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + + public static final int AUTO_DELETE_FIELD_NUMBER = 11; + private boolean autoDelete_ = false; + + /** + * + * + *
+   * Optional. Specifies whether the disk will be auto-deleted when the instance
+   * is deleted (but not when the disk is detached from the instance).
+   * 
+ * + * optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the autoDelete field is set. + */ + @java.lang.Override + public boolean hasAutoDelete() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. Specifies whether the disk will be auto-deleted when the instance
+   * is deleted (but not when the disk is detached from the instance).
+   * 
+ * + * optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + + public static final int LICENSE_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList license_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Any valid publicly visible licenses.
+   * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the license. + */ + public com.google.protobuf.ProtocolStringList getLicenseList() { + return license_; + } + + /** + * + * + *
+   * Optional. Any valid publicly visible licenses.
+   * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of license. + */ + public int getLicenseCount() { + return license_.size(); + } + + /** + * + * + *
+   * Optional. Any valid publicly visible licenses.
+   * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The license at the given index. + */ + public java.lang.String getLicense(int index) { + return license_.get(index); + } + + /** + * + * + *
+   * Optional. Any valid publicly visible licenses.
+   * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the license at the given index. + */ + public com.google.protobuf.ByteString getLicenseBytes(int index) { + return license_.getByteString(index); + } + + public static final int DISK_INTERFACE_FIELD_NUMBER = 13; + private int diskInterface_ = 0; + + /** + * + * + *
+   * Optional. Specifies the disk interface to use for attaching this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskInterface field is set. + */ + @java.lang.Override + public boolean hasDiskInterface() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the disk interface to use for attaching this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for diskInterface. + */ + @java.lang.Override + public int getDiskInterfaceValue() { + return diskInterface_; + } + + /** + * + * + *
+   * Optional. Specifies the disk interface to use for attaching this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskInterface. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface getDiskInterface() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface.forNumber(diskInterface_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface.UNRECOGNIZED + : result; + } + + public static final int GUEST_OS_FEATURE_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List guestOsFeature_; + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getGuestOsFeatureList() { + return guestOsFeature_; + } + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getGuestOsFeatureOrBuilderList() { + return guestOsFeature_; + } + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getGuestOsFeatureCount() { + return guestOsFeature_.size(); + } + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index) { + return guestOsFeature_.get(index); + } + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder( + int index) { + return guestOsFeature_.get(index); + } + + public static final int DISK_ENCRYPTION_KEY_FIELD_NUMBER = 15; + private com.google.cloud.backupdr.v1beta.CustomerEncryptionKey diskEncryptionKey_; + + /** + * + * + *
+   * Optional. Encrypts or decrypts a disk using a customer-supplied
+   * encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskEncryptionKey field is set. + */ + @java.lang.Override + public boolean hasDiskEncryptionKey() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+   * Optional. Encrypts or decrypts a disk using a customer-supplied
+   * encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskEncryptionKey. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getDiskEncryptionKey() { + return diskEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : diskEncryptionKey_; + } + + /** + * + * + *
+   * Optional. Encrypts or decrypts a disk using a customer-supplied
+   * encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder + getDiskEncryptionKeyOrBuilder() { + return diskEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : diskEncryptionKey_; + } + + public static final int DISK_SIZE_GB_FIELD_NUMBER = 16; + private long diskSizeGb_ = 0L; + + /** + * + * + *
+   * Optional. The size of the disk in GB.
+   * 
+ * + * optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the diskSizeGb field is set. + */ + @java.lang.Override + public boolean hasDiskSizeGb() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+   * Optional. The size of the disk in GB.
+   * 
+ * + * optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + + public static final int SAVED_STATE_FIELD_NUMBER = 17; + private int savedState_ = 0; + + /** + * + * + *
+   * Optional. Output only. The state of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the savedState field is set. + */ + @java.lang.Override + public boolean hasSavedState() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+   * Optional. Output only. The state of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for savedState. + */ + @java.lang.Override + public int getSavedStateValue() { + return savedState_; + } + + /** + * + * + *
+   * Optional. Output only. The state of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The savedState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState getSavedState() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState.forNumber(savedState_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState.UNRECOGNIZED + : result; + } + + public static final int DISK_TYPE_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object diskType_ = ""; + + /** + * + * + *
+   * Optional. Output only. The URI of the disk type resource. For example:
+   * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+   * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the diskType field is set. + */ + @java.lang.Override + public boolean hasDiskType() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+   * Optional. Output only. The URI of the disk type resource. For example:
+   * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+   * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The diskType. + */ + @java.lang.Override + public java.lang.String getDiskType() { + java.lang.Object ref = diskType_; + 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(); + diskType_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Output only. The URI of the disk type resource. For example:
+   * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+   * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for diskType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDiskTypeBytes() { + java.lang.Object ref = diskType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 19; + private int type_ = 0; + + /** + * + * + *
+   * Optional. Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Optional. Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType getType() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInitializeParams()); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, deviceName_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, kind_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeEnum(6, diskTypeDeprecated_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeEnum(7, mode_); + } + if (((bitField0_ & 0x00000020) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, source_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeInt64(9, index_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeBool(10, boot_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeBool(11, autoDelete_); + } + for (int i = 0; i < license_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, license_.getRaw(i)); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeEnum(13, diskInterface_); + } + for (int i = 0; i < guestOsFeature_.size(); i++) { + output.writeMessage(14, guestOsFeature_.get(i)); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(15, getDiskEncryptionKey()); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeInt64(16, diskSizeGb_); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeEnum(17, savedState_); + } + if (((bitField0_ & 0x00002000) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 18, diskType_); + } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeEnum(19, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInitializeParams()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, deviceName_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, kind_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, diskTypeDeprecated_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, mode_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, source_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, index_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, boot_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, autoDelete_); + } + { + int dataSize = 0; + for (int i = 0; i < license_.size(); i++) { + dataSize += computeStringSizeNoTag(license_.getRaw(i)); + } + size += dataSize; + size += 1 * getLicenseList().size(); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, diskInterface_); + } + for (int i = 0; i < guestOsFeature_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, guestOsFeature_.get(i)); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getDiskEncryptionKey()); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(16, diskSizeGb_); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, savedState_); + } + if (((bitField0_ & 0x00002000) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(18, diskType_); + } + if (((bitField0_ & 0x00004000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, type_); + } + 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.backupdr.v1beta.AttachedDisk)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AttachedDisk other = + (com.google.cloud.backupdr.v1beta.AttachedDisk) obj; + + if (hasInitializeParams() != other.hasInitializeParams()) return false; + if (hasInitializeParams()) { + if (!getInitializeParams().equals(other.getInitializeParams())) return false; + } + if (hasDeviceName() != other.hasDeviceName()) return false; + if (hasDeviceName()) { + if (!getDeviceName().equals(other.getDeviceName())) return false; + } + if (hasKind() != other.hasKind()) return false; + if (hasKind()) { + if (!getKind().equals(other.getKind())) return false; + } + if (hasDiskTypeDeprecated() != other.hasDiskTypeDeprecated()) return false; + if (hasDiskTypeDeprecated()) { + if (diskTypeDeprecated_ != other.diskTypeDeprecated_) return false; + } + if (hasMode() != other.hasMode()) return false; + if (hasMode()) { + if (mode_ != other.mode_) return false; + } + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) return false; + } + if (hasIndex() != other.hasIndex()) return false; + if (hasIndex()) { + if (getIndex() != other.getIndex()) return false; + } + if (hasBoot() != other.hasBoot()) return false; + if (hasBoot()) { + if (getBoot() != other.getBoot()) return false; + } + if (hasAutoDelete() != other.hasAutoDelete()) return false; + if (hasAutoDelete()) { + if (getAutoDelete() != other.getAutoDelete()) return false; + } + if (!getLicenseList().equals(other.getLicenseList())) return false; + if (hasDiskInterface() != other.hasDiskInterface()) return false; + if (hasDiskInterface()) { + if (diskInterface_ != other.diskInterface_) return false; + } + if (!getGuestOsFeatureList().equals(other.getGuestOsFeatureList())) return false; + if (hasDiskEncryptionKey() != other.hasDiskEncryptionKey()) return false; + if (hasDiskEncryptionKey()) { + if (!getDiskEncryptionKey().equals(other.getDiskEncryptionKey())) return false; + } + if (hasDiskSizeGb() != other.hasDiskSizeGb()) return false; + if (hasDiskSizeGb()) { + if (getDiskSizeGb() != other.getDiskSizeGb()) return false; + } + if (hasSavedState() != other.hasSavedState()) return false; + if (hasSavedState()) { + if (savedState_ != other.savedState_) return false; + } + if (hasDiskType() != other.hasDiskType()) return false; + if (hasDiskType()) { + if (!getDiskType().equals(other.getDiskType())) return false; + } + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (type_ != other.type_) 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 (hasInitializeParams()) { + hash = (37 * hash) + INITIALIZE_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getInitializeParams().hashCode(); + } + if (hasDeviceName()) { + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + } + if (hasKind()) { + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + } + if (hasDiskTypeDeprecated()) { + hash = (37 * hash) + DISK_TYPE_DEPRECATED_FIELD_NUMBER; + hash = (53 * hash) + diskTypeDeprecated_; + } + if (hasMode()) { + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + } + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + if (hasIndex()) { + hash = (37 * hash) + INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIndex()); + } + if (hasBoot()) { + hash = (37 * hash) + BOOT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoot()); + } + if (hasAutoDelete()) { + hash = (37 * hash) + AUTO_DELETE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoDelete()); + } + if (getLicenseCount() > 0) { + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicenseList().hashCode(); + } + if (hasDiskInterface()) { + hash = (37 * hash) + DISK_INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + diskInterface_; + } + if (getGuestOsFeatureCount() > 0) { + hash = (37 * hash) + GUEST_OS_FEATURE_FIELD_NUMBER; + hash = (53 * hash) + getGuestOsFeatureList().hashCode(); + } + if (hasDiskEncryptionKey()) { + hash = (37 * hash) + DISK_ENCRYPTION_KEY_FIELD_NUMBER; + hash = (53 * hash) + getDiskEncryptionKey().hashCode(); + } + if (hasDiskSizeGb()) { + hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeGb()); + } + if (hasSavedState()) { + hash = (37 * hash) + SAVED_STATE_FIELD_NUMBER; + hash = (53 * hash) + savedState_; + } + if (hasDiskType()) { + hash = (37 * hash) + DISK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getDiskType().hashCode(); + } + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk 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.backupdr.v1beta.AttachedDisk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk 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.backupdr.v1beta.AttachedDisk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AttachedDisk 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An instance-attached disk resource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AttachedDisk} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AttachedDisk) + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AttachedDisk.class, + com.google.cloud.backupdr.v1beta.AttachedDisk.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AttachedDisk.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInitializeParamsFieldBuilder(); + internalGetGuestOsFeatureFieldBuilder(); + internalGetDiskEncryptionKeyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + initializeParams_ = null; + if (initializeParamsBuilder_ != null) { + initializeParamsBuilder_.dispose(); + initializeParamsBuilder_ = null; + } + deviceName_ = ""; + kind_ = ""; + diskTypeDeprecated_ = 0; + mode_ = 0; + source_ = ""; + index_ = 0L; + boot_ = false; + autoDelete_ = false; + license_ = com.google.protobuf.LazyStringArrayList.emptyList(); + diskInterface_ = 0; + if (guestOsFeatureBuilder_ == null) { + guestOsFeature_ = java.util.Collections.emptyList(); + } else { + guestOsFeature_ = null; + guestOsFeatureBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + diskEncryptionKey_ = null; + if (diskEncryptionKeyBuilder_ != null) { + diskEncryptionKeyBuilder_.dispose(); + diskEncryptionKeyBuilder_ = null; + } + diskSizeGb_ = 0L; + savedState_ = 0; + diskType_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_AttachedDisk_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AttachedDisk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk build() { + com.google.cloud.backupdr.v1beta.AttachedDisk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk buildPartial() { + com.google.cloud.backupdr.v1beta.AttachedDisk result = + new com.google.cloud.backupdr.v1beta.AttachedDisk(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.backupdr.v1beta.AttachedDisk result) { + if (guestOsFeatureBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + guestOsFeature_ = java.util.Collections.unmodifiableList(guestOsFeature_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.guestOsFeature_ = guestOsFeature_; + } else { + result.guestOsFeature_ = guestOsFeatureBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AttachedDisk result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.initializeParams_ = + initializeParamsBuilder_ == null ? initializeParams_ : initializeParamsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deviceName_ = deviceName_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kind_ = kind_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.diskTypeDeprecated_ = diskTypeDeprecated_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.mode_ = mode_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.source_ = source_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.index_ = index_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.boot_ = boot_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.autoDelete_ = autoDelete_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + license_.makeImmutable(); + result.license_ = license_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.diskInterface_ = diskInterface_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.diskEncryptionKey_ = + diskEncryptionKeyBuilder_ == null + ? diskEncryptionKey_ + : diskEncryptionKeyBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.diskSizeGb_ = diskSizeGb_; + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.savedState_ = savedState_; + to_bitField0_ |= 0x00001000; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.diskType_ = diskType_; + to_bitField0_ |= 0x00002000; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00004000; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AttachedDisk) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AttachedDisk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AttachedDisk other) { + if (other == com.google.cloud.backupdr.v1beta.AttachedDisk.getDefaultInstance()) return this; + if (other.hasInitializeParams()) { + mergeInitializeParams(other.getInitializeParams()); + } + if (other.hasDeviceName()) { + deviceName_ = other.deviceName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasKind()) { + kind_ = other.kind_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasDiskTypeDeprecated()) { + setDiskTypeDeprecatedValue(other.getDiskTypeDeprecatedValue()); + } + if (other.hasMode()) { + setModeValue(other.getModeValue()); + } + if (other.hasSource()) { + source_ = other.source_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasIndex()) { + setIndex(other.getIndex()); + } + if (other.hasBoot()) { + setBoot(other.getBoot()); + } + if (other.hasAutoDelete()) { + setAutoDelete(other.getAutoDelete()); + } + if (!other.license_.isEmpty()) { + if (license_.isEmpty()) { + license_ = other.license_; + bitField0_ |= 0x00000200; + } else { + ensureLicenseIsMutable(); + license_.addAll(other.license_); + } + onChanged(); + } + if (other.hasDiskInterface()) { + setDiskInterfaceValue(other.getDiskInterfaceValue()); + } + if (guestOsFeatureBuilder_ == null) { + if (!other.guestOsFeature_.isEmpty()) { + if (guestOsFeature_.isEmpty()) { + guestOsFeature_ = other.guestOsFeature_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.addAll(other.guestOsFeature_); + } + onChanged(); + } + } else { + if (!other.guestOsFeature_.isEmpty()) { + if (guestOsFeatureBuilder_.isEmpty()) { + guestOsFeatureBuilder_.dispose(); + guestOsFeatureBuilder_ = null; + guestOsFeature_ = other.guestOsFeature_; + bitField0_ = (bitField0_ & ~0x00000800); + guestOsFeatureBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGuestOsFeatureFieldBuilder() + : null; + } else { + guestOsFeatureBuilder_.addAllMessages(other.guestOsFeature_); + } + } + } + if (other.hasDiskEncryptionKey()) { + mergeDiskEncryptionKey(other.getDiskEncryptionKey()); + } + if (other.hasDiskSizeGb()) { + setDiskSizeGb(other.getDiskSizeGb()); + } + if (other.hasSavedState()) { + setSavedStateValue(other.getSavedStateValue()); + } + if (other.hasDiskType()) { + diskType_ = other.diskType_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.hasType()) { + setTypeValue(other.getTypeValue()); + } + 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( + internalGetInitializeParamsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 34: + { + deviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + case 42: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 48: + { + diskTypeDeprecated_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 48 + case 56: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 56 + case 66: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 72: + { + index_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 72 + case 80: + { + boot_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 80 + case 88: + { + autoDelete_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 88 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicenseIsMutable(); + license_.add(s); + break; + } // case 98 + case 104: + { + diskInterface_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 104 + case 114: + { + com.google.cloud.backupdr.v1beta.GuestOsFeature m = + input.readMessage( + com.google.cloud.backupdr.v1beta.GuestOsFeature.parser(), + extensionRegistry); + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(m); + } else { + guestOsFeatureBuilder_.addMessage(m); + } + break; + } // case 114 + case 122: + { + input.readMessage( + internalGetDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 122 + case 128: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00002000; + break; + } // case 128 + case 136: + { + savedState_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 136 + case 146: + { + diskType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 146 + case 152: + { + type_ = input.readEnum(); + bitField0_ |= 0x00010000; + break; + } // case 152 + 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.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initializeParams_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams, + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.Builder, + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParamsOrBuilder> + initializeParamsBuilder_; + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the initializeParams field is set. + */ + public boolean hasInitializeParams() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The initializeParams. + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams getInitializeParams() { + if (initializeParamsBuilder_ == null) { + return initializeParams_ == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.getDefaultInstance() + : initializeParams_; + } else { + return initializeParamsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInitializeParams( + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams value) { + if (initializeParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + initializeParams_ = value; + } else { + initializeParamsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInitializeParams( + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.Builder builderForValue) { + if (initializeParamsBuilder_ == null) { + initializeParams_ = builderForValue.build(); + } else { + initializeParamsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInitializeParams( + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams value) { + if (initializeParamsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && initializeParams_ != null + && initializeParams_ + != com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams + .getDefaultInstance()) { + getInitializeParamsBuilder().mergeFrom(value); + } else { + initializeParams_ = value; + } + } else { + initializeParamsBuilder_.mergeFrom(value); + } + if (initializeParams_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInitializeParams() { + bitField0_ = (bitField0_ & ~0x00000001); + initializeParams_ = null; + if (initializeParamsBuilder_ != null) { + initializeParamsBuilder_.dispose(); + initializeParamsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.Builder + getInitializeParamsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetInitializeParamsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParamsOrBuilder + getInitializeParamsOrBuilder() { + if (initializeParamsBuilder_ != null) { + return initializeParamsBuilder_.getMessageOrBuilder(); + } else { + return initializeParams_ == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.getDefaultInstance() + : initializeParams_; + } + } + + /** + * + * + *
+     * Optional. Specifies the parameters to initialize this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams, + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.Builder, + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParamsOrBuilder> + internalGetInitializeParamsFieldBuilder() { + if (initializeParamsBuilder_ == null) { + initializeParamsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams, + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams.Builder, + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParamsOrBuilder>( + getInitializeParams(), getParentForChildren(), isClean()); + initializeParams_ = null; + } + return initializeParamsBuilder_; + } + + private java.lang.Object deviceName_ = ""; + + /** + * + * + *
+     * Optional. This is used as an identifier for the disks. This is the unique
+     * name has to provided to modify disk parameters like disk_name and
+     * replica_zones (in case of RePDs)
+     * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the deviceName field is set. + */ + public boolean hasDeviceName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. This is used as an identifier for the disks. This is the unique
+     * name has to provided to modify disk parameters like disk_name and
+     * replica_zones (in case of RePDs)
+     * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deviceName. + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. This is used as an identifier for the disks. This is the unique
+     * name has to provided to modify disk parameters like disk_name and
+     * replica_zones (in case of RePDs)
+     * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for deviceName. + */ + public com.google.protobuf.ByteString getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. This is used as an identifier for the disks. This is the unique
+     * name has to provided to modify disk parameters like disk_name and
+     * replica_zones (in case of RePDs)
+     * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deviceName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This is used as an identifier for the disks. This is the unique
+     * name has to provided to modify disk parameters like disk_name and
+     * replica_zones (in case of RePDs)
+     * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDeviceName() { + deviceName_ = getDefaultInstance().getDeviceName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This is used as an identifier for the disks. This is the unique
+     * name has to provided to modify disk parameters like disk_name and
+     * replica_zones (in case of RePDs)
+     * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for deviceName to set. + * @return This builder for chaining. + */ + public Builder setDeviceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deviceName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + + /** + * + * + *
+     * Optional. Type of the resource.
+     * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the kind field is set. + */ + public boolean hasKind() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Type of the resource.
+     * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Type of the resource.
+     * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Type of the resource.
+     * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Type of the resource.
+     * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Type of the resource.
+     * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int diskTypeDeprecated_ = 0; + + /** + * + * + *
+     * Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return Whether the diskTypeDeprecated field is set. + */ + @java.lang.Override + @java.lang.Deprecated + public boolean hasDiskTypeDeprecated() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return The enum numeric value on the wire for diskTypeDeprecated. + */ + @java.lang.Override + @java.lang.Deprecated + public int getDiskTypeDeprecatedValue() { + return diskTypeDeprecated_; + } + + /** + * + * + *
+     * Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @param value The enum numeric value on the wire for diskTypeDeprecated to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setDiskTypeDeprecatedValue(int value) { + diskTypeDeprecated_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return The diskTypeDeprecated. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType getDiskTypeDeprecated() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType.forNumber(diskTypeDeprecated_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @param value The diskTypeDeprecated to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setDiskTypeDeprecated( + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + diskTypeDeprecated_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearDiskTypeDeprecated() { + bitField0_ = (bitField0_ & ~0x00000008); + diskTypeDeprecated_ = 0; + onChanged(); + return this; + } + + private int mode_ = 0; + + /** + * + * + *
+     * Optional. The mode in which to attach this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mode field is set. + */ + @java.lang.Override + public boolean hasMode() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The mode in which to attach this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + + /** + * + * + *
+     * Optional. The mode in which to attach this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The mode in which to attach this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode getMode() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode.forNumber(mode_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The mode in which to attach this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + mode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The mode in which to attach this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000010); + mode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object source_ = ""; + + /** + * + * + *
+     * Optional. Specifies a valid partial or full URL to an existing Persistent
+     * Disk resource.
+     * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. Specifies a valid partial or full URL to an existing Persistent
+     * Disk resource.
+     * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Specifies a valid partial or full URL to an existing Persistent
+     * Disk resource.
+     * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Specifies a valid partial or full URL to an existing Persistent
+     * Disk resource.
+     * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies a valid partial or full URL to an existing Persistent
+     * Disk resource.
+     * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies a valid partial or full URL to an existing Persistent
+     * Disk resource.
+     * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private long index_; + + /** + * + * + *
+     * Optional. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk.
+     * 
+ * + * optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the index field is set. + */ + @java.lang.Override + public boolean hasIndex() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk.
+     * 
+ * + * optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The index. + */ + @java.lang.Override + public long getIndex() { + return index_; + } + + /** + * + * + *
+     * Optional. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk.
+     * 
+ * + * optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(long value) { + + index_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A zero-based index to this disk, where 0 is reserved for the
+     * boot disk.
+     * 
+ * + * optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000040); + index_ = 0L; + onChanged(); + return this; + } + + private boolean boot_; + + /** + * + * + *
+     * Optional. Indicates that this is a boot disk. The virtual machine will use
+     * the first partition of the disk for its root filesystem.
+     * 
+ * + * optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the boot field is set. + */ + @java.lang.Override + public boolean hasBoot() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. Indicates that this is a boot disk. The virtual machine will use
+     * the first partition of the disk for its root filesystem.
+     * 
+ * + * optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boot. + */ + @java.lang.Override + public boolean getBoot() { + return boot_; + } + + /** + * + * + *
+     * Optional. Indicates that this is a boot disk. The virtual machine will use
+     * the first partition of the disk for its root filesystem.
+     * 
+ * + * optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The boot to set. + * @return This builder for chaining. + */ + public Builder setBoot(boolean value) { + + boot_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates that this is a boot disk. The virtual machine will use
+     * the first partition of the disk for its root filesystem.
+     * 
+ * + * optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBoot() { + bitField0_ = (bitField0_ & ~0x00000080); + boot_ = false; + onChanged(); + return this; + } + + private boolean autoDelete_; + + /** + * + * + *
+     * Optional. Specifies whether the disk will be auto-deleted when the instance
+     * is deleted (but not when the disk is detached from the instance).
+     * 
+ * + * optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the autoDelete field is set. + */ + @java.lang.Override + public boolean hasAutoDelete() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. Specifies whether the disk will be auto-deleted when the instance
+     * is deleted (but not when the disk is detached from the instance).
+     * 
+ * + * optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoDelete. + */ + @java.lang.Override + public boolean getAutoDelete() { + return autoDelete_; + } + + /** + * + * + *
+     * Optional. Specifies whether the disk will be auto-deleted when the instance
+     * is deleted (but not when the disk is detached from the instance).
+     * 
+ * + * optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The autoDelete to set. + * @return This builder for chaining. + */ + public Builder setAutoDelete(boolean value) { + + autoDelete_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies whether the disk will be auto-deleted when the instance
+     * is deleted (but not when the disk is detached from the instance).
+     * 
+ * + * optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAutoDelete() { + bitField0_ = (bitField0_ & ~0x00000100); + autoDelete_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList license_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLicenseIsMutable() { + if (!license_.isModifiable()) { + license_ = new com.google.protobuf.LazyStringArrayList(license_); + } + bitField0_ |= 0x00000200; + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the license. + */ + public com.google.protobuf.ProtocolStringList getLicenseList() { + license_.makeImmutable(); + return license_; + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of license. + */ + public int getLicenseCount() { + return license_.size(); + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The license at the given index. + */ + public java.lang.String getLicense(int index) { + return license_.get(index); + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the license at the given index. + */ + public com.google.protobuf.ByteString getLicenseBytes(int index) { + return license_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The license to set. + * @return This builder for chaining. + */ + public Builder setLicense(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicenseIsMutable(); + license_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The license to add. + * @return This builder for chaining. + */ + public Builder addLicense(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicenseIsMutable(); + license_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The license to add. + * @return This builder for chaining. + */ + public Builder addAllLicense(java.lang.Iterable values) { + ensureLicenseIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, license_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLicense() { + license_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Any valid publicly visible licenses.
+     * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the license to add. + * @return This builder for chaining. + */ + public Builder addLicenseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLicenseIsMutable(); + license_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private int diskInterface_ = 0; + + /** + * + * + *
+     * Optional. Specifies the disk interface to use for attaching this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskInterface field is set. + */ + @java.lang.Override + public boolean hasDiskInterface() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the disk interface to use for attaching this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for diskInterface. + */ + @java.lang.Override + public int getDiskInterfaceValue() { + return diskInterface_; + } + + /** + * + * + *
+     * Optional. Specifies the disk interface to use for attaching this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for diskInterface to set. + * @return This builder for chaining. + */ + public Builder setDiskInterfaceValue(int value) { + diskInterface_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the disk interface to use for attaching this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskInterface. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface getDiskInterface() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface.forNumber(diskInterface_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies the disk interface to use for attaching this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The diskInterface to set. + * @return This builder for chaining. + */ + public Builder setDiskInterface( + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + diskInterface_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the disk interface to use for attaching this disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDiskInterface() { + bitField0_ = (bitField0_ & ~0x00000400); + diskInterface_ = 0; + onChanged(); + return this; + } + + private java.util.List guestOsFeature_ = + java.util.Collections.emptyList(); + + private void ensureGuestOsFeatureIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + guestOsFeature_ = + new java.util.ArrayList( + guestOsFeature_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder> + guestOsFeatureBuilder_; + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getGuestOsFeatureList() { + if (guestOsFeatureBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestOsFeature_); + } else { + return guestOsFeatureBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getGuestOsFeatureCount() { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.size(); + } else { + return guestOsFeatureBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index) { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.get(index); + } else { + return guestOsFeatureBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.set(index, value); + onChanged(); + } else { + guestOsFeatureBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.set(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestOsFeature(com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(value); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(index, value); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestOsFeature( + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllGuestOsFeature( + java.lang.Iterable values) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeature_); + onChanged(); + } else { + guestOsFeatureBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGuestOsFeature() { + if (guestOsFeatureBuilder_ == null) { + guestOsFeature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + guestOsFeatureBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeGuestOsFeature(int index) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.remove(index); + onChanged(); + } else { + guestOsFeatureBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder getGuestOsFeatureBuilder( + int index) { + return internalGetGuestOsFeatureFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder( + int index) { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.get(index); + } else { + return guestOsFeatureBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGuestOsFeatureOrBuilderList() { + if (guestOsFeatureBuilder_ != null) { + return guestOsFeatureBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestOsFeature_); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder addGuestOsFeatureBuilder() { + return internalGetGuestOsFeatureFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.GuestOsFeature.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder addGuestOsFeatureBuilder( + int index) { + return internalGetGuestOsFeatureFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.GuestOsFeature.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of features to enable on the guest operating system.
+     * Applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGuestOsFeatureBuilderList() { + return internalGetGuestOsFeatureFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder> + internalGetGuestOsFeatureFieldBuilder() { + if (guestOsFeatureBuilder_ == null) { + guestOsFeatureBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder>( + guestOsFeature_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + guestOsFeature_ = null; + } + return guestOsFeatureBuilder_; + } + + private com.google.cloud.backupdr.v1beta.CustomerEncryptionKey diskEncryptionKey_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder> + diskEncryptionKeyBuilder_; + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskEncryptionKey field is set. + */ + public boolean hasDiskEncryptionKey() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskEncryptionKey. + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getDiskEncryptionKey() { + if (diskEncryptionKeyBuilder_ == null) { + return diskEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : diskEncryptionKey_; + } else { + return diskEncryptionKeyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDiskEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey value) { + if (diskEncryptionKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diskEncryptionKey_ = value; + } else { + diskEncryptionKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDiskEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder builderForValue) { + if (diskEncryptionKeyBuilder_ == null) { + diskEncryptionKey_ = builderForValue.build(); + } else { + diskEncryptionKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDiskEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey value) { + if (diskEncryptionKeyBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && diskEncryptionKey_ != null + && diskEncryptionKey_ + != com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance()) { + getDiskEncryptionKeyBuilder().mergeFrom(value); + } else { + diskEncryptionKey_ = value; + } + } else { + diskEncryptionKeyBuilder_.mergeFrom(value); + } + if (diskEncryptionKey_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDiskEncryptionKey() { + bitField0_ = (bitField0_ & ~0x00001000); + diskEncryptionKey_ = null; + if (diskEncryptionKeyBuilder_ != null) { + diskEncryptionKeyBuilder_.dispose(); + diskEncryptionKeyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder + getDiskEncryptionKeyBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetDiskEncryptionKeyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder + getDiskEncryptionKeyOrBuilder() { + if (diskEncryptionKeyBuilder_ != null) { + return diskEncryptionKeyBuilder_.getMessageOrBuilder(); + } else { + return diskEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : diskEncryptionKey_; + } + } + + /** + * + * + *
+     * Optional. Encrypts or decrypts a disk using a customer-supplied
+     * encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder> + internalGetDiskEncryptionKeyFieldBuilder() { + if (diskEncryptionKeyBuilder_ == null) { + diskEncryptionKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder>( + getDiskEncryptionKey(), getParentForChildren(), isClean()); + diskEncryptionKey_ = null; + } + return diskEncryptionKeyBuilder_; + } + + private long diskSizeGb_; + + /** + * + * + *
+     * Optional. The size of the disk in GB.
+     * 
+ * + * optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the diskSizeGb field is set. + */ + @java.lang.Override + public boolean hasDiskSizeGb() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+     * Optional. The size of the disk in GB.
+     * 
+ * + * optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public long getDiskSizeGb() { + return diskSizeGb_; + } + + /** + * + * + *
+     * Optional. The size of the disk in GB.
+     * 
+ * + * optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The diskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setDiskSizeGb(long value) { + + diskSizeGb_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The size of the disk in GB.
+     * 
+ * + * optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDiskSizeGb() { + bitField0_ = (bitField0_ & ~0x00002000); + diskSizeGb_ = 0L; + onChanged(); + return this; + } + + private int savedState_ = 0; + + /** + * + * + *
+     * Optional. Output only. The state of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the savedState field is set. + */ + @java.lang.Override + public boolean hasSavedState() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+     * Optional. Output only. The state of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for savedState. + */ + @java.lang.Override + public int getSavedStateValue() { + return savedState_; + } + + /** + * + * + *
+     * Optional. Output only. The state of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for savedState to set. + * @return This builder for chaining. + */ + public Builder setSavedStateValue(int value) { + savedState_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The state of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The savedState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState getSavedState() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState.forNumber(savedState_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Output only. The state of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The savedState to set. + * @return This builder for chaining. + */ + public Builder setSavedState( + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + savedState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The state of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSavedState() { + bitField0_ = (bitField0_ & ~0x00004000); + savedState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object diskType_ = ""; + + /** + * + * + *
+     * Optional. Output only. The URI of the disk type resource. For example:
+     * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+     * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the diskType field is set. + */ + public boolean hasDiskType() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+     * Optional. Output only. The URI of the disk type resource. For example:
+     * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+     * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The diskType. + */ + public java.lang.String getDiskType() { + java.lang.Object ref = diskType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diskType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Output only. The URI of the disk type resource. For example:
+     * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+     * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for diskType. + */ + public com.google.protobuf.ByteString getDiskTypeBytes() { + java.lang.Object ref = diskType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + diskType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Output only. The URI of the disk type resource. For example:
+     * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+     * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The diskType to set. + * @return This builder for chaining. + */ + public Builder setDiskType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + diskType_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The URI of the disk type resource. For example:
+     * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+     * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDiskType() { + diskType_ = getDefaultInstance().getDiskType(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The URI of the disk type resource. For example:
+     * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+     * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for diskType to set. + * @return This builder for chaining. + */ + public Builder setDiskTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + diskType_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private int type_ = 0; + + /** + * + * + *
+     * Optional. Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00010000) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Optional. Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType getType() { + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType result = + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the type of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00010000); + type_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AttachedDisk) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AttachedDisk) + private static final com.google.cloud.backupdr.v1beta.AttachedDisk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AttachedDisk(); + } + + public static com.google.cloud.backupdr.v1beta.AttachedDisk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttachedDisk 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.backupdr.v1beta.AttachedDisk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AttachedDiskOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AttachedDiskOrBuilder.java new file mode 100644 index 000000000000..8b3b2197ad2d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AttachedDiskOrBuilder.java @@ -0,0 +1,761 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AttachedDiskOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AttachedDisk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Specifies the parameters to initialize this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the initializeParams field is set. + */ + boolean hasInitializeParams(); + + /** + * + * + *
+   * Optional. Specifies the parameters to initialize this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The initializeParams. + */ + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams getInitializeParams(); + + /** + * + * + *
+   * Optional. Specifies the parameters to initialize this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.InitializeParams initialize_params = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AttachedDisk.InitializeParamsOrBuilder + getInitializeParamsOrBuilder(); + + /** + * + * + *
+   * Optional. This is used as an identifier for the disks. This is the unique
+   * name has to provided to modify disk parameters like disk_name and
+   * replica_zones (in case of RePDs)
+   * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the deviceName field is set. + */ + boolean hasDeviceName(); + + /** + * + * + *
+   * Optional. This is used as an identifier for the disks. This is the unique
+   * name has to provided to modify disk parameters like disk_name and
+   * replica_zones (in case of RePDs)
+   * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deviceName. + */ + java.lang.String getDeviceName(); + + /** + * + * + *
+   * Optional. This is used as an identifier for the disks. This is the unique
+   * name has to provided to modify disk parameters like disk_name and
+   * replica_zones (in case of RePDs)
+   * 
+ * + * optional string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for deviceName. + */ + com.google.protobuf.ByteString getDeviceNameBytes(); + + /** + * + * + *
+   * Optional. Type of the resource.
+   * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the kind field is set. + */ + boolean hasKind(); + + /** + * + * + *
+   * Optional. Type of the resource.
+   * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kind. + */ + java.lang.String getKind(); + + /** + * + * + *
+   * Optional. Type of the resource.
+   * 
+ * + * optional string kind = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + /** + * + * + *
+   * Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return Whether the diskTypeDeprecated field is set. + */ + @java.lang.Deprecated + boolean hasDiskTypeDeprecated(); + + /** + * + * + *
+   * Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return The enum numeric value on the wire for diskTypeDeprecated. + */ + @java.lang.Deprecated + int getDiskTypeDeprecatedValue(); + + /** + * + * + *
+   * Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType disk_type_deprecated = 6 [deprecated = true]; + * + * + * @deprecated google.cloud.backupdr.v1beta.AttachedDisk.disk_type_deprecated is deprecated. See + * google/cloud/backupdr/v1beta/backupvault_gce.proto;l=910 + * @return The diskTypeDeprecated. + */ + @java.lang.Deprecated + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType getDiskTypeDeprecated(); + + /** + * + * + *
+   * Optional. The mode in which to attach this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mode field is set. + */ + boolean hasMode(); + + /** + * + * + *
+   * Optional. The mode in which to attach this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + + /** + * + * + *
+   * Optional. The mode in which to attach this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskMode mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskMode getMode(); + + /** + * + * + *
+   * Optional. Specifies a valid partial or full URL to an existing Persistent
+   * Disk resource.
+   * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the source field is set. + */ + boolean hasSource(); + + /** + * + * + *
+   * Optional. Specifies a valid partial or full URL to an existing Persistent
+   * Disk resource.
+   * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The source. + */ + java.lang.String getSource(); + + /** + * + * + *
+   * Optional. Specifies a valid partial or full URL to an existing Persistent
+   * Disk resource.
+   * 
+ * + * optional string source = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+   * Optional. A zero-based index to this disk, where 0 is reserved for the
+   * boot disk.
+   * 
+ * + * optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the index field is set. + */ + boolean hasIndex(); + + /** + * + * + *
+   * Optional. A zero-based index to this disk, where 0 is reserved for the
+   * boot disk.
+   * 
+ * + * optional int64 index = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The index. + */ + long getIndex(); + + /** + * + * + *
+   * Optional. Indicates that this is a boot disk. The virtual machine will use
+   * the first partition of the disk for its root filesystem.
+   * 
+ * + * optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the boot field is set. + */ + boolean hasBoot(); + + /** + * + * + *
+   * Optional. Indicates that this is a boot disk. The virtual machine will use
+   * the first partition of the disk for its root filesystem.
+   * 
+ * + * optional bool boot = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boot. + */ + boolean getBoot(); + + /** + * + * + *
+   * Optional. Specifies whether the disk will be auto-deleted when the instance
+   * is deleted (but not when the disk is detached from the instance).
+   * 
+ * + * optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the autoDelete field is set. + */ + boolean hasAutoDelete(); + + /** + * + * + *
+   * Optional. Specifies whether the disk will be auto-deleted when the instance
+   * is deleted (but not when the disk is detached from the instance).
+   * 
+ * + * optional bool auto_delete = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoDelete. + */ + boolean getAutoDelete(); + + /** + * + * + *
+   * Optional. Any valid publicly visible licenses.
+   * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the license. + */ + java.util.List getLicenseList(); + + /** + * + * + *
+   * Optional. Any valid publicly visible licenses.
+   * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of license. + */ + int getLicenseCount(); + + /** + * + * + *
+   * Optional. Any valid publicly visible licenses.
+   * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The license at the given index. + */ + java.lang.String getLicense(int index); + + /** + * + * + *
+   * Optional. Any valid publicly visible licenses.
+   * 
+ * + * repeated string license = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the license at the given index. + */ + com.google.protobuf.ByteString getLicenseBytes(int index); + + /** + * + * + *
+   * Optional. Specifies the disk interface to use for attaching this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskInterface field is set. + */ + boolean hasDiskInterface(); + + /** + * + * + *
+   * Optional. Specifies the disk interface to use for attaching this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for diskInterface. + */ + int getDiskInterfaceValue(); + + /** + * + * + *
+   * Optional. Specifies the disk interface to use for attaching this disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface disk_interface = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskInterface. + */ + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterface getDiskInterface(); + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getGuestOsFeatureList(); + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index); + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getGuestOsFeatureCount(); + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getGuestOsFeatureOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of features to enable on the guest operating system.
+   * Applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder(int index); + + /** + * + * + *
+   * Optional. Encrypts or decrypts a disk using a customer-supplied
+   * encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskEncryptionKey field is set. + */ + boolean hasDiskEncryptionKey(); + + /** + * + * + *
+   * Optional. Encrypts or decrypts a disk using a customer-supplied
+   * encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskEncryptionKey. + */ + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getDiskEncryptionKey(); + + /** + * + * + *
+   * Optional. Encrypts or decrypts a disk using a customer-supplied
+   * encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder getDiskEncryptionKeyOrBuilder(); + + /** + * + * + *
+   * Optional. The size of the disk in GB.
+   * 
+ * + * optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the diskSizeGb field is set. + */ + boolean hasDiskSizeGb(); + + /** + * + * + *
+   * Optional. The size of the disk in GB.
+   * 
+ * + * optional int64 disk_size_gb = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + long getDiskSizeGb(); + + /** + * + * + *
+   * Optional. Output only. The state of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the savedState field is set. + */ + boolean hasSavedState(); + + /** + * + * + *
+   * Optional. Output only. The state of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for savedState. + */ + int getSavedStateValue(); + + /** + * + * + *
+   * Optional. Output only. The state of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState saved_state = 17 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The savedState. + */ + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskSavedState getSavedState(); + + /** + * + * + *
+   * Optional. Output only. The URI of the disk type resource. For example:
+   * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+   * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the diskType field is set. + */ + boolean hasDiskType(); + + /** + * + * + *
+   * Optional. Output only. The URI of the disk type resource. For example:
+   * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+   * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The diskType. + */ + java.lang.String getDiskType(); + + /** + * + * + *
+   * Optional. Output only. The URI of the disk type resource. For example:
+   * projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
+   * 
+ * + * + * optional string disk_type = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for diskType. + */ + com.google.protobuf.ByteString getDiskTypeBytes(); + + /** + * + * + *
+   * Optional. Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
+   * Optional. Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Optional. Specifies the type of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AttachedDisk.DiskType type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + com.google.cloud.backupdr.v1beta.AttachedDisk.DiskType getType(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionDetails.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionDetails.java new file mode 100644 index 000000000000..408e59bd937a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionDetails.java @@ -0,0 +1,1523 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * AutoProtectionDetails contains the protection details of a resource from the
+ * current binding's perspective.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AutoProtectionDetails} + */ +@com.google.protobuf.Generated +public final class AutoProtectionDetails extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AutoProtectionDetails) + AutoProtectionDetailsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AutoProtectionDetails"); + } + + // Use AutoProtectionDetails.newBuilder() to construct. + private AutoProtectionDetails(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AutoProtectionDetails() { + state_ = 0; + backupPlanAssociation_ = ""; + dataSource_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.class, + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.Builder.class); + } + + /** + * + * + *
+   * Enum for protection state of the resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AutoProtectionDetails.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Resource is protected.
+     * 
+ * + * PROTECTED = 1; + */ + PROTECTED(1), + /** + * + * + *
+     * Resource protection failed.
+     * 
+ * + * PROTECTION_FAILED = 2; + */ + PROTECTION_FAILED(2), + /** + * + * + *
+     * Resource is being unprotected.
+     * 
+ * + * UNPROTECTING = 3; + */ + UNPROTECTING(3), + /** + * + * + *
+     * Resource unprotection failed.
+     * 
+ * + * UNPROTECTION_FAILED = 4; + */ + UNPROTECTION_FAILED(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Resource is protected.
+     * 
+ * + * PROTECTED = 1; + */ + public static final int PROTECTED_VALUE = 1; + + /** + * + * + *
+     * Resource protection failed.
+     * 
+ * + * PROTECTION_FAILED = 2; + */ + public static final int PROTECTION_FAILED_VALUE = 2; + + /** + * + * + *
+     * Resource is being unprotected.
+     * 
+ * + * UNPROTECTING = 3; + */ + public static final int UNPROTECTING_VALUE = 3; + + /** + * + * + *
+     * Resource unprotection failed.
+     * 
+ * + * UNPROTECTION_FAILED = 4; + */ + public static final int UNPROTECTION_FAILED_VALUE = 4; + + 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 PROTECTED; + case 2: + return PROTECTION_FAILED; + case 3: + return UNPROTECTING; + case 4: + return UNPROTECTION_FAILED; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionDetails.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.backupdr.v1beta.AutoProtectionDetails.State) + } + + private int bitField0_; + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + + /** + * + * + *
+   * Output only. Protection state of the resource from the current binding's
+   * perspective. Output only.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.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. Protection state of the resource from the current binding's
+   * perspective. Output only.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State getState() { + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State result = + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State.UNRECOGNIZED + : result; + } + + public static final int BACKUP_PLAN_ASSOCIATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanAssociation_ = ""; + + /** + * + * + *
+   * Output only. Resource name of backup plan association linked to the
+   * resource, if any. Format:
+   * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+   * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlanAssociation. + */ + @java.lang.Override + public java.lang.String getBackupPlanAssociation() { + java.lang.Object ref = backupPlanAssociation_; + 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(); + backupPlanAssociation_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Resource name of backup plan association linked to the
+   * resource, if any. Format:
+   * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+   * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlanAssociation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanAssociationBytes() { + java.lang.Object ref = backupPlanAssociation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanAssociation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_SOURCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSource_ = ""; + + /** + * + * + *
+   * Output only. Resource name of the datasource linked to the resource, if
+   * any. Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+   * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataSource. + */ + @java.lang.Override + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + 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(); + dataSource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Resource name of the datasource linked to the resource, if
+   * any. Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+   * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status error_; + + /** + * + * + *
+   * Output only. Error during last sync for protection/unprotection, if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Error during last sync for protection/unprotection, if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + /** + * + * + *
+   * Output only. Error during last sync for protection/unprotection, if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + 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 (state_ + != com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanAssociation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupPlanAssociation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, dataSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getError()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanAssociation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupPlanAssociation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, dataSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getError()); + } + 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.backupdr.v1beta.AutoProtectionDetails)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AutoProtectionDetails other = + (com.google.cloud.backupdr.v1beta.AutoProtectionDetails) obj; + + if (state_ != other.state_) return false; + if (!getBackupPlanAssociation().equals(other.getBackupPlanAssociation())) return false; + if (!getDataSource().equals(other.getDataSource())) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) 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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + BACKUP_PLAN_ASSOCIATION_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanAssociation().hashCode(); + hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails 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.backupdr.v1beta.AutoProtectionDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails 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.backupdr.v1beta.AutoProtectionDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AutoProtectionDetails 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * AutoProtectionDetails contains the protection details of a resource from the
+   * current binding's perspective.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AutoProtectionDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AutoProtectionDetails) + com.google.cloud.backupdr.v1beta.AutoProtectionDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.class, + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AutoProtectionDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetErrorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + backupPlanAssociation_ = ""; + dataSource_ = ""; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionDetails getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionDetails build() { + com.google.cloud.backupdr.v1beta.AutoProtectionDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionDetails buildPartial() { + com.google.cloud.backupdr.v1beta.AutoProtectionDetails result = + new com.google.cloud.backupdr.v1beta.AutoProtectionDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AutoProtectionDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPlanAssociation_ = backupPlanAssociation_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataSource_ = dataSource_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AutoProtectionDetails) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AutoProtectionDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AutoProtectionDetails other) { + if (other == com.google.cloud.backupdr.v1beta.AutoProtectionDetails.getDefaultInstance()) + return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getBackupPlanAssociation().isEmpty()) { + backupPlanAssociation_ = other.backupPlanAssociation_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDataSource().isEmpty()) { + dataSource_ = other.dataSource_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasError()) { + mergeError(other.getError()); + } + 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 8: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + backupPlanAssociation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + dataSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 int state_ = 0; + + /** + * + * + *
+     * Output only. Protection state of the resource from the current binding's
+     * perspective. Output only.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.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. Protection state of the resource from the current binding's
+     * perspective. Output only.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Protection state of the resource from the current binding's
+     * perspective. Output only.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State getState() { + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State result = + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Protection state of the resource from the current binding's
+     * perspective. Output only.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Protection state of the resource from the current binding's
+     * perspective. Output only.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object backupPlanAssociation_ = ""; + + /** + * + * + *
+     * Output only. Resource name of backup plan association linked to the
+     * resource, if any. Format:
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlanAssociation. + */ + public java.lang.String getBackupPlanAssociation() { + java.lang.Object ref = backupPlanAssociation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanAssociation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Resource name of backup plan association linked to the
+     * resource, if any. Format:
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlanAssociation. + */ + public com.google.protobuf.ByteString getBackupPlanAssociationBytes() { + java.lang.Object ref = backupPlanAssociation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanAssociation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Resource name of backup plan association linked to the
+     * resource, if any. Format:
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The backupPlanAssociation to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanAssociation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanAssociation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Resource name of backup plan association linked to the
+     * resource, if any. Format:
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanAssociation() { + backupPlanAssociation_ = getDefaultInstance().getBackupPlanAssociation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Resource name of backup plan association linked to the
+     * resource, if any. Format:
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for backupPlanAssociation to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanAssociationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanAssociation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object dataSource_ = ""; + + /** + * + * + *
+     * Output only. Resource name of the datasource linked to the resource, if
+     * any. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+     * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataSource. + */ + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Resource name of the datasource linked to the resource, if
+     * any. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+     * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataSource. + */ + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Resource name of the datasource linked to the resource, if
+     * any. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+     * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Resource name of the datasource linked to the resource, if
+     * any. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+     * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataSource() { + dataSource_ = getDefaultInstance().getDataSource(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Resource name of the datasource linked to the resource, if
+     * any. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+     * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + if (error_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000008); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + + /** + * + * + *
+     * Output only. Error during last sync for protection/unprotection, if any.
+     * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AutoProtectionDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AutoProtectionDetails) + private static final com.google.cloud.backupdr.v1beta.AutoProtectionDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AutoProtectionDetails(); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoProtectionDetails 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.backupdr.v1beta.AutoProtectionDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionDetailsOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionDetailsOrBuilder.java new file mode 100644 index 000000000000..58314d84ca46 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionDetailsOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AutoProtectionDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AutoProtectionDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Protection state of the resource from the current binding's
+   * perspective. Output only.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. Protection state of the resource from the current binding's
+   * perspective. Output only.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.State getState(); + + /** + * + * + *
+   * Output only. Resource name of backup plan association linked to the
+   * resource, if any. Format:
+   * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+   * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlanAssociation. + */ + java.lang.String getBackupPlanAssociation(); + + /** + * + * + *
+   * Output only. Resource name of backup plan association linked to the
+   * resource, if any. Format:
+   * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+   * 
+ * + * + * string backup_plan_association = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlanAssociation. + */ + com.google.protobuf.ByteString getBackupPlanAssociationBytes(); + + /** + * + * + *
+   * Output only. Resource name of the datasource linked to the resource, if
+   * any. Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+   * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataSource. + */ + java.lang.String getDataSource(); + + /** + * + * + *
+   * Output only. Resource name of the datasource linked to the resource, if
+   * any. Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId}
+   * 
+ * + * + * string data_source = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataSource. + */ + com.google.protobuf.ByteString getDataSourceBytes(); + + /** + * + * + *
+   * Output only. Error during last sync for protection/unprotection, if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * + * + *
+   * Output only. Error during last sync for protection/unprotection, if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + + /** + * + * + *
+   * Output only. Error during last sync for protection/unprotection, if any.
+   * 
+ * + * .google.rpc.Status error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicy.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicy.java new file mode 100644 index 000000000000..819109769a5f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicy.java @@ -0,0 +1,3543 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * An AutoprotectionPolicy is a policy resource designed to automate backup
+ * management, moving from manual per-resource protection to a bulk approach.
+ * The policy dynamically discovers and applies a specified backup plan to all
+ * eligible resources that match its defined scope and criteria.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AutoProtectionPolicy} + */ +@com.google.protobuf.Generated +public final class AutoProtectionPolicy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AutoProtectionPolicy) + AutoProtectionPolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AutoProtectionPolicy"); + } + + // Use AutoProtectionPolicy.newBuilder() to construct. + private AutoProtectionPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AutoProtectionPolicy() { + name_ = ""; + description_ = ""; + backupPlanDetails_ = java.util.Collections.emptyList(); + state_ = 0; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.class, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder.class); + } + + /** + * + * + *
+   * The state of an AutoprotectionPolicy.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AutoProtectionPolicy.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state of the policy is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The policy is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The policy is active and protecting matching resources.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The policy is being updated.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + * + * + *
+     * The policy is being deleted.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * The state of the policy is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The policy is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The policy is active and protecting matching resources.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The policy is being updated.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + + /** + * + * + *
+     * The policy is being deleted.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + + 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 ACTIVE; + case 3: + return UPDATING; + case 4: + return DELETING; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.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.backupdr.v1beta.AutoProtectionPolicy.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 AutoprotectionPolicy.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+   * 
+ * + * 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 AutoprotectionPolicy.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A description of the policy.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A description of the policy.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 BACKUP_PLAN_DETAILS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List backupPlanDetails_; + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanDetailsList() { + return backupPlanDetails_; + } + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanDetailsOrBuilderList() { + return backupPlanDetails_; + } + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getBackupPlanDetailsCount() { + return backupPlanDetails_.size(); + } + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanDetail getBackupPlanDetails(int index) { + return backupPlanDetails_.get(index); + } + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder getBackupPlanDetailsOrBuilder( + int index) { + return backupPlanDetails_.get(index); + } + + public static final int CRITERIA_FIELD_NUMBER = 4; + private com.google.cloud.backupdr.v1beta.Criteria criteria_; + + /** + * + * + *
+   * Required. The criteria for matching resources.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the criteria field is set. + */ + @java.lang.Override + public boolean hasCriteria() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The criteria for matching resources.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The criteria. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Criteria getCriteria() { + return criteria_ == null + ? com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance() + : criteria_; + } + + /** + * + * + *
+   * Required. The criteria for matching resources.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CriteriaOrBuilder getCriteriaOrBuilder() { + return criteria_ == null + ? com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance() + : criteria_; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The current state of the AutoprotectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.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 current state of the AutoprotectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State getState() { + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State result = + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State.UNRECOGNIZED + : result; + } + + public static final int ETAG_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Output only. The etag for the policy.
+   * If this is provided on update, it must match the server's etag, otherwise
+   * the request will be rejected with an ABORTED error.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The etag for the policy.
+   * If this is provided on update, it must match the server's etag, otherwise
+   * the request will be rejected with an ABORTED error.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BINDING_SUMMARY_FIELD_NUMBER = 7; + private com.google.cloud.backupdr.v1beta.BindingSummary bindingSummary_; + + /** + * + * + *
+   * Output only. Summary of total count of different containers covered through
+   * this policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingSummary field is set. + */ + @java.lang.Override + public boolean hasBindingSummary() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Summary of total count of different containers covered through
+   * this policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingSummary. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingSummary getBindingSummary() { + return bindingSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingSummary.getDefaultInstance() + : bindingSummary_; + } + + /** + * + * + *
+   * Output only. Summary of total count of different containers covered through
+   * this policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingSummaryOrBuilder getBindingSummaryOrBuilder() { + return bindingSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingSummary.getDefaultInstance() + : bindingSummary_; + } + + public static final int POLICY_EVALUATION_SUMMARY_FIELD_NUMBER = 8; + private com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary policyEvaluationSummary_; + + /** + * + * + *
+   * Output only. Summary of last policy application when job was run per
+   * workload type.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the policyEvaluationSummary field is set. + */ + @java.lang.Override + public boolean hasPolicyEvaluationSummary() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Summary of last policy application when job was run per
+   * workload type.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The policyEvaluationSummary. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary getPolicyEvaluationSummary() { + return policyEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.getDefaultInstance() + : policyEvaluationSummary_; + } + + /** + * + * + *
+   * Output only. Summary of last policy application when job was run per
+   * workload type.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PolicyEvaluationSummaryOrBuilder + getPolicyEvaluationSummaryOrBuilder() { + return policyEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.getDefaultInstance() + : policyEvaluationSummary_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp when the policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.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 timestamp when the policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.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 UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The timestamp when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The timestamp when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + for (int i = 0; i < backupPlanDetails_.size(); i++) { + output.writeMessage(3, backupPlanDetails_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCriteria()); + } + if (state_ + != com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, etag_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getBindingSummary()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getPolicyEvaluationSummary()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getCreateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + for (int i = 0; i < backupPlanDetails_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, backupPlanDetails_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCriteria()); + } + if (state_ + != com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, etag_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getBindingSummary()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPolicyEvaluationSummary()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + 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.backupdr.v1beta.AutoProtectionPolicy)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy other = + (com.google.cloud.backupdr.v1beta.AutoProtectionPolicy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getBackupPlanDetailsList().equals(other.getBackupPlanDetailsList())) return false; + if (hasCriteria() != other.hasCriteria()) return false; + if (hasCriteria()) { + if (!getCriteria().equals(other.getCriteria())) return false; + } + if (state_ != other.state_) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (hasBindingSummary() != other.hasBindingSummary()) return false; + if (hasBindingSummary()) { + if (!getBindingSummary().equals(other.getBindingSummary())) return false; + } + if (hasPolicyEvaluationSummary() != other.hasPolicyEvaluationSummary()) return false; + if (hasPolicyEvaluationSummary()) { + if (!getPolicyEvaluationSummary().equals(other.getPolicyEvaluationSummary())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getBackupPlanDetailsCount() > 0) { + hash = (37 * hash) + BACKUP_PLAN_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanDetailsList().hashCode(); + } + if (hasCriteria()) { + hash = (37 * hash) + CRITERIA_FIELD_NUMBER; + hash = (53 * hash) + getCriteria().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (hasBindingSummary()) { + hash = (37 * hash) + BINDING_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getBindingSummary().hashCode(); + } + if (hasPolicyEvaluationSummary()) { + hash = (37 * hash) + POLICY_EVALUATION_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getPolicyEvaluationSummary().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy 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.backupdr.v1beta.AutoProtectionPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy 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.backupdr.v1beta.AutoProtectionPolicy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AutoProtectionPolicy 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An AutoprotectionPolicy is a policy resource designed to automate backup
+   * management, moving from manual per-resource protection to a bulk approach.
+   * The policy dynamically discovers and applies a specified backup plan to all
+   * eligible resources that match its defined scope and criteria.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AutoProtectionPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AutoProtectionPolicy) + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.class, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupPlanDetailsFieldBuilder(); + internalGetCriteriaFieldBuilder(); + internalGetBindingSummaryFieldBuilder(); + internalGetPolicyEvaluationSummaryFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + if (backupPlanDetailsBuilder_ == null) { + backupPlanDetails_ = java.util.Collections.emptyList(); + } else { + backupPlanDetails_ = null; + backupPlanDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + criteria_ = null; + if (criteriaBuilder_ != null) { + criteriaBuilder_.dispose(); + criteriaBuilder_ = null; + } + state_ = 0; + etag_ = ""; + bindingSummary_ = null; + if (bindingSummaryBuilder_ != null) { + bindingSummaryBuilder_.dispose(); + bindingSummaryBuilder_ = null; + } + policyEvaluationSummary_ = null; + if (policyEvaluationSummaryBuilder_ != null) { + policyEvaluationSummaryBuilder_.dispose(); + policyEvaluationSummaryBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy build() { + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy buildPartial() { + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy result = + new com.google.cloud.backupdr.v1beta.AutoProtectionPolicy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy result) { + if (backupPlanDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + backupPlanDetails_ = java.util.Collections.unmodifiableList(backupPlanDetails_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.backupPlanDetails_ = backupPlanDetails_; + } else { + result.backupPlanDetails_ = backupPlanDetailsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.AutoProtectionPolicy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.criteria_ = criteriaBuilder_ == null ? criteria_ : criteriaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.bindingSummary_ = + bindingSummaryBuilder_ == null ? bindingSummary_ : bindingSummaryBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.policyEvaluationSummary_ = + policyEvaluationSummaryBuilder_ == null + ? policyEvaluationSummary_ + : policyEvaluationSummaryBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AutoProtectionPolicy) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AutoProtectionPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AutoProtectionPolicy other) { + if (other == com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (backupPlanDetailsBuilder_ == null) { + if (!other.backupPlanDetails_.isEmpty()) { + if (backupPlanDetails_.isEmpty()) { + backupPlanDetails_ = other.backupPlanDetails_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.addAll(other.backupPlanDetails_); + } + onChanged(); + } + } else { + if (!other.backupPlanDetails_.isEmpty()) { + if (backupPlanDetailsBuilder_.isEmpty()) { + backupPlanDetailsBuilder_.dispose(); + backupPlanDetailsBuilder_ = null; + backupPlanDetails_ = other.backupPlanDetails_; + bitField0_ = (bitField0_ & ~0x00000004); + backupPlanDetailsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupPlanDetailsFieldBuilder() + : null; + } else { + backupPlanDetailsBuilder_.addAllMessages(other.backupPlanDetails_); + } + } + } + if (other.hasCriteria()) { + mergeCriteria(other.getCriteria()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasBindingSummary()) { + mergeBindingSummary(other.getBindingSummary()); + } + if (other.hasPolicyEvaluationSummary()) { + mergePolicyEvaluationSummary(other.getPolicyEvaluationSummary()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.backupdr.v1beta.BackupPlanDetail m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupPlanDetail.parser(), + extensionRegistry); + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(m); + } else { + backupPlanDetailsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCriteriaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetBindingSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetPolicyEvaluationSummaryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + 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 AutoprotectionPolicy.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+     * 
+ * + * 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 AutoprotectionPolicy.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+     * 
+ * + * 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 AutoprotectionPolicy.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+     * 
+ * + * 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 AutoprotectionPolicy.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+     * 
+ * + * 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 AutoprotectionPolicy.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+     * 
+ * + * 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 java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A description of the policy.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A description of the policy.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A description of the policy.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A description of the policy.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A description of the policy.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List backupPlanDetails_ = + java.util.Collections.emptyList(); + + private void ensureBackupPlanDetailsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + backupPlanDetails_ = + new java.util.ArrayList( + backupPlanDetails_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanDetail, + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder> + backupPlanDetailsBuilder_; + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getBackupPlanDetailsList() { + if (backupPlanDetailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupPlanDetails_); + } else { + return backupPlanDetailsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getBackupPlanDetailsCount() { + if (backupPlanDetailsBuilder_ == null) { + return backupPlanDetails_.size(); + } else { + return backupPlanDetailsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetail getBackupPlanDetails(int index) { + if (backupPlanDetailsBuilder_ == null) { + return backupPlanDetails_.get(index); + } else { + return backupPlanDetailsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlanDetails( + int index, com.google.cloud.backupdr.v1beta.BackupPlanDetail value) { + if (backupPlanDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.set(index, value); + onChanged(); + } else { + backupPlanDetailsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlanDetails( + int index, com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder builderForValue) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.set(index, builderForValue.build()); + onChanged(); + } else { + backupPlanDetailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addBackupPlanDetails(com.google.cloud.backupdr.v1beta.BackupPlanDetail value) { + if (backupPlanDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(value); + onChanged(); + } else { + backupPlanDetailsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addBackupPlanDetails( + int index, com.google.cloud.backupdr.v1beta.BackupPlanDetail value) { + if (backupPlanDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(index, value); + onChanged(); + } else { + backupPlanDetailsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addBackupPlanDetails( + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder builderForValue) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(builderForValue.build()); + onChanged(); + } else { + backupPlanDetailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addBackupPlanDetails( + int index, com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder builderForValue) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.add(index, builderForValue.build()); + onChanged(); + } else { + backupPlanDetailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllBackupPlanDetails( + java.lang.Iterable values) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPlanDetails_); + onChanged(); + } else { + backupPlanDetailsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupPlanDetails() { + if (backupPlanDetailsBuilder_ == null) { + backupPlanDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + backupPlanDetailsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeBackupPlanDetails(int index) { + if (backupPlanDetailsBuilder_ == null) { + ensureBackupPlanDetailsIsMutable(); + backupPlanDetails_.remove(index); + onChanged(); + } else { + backupPlanDetailsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder getBackupPlanDetailsBuilder( + int index) { + return internalGetBackupPlanDetailsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder getBackupPlanDetailsOrBuilder( + int index) { + if (backupPlanDetailsBuilder_ == null) { + return backupPlanDetails_.get(index); + } else { + return backupPlanDetailsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getBackupPlanDetailsOrBuilderList() { + if (backupPlanDetailsBuilder_ != null) { + return backupPlanDetailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupPlanDetails_); + } + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder addBackupPlanDetailsBuilder() { + return internalGetBackupPlanDetailsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupPlanDetail.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder addBackupPlanDetailsBuilder( + int index) { + return internalGetBackupPlanDetailsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.BackupPlanDetail.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The backup plan details for matching resources.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getBackupPlanDetailsBuilderList() { + return internalGetBackupPlanDetailsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanDetail, + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder> + internalGetBackupPlanDetailsFieldBuilder() { + if (backupPlanDetailsBuilder_ == null) { + backupPlanDetailsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanDetail, + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder>( + backupPlanDetails_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + backupPlanDetails_ = null; + } + return backupPlanDetailsBuilder_; + } + + private com.google.cloud.backupdr.v1beta.Criteria criteria_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Criteria, + com.google.cloud.backupdr.v1beta.Criteria.Builder, + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder> + criteriaBuilder_; + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the criteria field is set. + */ + public boolean hasCriteria() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The criteria. + */ + public com.google.cloud.backupdr.v1beta.Criteria getCriteria() { + if (criteriaBuilder_ == null) { + return criteria_ == null + ? com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance() + : criteria_; + } else { + return criteriaBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCriteria(com.google.cloud.backupdr.v1beta.Criteria value) { + if (criteriaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + criteria_ = value; + } else { + criteriaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCriteria(com.google.cloud.backupdr.v1beta.Criteria.Builder builderForValue) { + if (criteriaBuilder_ == null) { + criteria_ = builderForValue.build(); + } else { + criteriaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCriteria(com.google.cloud.backupdr.v1beta.Criteria value) { + if (criteriaBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && criteria_ != null + && criteria_ != com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance()) { + getCriteriaBuilder().mergeFrom(value); + } else { + criteria_ = value; + } + } else { + criteriaBuilder_.mergeFrom(value); + } + if (criteria_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCriteria() { + bitField0_ = (bitField0_ & ~0x00000008); + criteria_ = null; + if (criteriaBuilder_ != null) { + criteriaBuilder_.dispose(); + criteriaBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.Criteria.Builder getCriteriaBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCriteriaFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.CriteriaOrBuilder getCriteriaOrBuilder() { + if (criteriaBuilder_ != null) { + return criteriaBuilder_.getMessageOrBuilder(); + } else { + return criteria_ == null + ? com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance() + : criteria_; + } + } + + /** + * + * + *
+     * Required. The criteria for matching resources.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Criteria, + com.google.cloud.backupdr.v1beta.Criteria.Builder, + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder> + internalGetCriteriaFieldBuilder() { + if (criteriaBuilder_ == null) { + criteriaBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Criteria, + com.google.cloud.backupdr.v1beta.Criteria.Builder, + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder>( + getCriteria(), getParentForChildren(), isClean()); + criteria_ = null; + } + return criteriaBuilder_; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The current state of the AutoprotectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.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 current state of the AutoprotectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current state of the AutoprotectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State getState() { + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State result = + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The current state of the AutoprotectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current state of the AutoprotectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Output only. The etag for the policy.
+     * If this is provided on update, it must match the server's etag, otherwise
+     * the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 6; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The etag for the policy.
+     * If this is provided on update, it must match the server's etag, otherwise
+     * the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The etag for the policy.
+     * If this is provided on update, it must match the server's etag, otherwise
+     * the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 6; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The etag for the policy.
+     * If this is provided on update, it must match the server's etag, otherwise
+     * the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 6; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The etag for the policy.
+     * If this is provided on update, it must match the server's etag, otherwise
+     * the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 6; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.BindingSummary bindingSummary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingSummary, + com.google.cloud.backupdr.v1beta.BindingSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingSummaryOrBuilder> + bindingSummaryBuilder_; + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingSummary field is set. + */ + public boolean hasBindingSummary() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingSummary. + */ + public com.google.cloud.backupdr.v1beta.BindingSummary getBindingSummary() { + if (bindingSummaryBuilder_ == null) { + return bindingSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingSummary.getDefaultInstance() + : bindingSummary_; + } else { + return bindingSummaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBindingSummary(com.google.cloud.backupdr.v1beta.BindingSummary value) { + if (bindingSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bindingSummary_ = value; + } else { + bindingSummaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBindingSummary( + com.google.cloud.backupdr.v1beta.BindingSummary.Builder builderForValue) { + if (bindingSummaryBuilder_ == null) { + bindingSummary_ = builderForValue.build(); + } else { + bindingSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeBindingSummary(com.google.cloud.backupdr.v1beta.BindingSummary value) { + if (bindingSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && bindingSummary_ != null + && bindingSummary_ + != com.google.cloud.backupdr.v1beta.BindingSummary.getDefaultInstance()) { + getBindingSummaryBuilder().mergeFrom(value); + } else { + bindingSummary_ = value; + } + } else { + bindingSummaryBuilder_.mergeFrom(value); + } + if (bindingSummary_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBindingSummary() { + bitField0_ = (bitField0_ & ~0x00000040); + bindingSummary_ = null; + if (bindingSummaryBuilder_ != null) { + bindingSummaryBuilder_.dispose(); + bindingSummaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BindingSummary.Builder getBindingSummaryBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetBindingSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BindingSummaryOrBuilder getBindingSummaryOrBuilder() { + if (bindingSummaryBuilder_ != null) { + return bindingSummaryBuilder_.getMessageOrBuilder(); + } else { + return bindingSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingSummary.getDefaultInstance() + : bindingSummary_; + } + } + + /** + * + * + *
+     * Output only. Summary of total count of different containers covered through
+     * this policy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingSummary, + com.google.cloud.backupdr.v1beta.BindingSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingSummaryOrBuilder> + internalGetBindingSummaryFieldBuilder() { + if (bindingSummaryBuilder_ == null) { + bindingSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingSummary, + com.google.cloud.backupdr.v1beta.BindingSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingSummaryOrBuilder>( + getBindingSummary(), getParentForChildren(), isClean()); + bindingSummary_ = null; + } + return bindingSummaryBuilder_; + } + + private com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary policyEvaluationSummary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary, + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummaryOrBuilder> + policyEvaluationSummaryBuilder_; + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the policyEvaluationSummary field is set. + */ + public boolean hasPolicyEvaluationSummary() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The policyEvaluationSummary. + */ + public com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary getPolicyEvaluationSummary() { + if (policyEvaluationSummaryBuilder_ == null) { + return policyEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.getDefaultInstance() + : policyEvaluationSummary_; + } else { + return policyEvaluationSummaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPolicyEvaluationSummary( + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary value) { + if (policyEvaluationSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyEvaluationSummary_ = value; + } else { + policyEvaluationSummaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPolicyEvaluationSummary( + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.Builder builderForValue) { + if (policyEvaluationSummaryBuilder_ == null) { + policyEvaluationSummary_ = builderForValue.build(); + } else { + policyEvaluationSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePolicyEvaluationSummary( + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary value) { + if (policyEvaluationSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && policyEvaluationSummary_ != null + && policyEvaluationSummary_ + != com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.getDefaultInstance()) { + getPolicyEvaluationSummaryBuilder().mergeFrom(value); + } else { + policyEvaluationSummary_ = value; + } + } else { + policyEvaluationSummaryBuilder_.mergeFrom(value); + } + if (policyEvaluationSummary_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPolicyEvaluationSummary() { + bitField0_ = (bitField0_ & ~0x00000080); + policyEvaluationSummary_ = null; + if (policyEvaluationSummaryBuilder_ != null) { + policyEvaluationSummaryBuilder_.dispose(); + policyEvaluationSummaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.Builder + getPolicyEvaluationSummaryBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetPolicyEvaluationSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.PolicyEvaluationSummaryOrBuilder + getPolicyEvaluationSummaryOrBuilder() { + if (policyEvaluationSummaryBuilder_ != null) { + return policyEvaluationSummaryBuilder_.getMessageOrBuilder(); + } else { + return policyEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.getDefaultInstance() + : policyEvaluationSummary_; + } + } + + /** + * + * + *
+     * Output only. Summary of last policy application when job was run per
+     * workload type.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary, + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummaryOrBuilder> + internalGetPolicyEvaluationSummaryFieldBuilder() { + if (policyEvaluationSummaryBuilder_ == null) { + policyEvaluationSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary, + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummaryOrBuilder>( + getPolicyEvaluationSummary(), getParentForChildren(), isClean()); + policyEvaluationSummary_ = null; + } + return policyEvaluationSummaryBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.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 timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.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_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.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_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.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 timestamp when the policy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The timestamp when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AutoProtectionPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AutoProtectionPolicy) + private static final com.google.cloud.backupdr.v1beta.AutoProtectionPolicy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AutoProtectionPolicy(); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoProtectionPolicy 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.backupdr.v1beta.AutoProtectionPolicy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBinding.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBinding.java new file mode 100644 index 000000000000..a9ee5e8774d6 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBinding.java @@ -0,0 +1,2523 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * An AutoprotectionPolicyBinding (APPA) acts as the bridge between an
+ * AutoprotectionPolicy and the scope (Project, Folder, or Organization) where
+ * the policy should be applied.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding} + */ +@com.google.protobuf.Generated +public final class AutoProtectionPolicyBinding extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) + AutoProtectionPolicyBindingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AutoProtectionPolicyBinding"); + } + + // Use AutoProtectionPolicyBinding.newBuilder() to construct. + private AutoProtectionPolicyBinding(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AutoProtectionPolicyBinding() { + name_ = ""; + description_ = ""; + state_ = 0; + scope_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicyBinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicyBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.class, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder.class); + } + + /** + * + * + *
+   * The state of an AutoProtectionPolicyBinding.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state of the binding is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The binding is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The binding is active.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The binding deletion is initiated.
+     * 
+ * + * DELETION_INITIATED = 3; + */ + DELETION_INITIATED(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * The state of the binding is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The binding is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The binding is active.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The binding deletion is initiated.
+     * 
+ * + * DELETION_INITIATED = 3; + */ + public static final int DELETION_INITIATED_VALUE = 3; + + 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 ACTIVE; + case 3: + return DELETION_INITIATED; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.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.backupdr.v1beta.AutoProtectionPolicyBinding.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 AutoProtectionPolicyBinding.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+   * 
+ * + * 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 AutoProtectionPolicyBinding.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A description of the binding.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A description of the binding.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 STATE_FIELD_NUMBER = 3; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The current state of the AutoProtectionPolicyBinding.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.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 current state of the AutoProtectionPolicyBinding.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State getState() { + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State result = + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State.UNRECOGNIZED + : result; + } + + public static final int SCOPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object scope_ = ""; + + /** + * + * + *
+   * Required. Immutable. Resource Id of target container on which policy will
+   * be applied. Format: projects/{project_id}
+   * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + 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(); + scope_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. Resource Id of target container on which policy will
+   * be applied. Format: projects/{project_id}
+   * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BINDING_EVALUATION_SUMMARY_FIELD_NUMBER = 5; + private com.google.cloud.backupdr.v1beta.BindingEvaluationSummary bindingEvaluationSummary_; + + /** + * + * + *
+   * Output only. Summaries of the last policy application when the job has run,
+   * with one entry per resource type specified in the AutoProtectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingEvaluationSummary field is set. + */ + @java.lang.Override + public boolean hasBindingEvaluationSummary() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Summaries of the last policy application when the job has run,
+   * with one entry per resource type specified in the AutoProtectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingEvaluationSummary. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary getBindingEvaluationSummary() { + return bindingEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance() + : bindingEvaluationSummary_; + } + + /** + * + * + *
+   * Output only. Summaries of the last policy application when the job has run,
+   * with one entry per resource type specified in the AutoProtectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder + getBindingEvaluationSummaryOrBuilder() { + return bindingEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance() + : bindingEvaluationSummary_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp when the binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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 timestamp when the binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.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 UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The timestamp when the binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The timestamp when the binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ETAG_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. Output only. The etag for the binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Output only. The etag for the binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (state_ + != com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(scope_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, scope_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getBindingEvaluationSummary()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (state_ + != com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(scope_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, scope_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getBindingEvaluationSummary()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, etag_); + } + 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.backupdr.v1beta.AutoProtectionPolicyBinding)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding other = + (com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (!getScope().equals(other.getScope())) return false; + if (hasBindingEvaluationSummary() != other.hasBindingEvaluationSummary()) return false; + if (hasBindingEvaluationSummary()) { + if (!getBindingEvaluationSummary().equals(other.getBindingEvaluationSummary())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + if (hasBindingEvaluationSummary()) { + hash = (37 * hash) + BINDING_EVALUATION_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getBindingEvaluationSummary().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding 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.backupdr.v1beta.AutoProtectionPolicyBinding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding 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.backupdr.v1beta.AutoProtectionPolicyBinding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AutoProtectionPolicyBinding 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An AutoprotectionPolicyBinding (APPA) acts as the bridge between an
+   * AutoprotectionPolicy and the scope (Project, Folder, or Organization) where
+   * the policy should be applied.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicyBinding_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicyBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.class, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBindingEvaluationSummaryFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + state_ = 0; + scope_ = ""; + bindingEvaluationSummary_ = null; + if (bindingEvaluationSummaryBuilder_ != null) { + bindingEvaluationSummaryBuilder_.dispose(); + bindingEvaluationSummaryBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicyBinding_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding build() { + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding buildPartial() { + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding result = + new com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.scope_ = scope_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.bindingEvaluationSummary_ = + bindingEvaluationSummaryBuilder_ == null + ? bindingEvaluationSummary_ + : bindingEvaluationSummaryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.etag_ = etag_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) { + return mergeFrom((com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding other) { + if (other + == com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasBindingEvaluationSummary()) { + mergeBindingEvaluationSummary(other.getBindingEvaluationSummary()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000080; + 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 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + scope_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetBindingEvaluationSummaryFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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 AutoProtectionPolicyBinding.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+     * 
+ * + * 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 AutoProtectionPolicyBinding.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+     * 
+ * + * 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 AutoProtectionPolicyBinding.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+     * 
+ * + * 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 AutoProtectionPolicyBinding.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+     * 
+ * + * 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 AutoProtectionPolicyBinding.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+     * 
+ * + * 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 java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A description of the binding.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A description of the binding.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A description of the binding.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A description of the binding.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A description of the binding.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The current state of the AutoProtectionPolicyBinding.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.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 current state of the AutoProtectionPolicyBinding.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current state of the AutoProtectionPolicyBinding.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State getState() { + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State result = + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The current state of the AutoProtectionPolicyBinding.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current state of the AutoProtectionPolicyBinding.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object scope_ = ""; + + /** + * + * + *
+     * Required. Immutable. Resource Id of target container on which policy will
+     * be applied. Format: projects/{project_id}
+     * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. Resource Id of target container on which policy will
+     * be applied. Format: projects/{project_id}
+     * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. Resource Id of target container on which policy will
+     * be applied. Format: projects/{project_id}
+     * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + scope_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Resource Id of target container on which policy will
+     * be applied. Format: projects/{project_id}
+     * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearScope() { + scope_ = getDefaultInstance().getScope(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Resource Id of target container on which policy will
+     * be applied. Format: projects/{project_id}
+     * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + scope_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.BindingEvaluationSummary bindingEvaluationSummary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder> + bindingEvaluationSummaryBuilder_; + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingEvaluationSummary field is set. + */ + public boolean hasBindingEvaluationSummary() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingEvaluationSummary. + */ + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary getBindingEvaluationSummary() { + if (bindingEvaluationSummaryBuilder_ == null) { + return bindingEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance() + : bindingEvaluationSummary_; + } else { + return bindingEvaluationSummaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBindingEvaluationSummary( + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary value) { + if (bindingEvaluationSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bindingEvaluationSummary_ = value; + } else { + bindingEvaluationSummaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBindingEvaluationSummary( + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder builderForValue) { + if (bindingEvaluationSummaryBuilder_ == null) { + bindingEvaluationSummary_ = builderForValue.build(); + } else { + bindingEvaluationSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeBindingEvaluationSummary( + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary value) { + if (bindingEvaluationSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && bindingEvaluationSummary_ != null + && bindingEvaluationSummary_ + != com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance()) { + getBindingEvaluationSummaryBuilder().mergeFrom(value); + } else { + bindingEvaluationSummary_ = value; + } + } else { + bindingEvaluationSummaryBuilder_.mergeFrom(value); + } + if (bindingEvaluationSummary_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBindingEvaluationSummary() { + bitField0_ = (bitField0_ & ~0x00000010); + bindingEvaluationSummary_ = null; + if (bindingEvaluationSummaryBuilder_ != null) { + bindingEvaluationSummaryBuilder_.dispose(); + bindingEvaluationSummaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder + getBindingEvaluationSummaryBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetBindingEvaluationSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder + getBindingEvaluationSummaryOrBuilder() { + if (bindingEvaluationSummaryBuilder_ != null) { + return bindingEvaluationSummaryBuilder_.getMessageOrBuilder(); + } else { + return bindingEvaluationSummary_ == null + ? com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance() + : bindingEvaluationSummary_; + } + } + + /** + * + * + *
+     * Output only. Summaries of the last policy application when the job has run,
+     * with one entry per resource type specified in the AutoProtectionPolicy.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder> + internalGetBindingEvaluationSummaryFieldBuilder() { + if (bindingEvaluationSummaryBuilder_ == null) { + bindingEvaluationSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder>( + getBindingEvaluationSummary(), getParentForChildren(), isClean()); + bindingEvaluationSummary_ = null; + } + return bindingEvaluationSummaryBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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 timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.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 timestamp when the binding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The timestamp when the binding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. Output only. The etag for the binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Output only. The etag for the binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Output only. The etag for the binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The etag for the binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The etag for the binding.
+     * If this is provided on update, it must match the server's etag.
+     * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) + private static final com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding(); + } + + public static com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoProtectionPolicyBinding 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.backupdr.v1beta.AutoProtectionPolicyBinding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingName.java new file mode 100644 index 000000000000..bede39c2d865 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingName.java @@ -0,0 +1,273 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class AutoProtectionPolicyBindingName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AUTO_PROTECTION_POLICY_BINDING = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String autoProtectionPolicy; + private final String binding; + + @Deprecated + protected AutoProtectionPolicyBindingName() { + project = null; + location = null; + autoProtectionPolicy = null; + binding = null; + } + + private AutoProtectionPolicyBindingName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + autoProtectionPolicy = Preconditions.checkNotNull(builder.getAutoProtectionPolicy()); + binding = Preconditions.checkNotNull(builder.getBinding()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAutoProtectionPolicy() { + return autoProtectionPolicy; + } + + public String getBinding() { + return binding; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AutoProtectionPolicyBindingName of( + String project, String location, String autoProtectionPolicy, String binding) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAutoProtectionPolicy(autoProtectionPolicy) + .setBinding(binding) + .build(); + } + + public static String format( + String project, String location, String autoProtectionPolicy, String binding) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAutoProtectionPolicy(autoProtectionPolicy) + .setBinding(binding) + .build() + .toString(); + } + + public static @Nullable AutoProtectionPolicyBindingName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AUTO_PROTECTION_POLICY_BINDING.validatedMatch( + formattedString, + "AutoProtectionPolicyBindingName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("auto_protection_policy"), + matchMap.get("binding")); + } + + 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<@Nullable AutoProtectionPolicyBindingName> values) { + List list = new ArrayList<>(values.size()); + for (AutoProtectionPolicyBindingName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AUTO_PROTECTION_POLICY_BINDING.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 (autoProtectionPolicy != null) { + fieldMapBuilder.put("auto_protection_policy", autoProtectionPolicy); + } + if (binding != null) { + fieldMapBuilder.put("binding", binding); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AUTO_PROTECTION_POLICY_BINDING.instantiate( + "project", + project, + "location", + location, + "auto_protection_policy", + autoProtectionPolicy, + "binding", + binding); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AutoProtectionPolicyBindingName that = ((AutoProtectionPolicyBindingName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.autoProtectionPolicy, that.autoProtectionPolicy) + && Objects.equals(this.binding, that.binding); + } + 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(autoProtectionPolicy); + h *= 1000003; + h ^= Objects.hashCode(binding); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}. + */ + public static class Builder { + private String project; + private String location; + private String autoProtectionPolicy; + private String binding; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAutoProtectionPolicy() { + return autoProtectionPolicy; + } + + public String getBinding() { + return binding; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAutoProtectionPolicy(String autoProtectionPolicy) { + this.autoProtectionPolicy = autoProtectionPolicy; + return this; + } + + public Builder setBinding(String binding) { + this.binding = binding; + return this; + } + + private Builder(AutoProtectionPolicyBindingName autoProtectionPolicyBindingName) { + this.project = autoProtectionPolicyBindingName.project; + this.location = autoProtectionPolicyBindingName.location; + this.autoProtectionPolicy = autoProtectionPolicyBindingName.autoProtectionPolicy; + this.binding = autoProtectionPolicyBindingName.binding; + } + + public AutoProtectionPolicyBindingName build() { + return new AutoProtectionPolicyBindingName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingOrBuilder.java new file mode 100644 index 000000000000..1d3fb5161d08 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingOrBuilder.java @@ -0,0 +1,301 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AutoProtectionPolicyBindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the AutoProtectionPolicyBinding.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the AutoProtectionPolicyBinding.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A description of the binding.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A description of the binding.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The current state of the AutoProtectionPolicyBinding.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The current state of the AutoProtectionPolicyBinding.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.State getState(); + + /** + * + * + *
+   * Required. Immutable. Resource Id of target container on which policy will
+   * be applied. Format: projects/{project_id}
+   * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The scope. + */ + java.lang.String getScope(); + + /** + * + * + *
+   * Required. Immutable. Resource Id of target container on which policy will
+   * be applied. Format: projects/{project_id}
+   * 
+ * + * + * string scope = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for scope. + */ + com.google.protobuf.ByteString getScopeBytes(); + + /** + * + * + *
+   * Output only. Summaries of the last policy application when the job has run,
+   * with one entry per resource type specified in the AutoProtectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingEvaluationSummary field is set. + */ + boolean hasBindingEvaluationSummary(); + + /** + * + * + *
+   * Output only. Summaries of the last policy application when the job has run,
+   * with one entry per resource type specified in the AutoProtectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingEvaluationSummary. + */ + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary getBindingEvaluationSummary(); + + /** + * + * + *
+   * Output only. Summaries of the last policy application when the job has run,
+   * with one entry per resource type specified in the AutoProtectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingEvaluationSummary binding_evaluation_summary = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder + getBindingEvaluationSummaryOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the binding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the binding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Output only. The etag for the binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. Output only. The etag for the binding.
+   * If this is provided on update, it must match the server's etag.
+   * 
+ * + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingProto.java new file mode 100644 index 000000000000..9f2d127e5256 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyBindingProto.java @@ -0,0 +1,224 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class AutoProtectionPolicyBindingProto extends com.google.protobuf.GeneratedFile { + private AutoProtectionPolicyBindingProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AutoProtectionPolicyBindingProto"); + } + + 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_backupdr_v1beta_AutoProtectionPolicyBinding_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicyBinding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BindingEvaluationSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BindingEvaluationSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_InitiateDeleteAutoProtectionPolicyBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_InitiateDeleteAutoProtectionPolicyBindingRequest_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/backupdr/v1beta/autoprotectionpolicybinding.proto\022\034google.cloud.b" + + "ackupdr.v1beta\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\032\037google/protobuf/timestamp.proto\"\321\005\n" + + "\033AutoProtectionPolicyBinding\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\001\022S\n" + + "\005state\030\003 \001(\0162" + + "?.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.StateB\003\340A\003\022\033\n" + + "\005scope\030\004 \001(\tB\014\340A\002\340A\005\372A\003\n" + + "\001*\022_\n" + + "\032binding_evaluation_summary\030\005" + + " \001(\01326.google.cloud.backupdr.v1beta.BindingEvaluationSummaryB\003\340A\003\0224\n" + + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\007" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\021\n" + + "\004etag\030\010 \001(\tB\003\340A\001\"P\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\026\n" + + "\022DELETION_INITIATED\020\003:\340\001\352A\334\001\n" + + "3backupdr.googleapis.com/AutoProtectionPolicyBinding\022jprojects/{proj" + + "ect}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindin" + + "gs/{binding}*\034autoProtectionPolicyBindings2\033autoProtectionPolicyBinding\"\213\001\n" + + "\030BindingEvaluationSummary\022$\n" + + "\027matching_resource_count\030\001 \001(\003B\003\340A\003\022%\n" + + "\030protected_resource_count\030\002 \001(\003B\003\340A\003\022\"\n" + + "\025failed_resource_count\030\003 \001(\003B\003\340A\003\"\210\002\n" + + "(CreateAutoProtectionPolicyBindingRequest\022D\n" + + "\006parent\030\001 \001(\tB4\340A\002\372A.\n" + + ",backupdr.googleapis.com/AutoProtectionPolicy\022.\n" + + "!auto_protection_policy_binding_id\030\002 \001(\tB\003\340A\002\022f\n" + + "\036auto_protection_policy_binding\030\003 \001(\01329.google.cloud.backupdr" + + ".v1beta.AutoProtectionPolicyBindingB\003\340A\002\"r\n" + + "%GetAutoProtectionPolicyBindingRequest\022I\n" + + "\004name\030\001 \001(\tB;\340A\002\372A5\n" + + "3backupdr.googleapis.com/AutoProtectionPolicyBinding\"\314\001\n" + + "\'ListAutoProtectionPolicyBindingsRequest\022D\n" + + "\006parent\030\001 \001(\tB4\340A\002\372A.\n" + + ",backupdr.googleapis.com/AutoProtectionPolicy\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\301\001\n" + + "(ListAutoProtectionPolicyBindingsResponse\022b\n" + + "\037auto_protection_policy_bindings\030\001" + + " \003(\01329.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\030\n" + + "\013unreachable\030\003 \003(\tB\003\340A\006\"}\n" + + "0InitiateDeleteAutoProtectionPolicyBindingRequest\022I\n" + + "\004name\030\001 \001(\tB;\340A\002\372A5\n" + + "3backupdr.googleapis.com/AutoProtectionPolicyBindingB\344\001\n" + + " com.google.cloud.backupdr.v1betaB AutoProtectionPolicyBindingProtoP\001Z" + + " fieldValuesMap; + private final String project; + private final String location; + private final String autoProtectionPolicy; + + @Deprecated + protected AutoProtectionPolicyName() { + project = null; + location = null; + autoProtectionPolicy = null; + } + + private AutoProtectionPolicyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + autoProtectionPolicy = Preconditions.checkNotNull(builder.getAutoProtectionPolicy()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAutoProtectionPolicy() { + return autoProtectionPolicy; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AutoProtectionPolicyName of( + String project, String location, String autoProtectionPolicy) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAutoProtectionPolicy(autoProtectionPolicy) + .build(); + } + + public static String format(String project, String location, String autoProtectionPolicy) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAutoProtectionPolicy(autoProtectionPolicy) + .build() + .toString(); + } + + public static @Nullable AutoProtectionPolicyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AUTO_PROTECTION_POLICY.validatedMatch( + formattedString, "AutoProtectionPolicyName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("auto_protection_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<@Nullable AutoProtectionPolicyName> values) { + List list = new ArrayList<>(values.size()); + for (AutoProtectionPolicyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AUTO_PROTECTION_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 (autoProtectionPolicy != null) { + fieldMapBuilder.put("auto_protection_policy", autoProtectionPolicy); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AUTO_PROTECTION_POLICY.instantiate( + "project", project, "location", location, "auto_protection_policy", autoProtectionPolicy); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AutoProtectionPolicyName that = ((AutoProtectionPolicyName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.autoProtectionPolicy, that.autoProtectionPolicy); + } + 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(autoProtectionPolicy); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}. + */ + public static class Builder { + private String project; + private String location; + private String autoProtectionPolicy; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAutoProtectionPolicy() { + return autoProtectionPolicy; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAutoProtectionPolicy(String autoProtectionPolicy) { + this.autoProtectionPolicy = autoProtectionPolicy; + return this; + } + + private Builder(AutoProtectionPolicyName autoProtectionPolicyName) { + this.project = autoProtectionPolicyName.project; + this.location = autoProtectionPolicyName.location; + this.autoProtectionPolicy = autoProtectionPolicyName.autoProtectionPolicy; + } + + public AutoProtectionPolicyName build() { + return new AutoProtectionPolicyName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyOrBuilder.java new file mode 100644 index 000000000000..b6dd969dcfc5 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyOrBuilder.java @@ -0,0 +1,427 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface AutoProtectionPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.AutoProtectionPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the AutoprotectionPolicy.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the AutoprotectionPolicy.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A description of the policy.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A description of the policy.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getBackupPlanDetailsList(); + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanDetail getBackupPlanDetails(int index); + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getBackupPlanDetailsCount(); + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getBackupPlanDetailsOrBuilderList(); + + /** + * + * + *
+   * Required. The backup plan details for matching resources.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanDetail backup_plan_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder getBackupPlanDetailsOrBuilder( + int index); + + /** + * + * + *
+   * Required. The criteria for matching resources.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the criteria field is set. + */ + boolean hasCriteria(); + + /** + * + * + *
+   * Required. The criteria for matching resources.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The criteria. + */ + com.google.cloud.backupdr.v1beta.Criteria getCriteria(); + + /** + * + * + *
+   * Required. The criteria for matching resources.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Criteria criteria = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder getCriteriaOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of the AutoprotectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The current state of the AutoprotectionPolicy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.State getState(); + + /** + * + * + *
+   * Output only. The etag for the policy.
+   * If this is provided on update, it must match the server's etag, otherwise
+   * the request will be rejected with an ABORTED error.
+   * 
+ * + * string etag = 6; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Output only. The etag for the policy.
+   * If this is provided on update, it must match the server's etag, otherwise
+   * the request will be rejected with an ABORTED error.
+   * 
+ * + * string etag = 6; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. Summary of total count of different containers covered through
+   * this policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bindingSummary field is set. + */ + boolean hasBindingSummary(); + + /** + * + * + *
+   * Output only. Summary of total count of different containers covered through
+   * this policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bindingSummary. + */ + com.google.cloud.backupdr.v1beta.BindingSummary getBindingSummary(); + + /** + * + * + *
+   * Output only. Summary of total count of different containers covered through
+   * this policy.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BindingSummary binding_summary = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BindingSummaryOrBuilder getBindingSummaryOrBuilder(); + + /** + * + * + *
+   * Output only. Summary of last policy application when job was run per
+   * workload type.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the policyEvaluationSummary field is set. + */ + boolean hasPolicyEvaluationSummary(); + + /** + * + * + *
+   * Output only. Summary of last policy application when job was run per
+   * workload type.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The policyEvaluationSummary. + */ + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary getPolicyEvaluationSummary(); + + /** + * + * + *
+   * Output only. Summary of last policy application when job was run per
+   * workload type.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PolicyEvaluationSummary policy_evaluation_summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummaryOrBuilder + getPolicyEvaluationSummaryOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the policy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyProto.java new file mode 100644 index 000000000000..f02a88f7af1e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/AutoProtectionPolicyProto.java @@ -0,0 +1,326 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class AutoProtectionPolicyProto extends com.google.protobuf.GeneratedFile { + private AutoProtectionPolicyProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AutoProtectionPolicyProto"); + } + + 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_backupdr_v1beta_AutoProtectionPolicy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AutoProtectionPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupPlanDetail_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupPlanDetail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_Criteria_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_Criteria_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_MatchingCondition_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_MatchingCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_PolicyEvaluationSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_PolicyEvaluationSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BindingSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BindingSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_KeyValuePair_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_KeyValuePair_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_UpdateAutoProtectionPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_UpdateAutoProtectionPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DeleteAutoProtectionPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DeleteAutoProtectionPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesResponse_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" + + "7google/cloud/backupdr/v1beta/autoprotectionpolicy.proto\022\034google.cloud.backupdr" + + ".v1beta\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\331\006\n" + + "\024AutoProtectionPolicy\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\001\022P\n" + + "\023backup_plan_details\030\003 \003(\0132..goog" + + "le.cloud.backupdr.v1beta.BackupPlanDetailB\003\340A\002\022=\n" + + "\010criteria\030\004" + + " \001(\0132&.google.cloud.backupdr.v1beta.CriteriaB\003\340A\002\022L\n" + + "\005state\030\005" + + " \001(\01628.google.cloud.backupdr.v1beta.AutoProtectionPolicy.StateB\003\340A\003\022\014\n" + + "\004etag\030\006 \001(\t\022J\n" + + "\017binding_summary\030\007" + + " \001(\0132,.google.cloud.backupdr.v1beta.BindingSummaryB\003\340A\003\022]\n" + + "\031policy_evaluation_summary\030\010 \001(\01325.googl" + + "e.cloud.backupdr.v1beta.PolicyEvaluationSummaryB\003\340A\003\0224\n" + + "\013create_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"T\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010UPDATING\020\003\022\014\n" + + "\010DELETING\020\004:\271\001\352A\265\001\n" + + ",backupdr.googleapis.com/AutoProtectionPolicy\022Wprojects/{project}/" + + "locations/{location}/autoProtectionPolic" + + "ies/{auto_protection_policy}*\026autoProtectionPolicies2\024autoProtectionPolicy\"o\n" + + "\020BackupPlanDetail\022\032\n\r" + + "resource_type\030\001 \001(\tB\003\340A\002\022?\n" + + "\013backup_plan\030\002 \001(\tB*\340A\002\372A$\n" + + "\"backupdr.googleapis.com/BackupPlan\"]\n" + + "\010Criteria\022Q\n" + + "\023matching_conditions\030\001 \003(\0132/.google.cl" + + "oud.backupdr.v1beta.MatchingConditionB\003\340A\002\"l\n" + + "\021MatchingCondition\022J\n" + + "\017label_condition\030\001" + + " \001(\0132*.google.cloud.backupdr.v1beta.KeyValuePairB\003\340A\001H\000B\013\n" + + "\tcondition\"\212\001\n" + + "\027PolicyEvaluationSummary\022$\n" + + "\027matching_resource_count\030\001 \001(\003B\003\340A\003\022%\n" + + "\030protected_resource_count\030\002 \001(\003B\003\340A\003\022\"\n" + + "\025failed_resource_count\030\003 \001(\003B\003\340A\003\",\n" + + "\016BindingSummary\022\032\n\r" + + "project_count\030\001 \001(\003B\003\340A\003\"5\n" + + "\014KeyValuePair\022\020\n" + + "\003key\030\001 \001(\tB\003\340A\002\022\023\n" + + "\006values\030\002 \003(\tB\003\340A\002\"\337\001\n" + + "!CreateAutoProtectionPolicyRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022&\n" + + "\031auto_protection_policy_id\030\002 \001(\tB\003\340A\002\022W\n" + + "\026auto_protection_policy\030\003 " + + "\001(\01322.google.cloud.backupdr.v1beta.AutoProtectionPolicyB\003\340A\002\"d\n" + + "\036GetAutoProtectionPolicyRequest\022B\n" + + "\004name\030\001 \001(\tB4\340A\002\372A.\n" + + ",backupdr.googleapis.com/AutoProtectionPolicy\"\262\001\n" + + "!UpdateAutoProtectionPolicyRequest\022W\n" + + "\026auto_protection_policy\030\001 \001(\01322.googl" + + "e.cloud.backupdr.v1beta.AutoProtectionPolicyB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"u\n" + + "!DeleteAutoProtectionPolicyRequest\022B\n" + + "\004name\030\001 \001(\tB4\340A\002\372A.\n" + + ",backupdr.googleapis.com/AutoProtectionPolicy\022\014\n" + + "\004etag\030\002 \001(\t\"\273\001\n" + + "!ListAutoProtectionPoliciesRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\250\001\n" + + "\"ListAutoProtectionPoliciesResponse\022T\n" + + "\030auto_protection_policies\030\001" + + " \003(\01322.google.cloud.backupdr.v1beta.AutoProtectionPolicy\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\tB\335\001\n" + + " com.google.cloud.backupdr.v1betaB\031AutoProtectionPoli" + + "cyProtoP\001Z + * Message describing a Backup object. + * + * + * Protobuf type {@code google.cloud.backupdr.v1beta.Backup} + */ +@com.google.protobuf.Generated +public final class Backup extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.Backup) + BackupOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Backup"); + } + + // Use Backup.newBuilder() to construct. + private Backup(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Backup() { + name_ = ""; + description_ = ""; + backupRetentionInheritance_ = 0; + etag_ = ""; + state_ = 0; + serviceLocks_ = java.util.Collections.emptyList(); + backupApplianceLocks_ = java.util.Collections.emptyList(); + backupType_ = 0; + kmsKeyVersions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Backup.class, + com.google.cloud.backupdr.v1beta.Backup.Builder.class); + } + + /** + * + * + *
+   * Holds the state of the backup resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.Backup.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The backup is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The backup has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The backup is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * The backup is experiencing an issue and might be unusable.
+     * 
+ * + * ERROR = 4; + */ + ERROR(4), + /** + * + * + *
+     * The backup is being uploaded.
+     * 
+ * + * UPLOADING = 5; + */ + UPLOADING(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The backup is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The backup has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The backup is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + /** + * + * + *
+     * The backup is experiencing an issue and might be unusable.
+     * 
+ * + * ERROR = 4; + */ + public static final int ERROR_VALUE = 4; + + /** + * + * + *
+     * The backup is being uploaded.
+     * 
+ * + * UPLOADING = 5; + */ + public static final int UPLOADING_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 ACTIVE; + case 3: + return DELETING; + case 4: + return ERROR; + case 5: + return UPLOADING; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.Backup.State) + } + + /** + * + * + *
+   * Type of the backup, scheduled or ondemand.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.Backup.BackupType} + */ + public enum BackupType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Backup type is unspecified.
+     * 
+ * + * BACKUP_TYPE_UNSPECIFIED = 0; + */ + BACKUP_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Scheduled backup.
+     * 
+ * + * SCHEDULED = 1; + */ + SCHEDULED(1), + /** + * + * + *
+     * On demand backup.
+     * 
+ * + * ON_DEMAND = 2; + */ + ON_DEMAND(2), + /** + * + * + *
+     * Operational backup.
+     * 
+ * + * ON_DEMAND_OPERATIONAL = 3; + */ + ON_DEMAND_OPERATIONAL(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupType"); + } + + /** + * + * + *
+     * Backup type is unspecified.
+     * 
+ * + * BACKUP_TYPE_UNSPECIFIED = 0; + */ + public static final int BACKUP_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Scheduled backup.
+     * 
+ * + * SCHEDULED = 1; + */ + public static final int SCHEDULED_VALUE = 1; + + /** + * + * + *
+     * On demand backup.
+     * 
+ * + * ON_DEMAND = 2; + */ + public static final int ON_DEMAND_VALUE = 2; + + /** + * + * + *
+     * Operational backup.
+     * 
+ * + * ON_DEMAND_OPERATIONAL = 3; + */ + public static final int ON_DEMAND_OPERATIONAL_VALUE = 3; + + 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 BackupType 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 BackupType forNumber(int value) { + switch (value) { + case 0: + return BACKUP_TYPE_UNSPECIFIED; + case 1: + return SCHEDULED; + case 2: + return ON_DEMAND; + case 3: + return ON_DEMAND_OPERATIONAL; + 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 BackupType findValueByNumber(int number) { + return BackupType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.Backup.getDescriptor().getEnumTypes().get(1); + } + + private static final BackupType[] VALUES = values(); + + public static BackupType 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 BackupType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.Backup.BackupType) + } + + public interface GCPBackupPlanInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Resource name of backup plan by which workload is protected at the time
+     * of the backup.
+     * Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlan. + */ + java.lang.String getBackupPlan(); + + /** + * + * + *
+     * Resource name of backup plan by which workload is protected at the time
+     * of the backup.
+     * Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlan. + */ + com.google.protobuf.ByteString getBackupPlanBytes(); + + /** + * + * + *
+     * The rule id of the backup plan which triggered this backup in case of
+     * scheduled backup or used for
+     * 
+ * + * string backup_plan_rule_id = 2; + * + * @return The backupPlanRuleId. + */ + java.lang.String getBackupPlanRuleId(); + + /** + * + * + *
+     * The rule id of the backup plan which triggered this backup in case of
+     * scheduled backup or used for
+     * 
+ * + * string backup_plan_rule_id = 2; + * + * @return The bytes for backupPlanRuleId. + */ + com.google.protobuf.ByteString getBackupPlanRuleIdBytes(); + + /** + * + * + *
+     * Resource name of the backup plan revision which triggered this backup in
+     * case of scheduled backup or used for on demand backup.
+     * Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+     * 
+ * + * string backup_plan_revision_name = 3; + * + * @return The backupPlanRevisionName. + */ + java.lang.String getBackupPlanRevisionName(); + + /** + * + * + *
+     * Resource name of the backup plan revision which triggered this backup in
+     * case of scheduled backup or used for on demand backup.
+     * Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+     * 
+ * + * string backup_plan_revision_name = 3; + * + * @return The bytes for backupPlanRevisionName. + */ + com.google.protobuf.ByteString getBackupPlanRevisionNameBytes(); + + /** + * + * + *
+     * The user friendly id of the backup plan revision which triggered this
+     * backup in case of scheduled backup or used for on demand backup.
+     * 
+ * + * string backup_plan_revision_id = 4; + * + * @return The backupPlanRevisionId. + */ + java.lang.String getBackupPlanRevisionId(); + + /** + * + * + *
+     * The user friendly id of the backup plan revision which triggered this
+     * backup in case of scheduled backup or used for on demand backup.
+     * 
+ * + * string backup_plan_revision_id = 4; + * + * @return The bytes for backupPlanRevisionId. + */ + com.google.protobuf.ByteString getBackupPlanRevisionIdBytes(); + } + + /** + * + * + *
+   * GCPBackupPlanInfo captures the plan configuration details of Google Cloud
+   * resources at the time of backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo} + */ + public static final class GCPBackupPlanInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) + GCPBackupPlanInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GCPBackupPlanInfo"); + } + + // Use GCPBackupPlanInfo.newBuilder() to construct. + private GCPBackupPlanInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GCPBackupPlanInfo() { + backupPlan_ = ""; + backupPlanRuleId_ = ""; + backupPlanRevisionName_ = ""; + backupPlanRevisionId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.class, + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.Builder.class); + } + + public static final int BACKUP_PLAN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlan_ = ""; + + /** + * + * + *
+     * Resource name of backup plan by which workload is protected at the time
+     * of the backup.
+     * Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlan. + */ + @java.lang.Override + public java.lang.String getBackupPlan() { + java.lang.Object ref = backupPlan_; + 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(); + backupPlan_ = s; + return s; + } + } + + /** + * + * + *
+     * Resource name of backup plan by which workload is protected at the time
+     * of the backup.
+     * Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlan. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanBytes() { + java.lang.Object ref = backupPlan_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlan_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_RULE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanRuleId_ = ""; + + /** + * + * + *
+     * The rule id of the backup plan which triggered this backup in case of
+     * scheduled backup or used for
+     * 
+ * + * string backup_plan_rule_id = 2; + * + * @return The backupPlanRuleId. + */ + @java.lang.Override + public java.lang.String getBackupPlanRuleId() { + java.lang.Object ref = backupPlanRuleId_; + 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(); + backupPlanRuleId_ = s; + return s; + } + } + + /** + * + * + *
+     * The rule id of the backup plan which triggered this backup in case of
+     * scheduled backup or used for
+     * 
+ * + * string backup_plan_rule_id = 2; + * + * @return The bytes for backupPlanRuleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanRuleIdBytes() { + java.lang.Object ref = backupPlanRuleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRuleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_REVISION_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanRevisionName_ = ""; + + /** + * + * + *
+     * Resource name of the backup plan revision which triggered this backup in
+     * case of scheduled backup or used for on demand backup.
+     * Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+     * 
+ * + * string backup_plan_revision_name = 3; + * + * @return The backupPlanRevisionName. + */ + @java.lang.Override + public java.lang.String getBackupPlanRevisionName() { + java.lang.Object ref = backupPlanRevisionName_; + 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(); + backupPlanRevisionName_ = s; + return s; + } + } + + /** + * + * + *
+     * Resource name of the backup plan revision which triggered this backup in
+     * case of scheduled backup or used for on demand backup.
+     * Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+     * 
+ * + * string backup_plan_revision_name = 3; + * + * @return The bytes for backupPlanRevisionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanRevisionNameBytes() { + java.lang.Object ref = backupPlanRevisionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_REVISION_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanRevisionId_ = ""; + + /** + * + * + *
+     * The user friendly id of the backup plan revision which triggered this
+     * backup in case of scheduled backup or used for on demand backup.
+     * 
+ * + * string backup_plan_revision_id = 4; + * + * @return The backupPlanRevisionId. + */ + @java.lang.Override + public java.lang.String getBackupPlanRevisionId() { + java.lang.Object ref = backupPlanRevisionId_; + 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(); + backupPlanRevisionId_ = s; + return s; + } + } + + /** + * + * + *
+     * The user friendly id of the backup plan revision which triggered this
+     * backup in case of scheduled backup or used for on demand backup.
+     * 
+ * + * string backup_plan_revision_id = 4; + * + * @return The bytes for backupPlanRevisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanRevisionIdBytes() { + java.lang.Object ref = backupPlanRevisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionId_ = 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.GeneratedMessage.isStringEmpty(backupPlan_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, backupPlan_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRuleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupPlanRuleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, backupPlanRevisionName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, backupPlanRevisionId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlan_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, backupPlan_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRuleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupPlanRuleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, backupPlanRevisionName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, backupPlanRevisionId_); + } + 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.backupdr.v1beta.Backup.GCPBackupPlanInfo)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo other = + (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) obj; + + if (!getBackupPlan().equals(other.getBackupPlan())) return false; + if (!getBackupPlanRuleId().equals(other.getBackupPlanRuleId())) return false; + if (!getBackupPlanRevisionName().equals(other.getBackupPlanRevisionName())) return false; + if (!getBackupPlanRevisionId().equals(other.getBackupPlanRevisionId())) 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) + BACKUP_PLAN_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlan().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_RULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRuleId().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_REVISION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRevisionName().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRevisionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo 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.backupdr.v1beta.Backup.GCPBackupPlanInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo 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.backupdr.v1beta.Backup.GCPBackupPlanInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.Backup.GCPBackupPlanInfo 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * GCPBackupPlanInfo captures the plan configuration details of Google Cloud
+     * resources at the time of backup.
+     * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.class, + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupPlan_ = ""; + backupPlanRuleId_ = ""; + backupPlanRevisionName_ = ""; + backupPlanRevisionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo build() { + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo buildPartial() { + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo result = + new com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backupPlan_ = backupPlan_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPlanRuleId_ = backupPlanRuleId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupPlanRevisionName_ = backupPlanRevisionName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backupPlanRevisionId_ = backupPlanRevisionId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) { + return mergeFrom((com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo other) { + if (other == com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance()) + return this; + if (!other.getBackupPlan().isEmpty()) { + backupPlan_ = other.backupPlan_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupPlanRuleId().isEmpty()) { + backupPlanRuleId_ = other.backupPlanRuleId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBackupPlanRevisionName().isEmpty()) { + backupPlanRevisionName_ = other.backupPlanRevisionName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getBackupPlanRevisionId().isEmpty()) { + backupPlanRevisionId_ = other.backupPlanRevisionId_; + bitField0_ |= 0x00000008; + 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: + { + backupPlan_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + backupPlanRuleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupPlanRevisionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + backupPlanRevisionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 backupPlan_ = ""; + + /** + * + * + *
+       * Resource name of backup plan by which workload is protected at the time
+       * of the backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+       * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlan. + */ + public java.lang.String getBackupPlan() { + java.lang.Object ref = backupPlan_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlan_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Resource name of backup plan by which workload is protected at the time
+       * of the backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+       * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlan. + */ + public com.google.protobuf.ByteString getBackupPlanBytes() { + java.lang.Object ref = backupPlan_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlan_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Resource name of backup plan by which workload is protected at the time
+       * of the backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+       * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The backupPlan to set. + * @return This builder for chaining. + */ + public Builder setBackupPlan(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlan_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Resource name of backup plan by which workload is protected at the time
+       * of the backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+       * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearBackupPlan() { + backupPlan_ = getDefaultInstance().getBackupPlan(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Resource name of backup plan by which workload is protected at the time
+       * of the backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+       * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for backupPlan to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlan_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupPlanRuleId_ = ""; + + /** + * + * + *
+       * The rule id of the backup plan which triggered this backup in case of
+       * scheduled backup or used for
+       * 
+ * + * string backup_plan_rule_id = 2; + * + * @return The backupPlanRuleId. + */ + public java.lang.String getBackupPlanRuleId() { + java.lang.Object ref = backupPlanRuleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanRuleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The rule id of the backup plan which triggered this backup in case of
+       * scheduled backup or used for
+       * 
+ * + * string backup_plan_rule_id = 2; + * + * @return The bytes for backupPlanRuleId. + */ + public com.google.protobuf.ByteString getBackupPlanRuleIdBytes() { + java.lang.Object ref = backupPlanRuleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRuleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The rule id of the backup plan which triggered this backup in case of
+       * scheduled backup or used for
+       * 
+ * + * string backup_plan_rule_id = 2; + * + * @param value The backupPlanRuleId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRuleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanRuleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * The rule id of the backup plan which triggered this backup in case of
+       * scheduled backup or used for
+       * 
+ * + * string backup_plan_rule_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanRuleId() { + backupPlanRuleId_ = getDefaultInstance().getBackupPlanRuleId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * The rule id of the backup plan which triggered this backup in case of
+       * scheduled backup or used for
+       * 
+ * + * string backup_plan_rule_id = 2; + * + * @param value The bytes for backupPlanRuleId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRuleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanRuleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object backupPlanRevisionName_ = ""; + + /** + * + * + *
+       * Resource name of the backup plan revision which triggered this backup in
+       * case of scheduled backup or used for on demand backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+       * 
+ * + * string backup_plan_revision_name = 3; + * + * @return The backupPlanRevisionName. + */ + public java.lang.String getBackupPlanRevisionName() { + java.lang.Object ref = backupPlanRevisionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanRevisionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Resource name of the backup plan revision which triggered this backup in
+       * case of scheduled backup or used for on demand backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+       * 
+ * + * string backup_plan_revision_name = 3; + * + * @return The bytes for backupPlanRevisionName. + */ + public com.google.protobuf.ByteString getBackupPlanRevisionNameBytes() { + java.lang.Object ref = backupPlanRevisionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Resource name of the backup plan revision which triggered this backup in
+       * case of scheduled backup or used for on demand backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+       * 
+ * + * string backup_plan_revision_name = 3; + * + * @param value The backupPlanRevisionName to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanRevisionName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Resource name of the backup plan revision which triggered this backup in
+       * case of scheduled backup or used for on demand backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+       * 
+ * + * string backup_plan_revision_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanRevisionName() { + backupPlanRevisionName_ = getDefaultInstance().getBackupPlanRevisionName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Resource name of the backup plan revision which triggered this backup in
+       * case of scheduled backup or used for on demand backup.
+       * Format:
+       * projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId}
+       * 
+ * + * string backup_plan_revision_name = 3; + * + * @param value The bytes for backupPlanRevisionName to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanRevisionName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object backupPlanRevisionId_ = ""; + + /** + * + * + *
+       * The user friendly id of the backup plan revision which triggered this
+       * backup in case of scheduled backup or used for on demand backup.
+       * 
+ * + * string backup_plan_revision_id = 4; + * + * @return The backupPlanRevisionId. + */ + public java.lang.String getBackupPlanRevisionId() { + java.lang.Object ref = backupPlanRevisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanRevisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * The user friendly id of the backup plan revision which triggered this
+       * backup in case of scheduled backup or used for on demand backup.
+       * 
+ * + * string backup_plan_revision_id = 4; + * + * @return The bytes for backupPlanRevisionId. + */ + public com.google.protobuf.ByteString getBackupPlanRevisionIdBytes() { + java.lang.Object ref = backupPlanRevisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * The user friendly id of the backup plan revision which triggered this
+       * backup in case of scheduled backup or used for on demand backup.
+       * 
+ * + * string backup_plan_revision_id = 4; + * + * @param value The backupPlanRevisionId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanRevisionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * The user friendly id of the backup plan revision which triggered this
+       * backup in case of scheduled backup or used for on demand backup.
+       * 
+ * + * string backup_plan_revision_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanRevisionId() { + backupPlanRevisionId_ = getDefaultInstance().getBackupPlanRevisionId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+       * The user friendly id of the backup plan revision which triggered this
+       * backup in case of scheduled backup or used for on demand backup.
+       * 
+ * + * string backup_plan_revision_id = 4; + * + * @param value The bytes for backupPlanRevisionId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanRevisionId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) + private static final com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo(); + } + + public static com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GCPBackupPlanInfo 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.backupdr.v1beta.Backup.GCPBackupPlanInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int backupPropertiesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object backupProperties_; + + public enum BackupPropertiesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COMPUTE_INSTANCE_BACKUP_PROPERTIES(19), + CLOUD_SQL_INSTANCE_BACKUP_PROPERTIES(26), + BACKUP_APPLIANCE_BACKUP_PROPERTIES(21), + ALLOY_DB_BACKUP_PROPERTIES(27), + DISK_BACKUP_PROPERTIES(28), + BACKUPPROPERTIES_NOT_SET(0); + private final int value; + + private BackupPropertiesCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BackupPropertiesCase valueOf(int value) { + return forNumber(value); + } + + public static BackupPropertiesCase forNumber(int value) { + switch (value) { + case 19: + return COMPUTE_INSTANCE_BACKUP_PROPERTIES; + case 26: + return CLOUD_SQL_INSTANCE_BACKUP_PROPERTIES; + case 21: + return BACKUP_APPLIANCE_BACKUP_PROPERTIES; + case 27: + return ALLOY_DB_BACKUP_PROPERTIES; + case 28: + return DISK_BACKUP_PROPERTIES; + case 0: + return BACKUPPROPERTIES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BackupPropertiesCase getBackupPropertiesCase() { + return BackupPropertiesCase.forNumber(backupPropertiesCase_); + } + + private int planInfoCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object planInfo_; + + public enum PlanInfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCP_BACKUP_PLAN_INFO(22), + PLANINFO_NOT_SET(0); + private final int value; + + private PlanInfoCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PlanInfoCase valueOf(int value) { + return forNumber(value); + } + + public static PlanInfoCase forNumber(int value) { + switch (value) { + case 22: + return GCP_BACKUP_PLAN_INFO; + case 0: + return PLANINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PlanInfoCase getPlanInfoCase() { + return PlanInfoCase.forNumber(planInfoCase_); + } + + private int sourceResourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceResource_; + + public enum SourceResourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCP_RESOURCE(31), + SOURCERESOURCE_NOT_SET(0); + private final int value; + + private SourceResourceCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceResourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceResourceCase forNumber(int value) { + switch (value) { + case 31: + return GCP_RESOURCE; + case 0: + return SOURCERESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceResourceCase getSourceResourceCase() { + return SourceResourceCase.forNumber(sourceResourceCase_); + } + + public static final int COMPUTE_INSTANCE_BACKUP_PROPERTIES_FIELD_NUMBER = 19; + + /** + * + * + *
+   * Output only. Compute Engine specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the computeInstanceBackupProperties field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceBackupProperties() { + return backupPropertiesCase_ == 19; + } + + /** + * + * + *
+   * Output only. Compute Engine specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The computeInstanceBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + getComputeInstanceBackupProperties() { + if (backupPropertiesCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Compute Engine specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPropertiesOrBuilder + getComputeInstanceBackupPropertiesOrBuilder() { + if (backupPropertiesCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.getDefaultInstance(); + } + + public static final int CLOUD_SQL_INSTANCE_BACKUP_PROPERTIES_FIELD_NUMBER = 26; + + /** + * + * + *
+   * Output only. Cloud SQL specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceBackupProperties field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceBackupProperties() { + return backupPropertiesCase_ == 26; + } + + /** + * + * + *
+   * Output only. Cloud SQL specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + getCloudSqlInstanceBackupProperties() { + if (backupPropertiesCase_ == 26) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Cloud SQL specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPropertiesOrBuilder + getCloudSqlInstanceBackupPropertiesOrBuilder() { + if (backupPropertiesCase_ == 26) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.getDefaultInstance(); + } + + public static final int BACKUP_APPLIANCE_BACKUP_PROPERTIES_FIELD_NUMBER = 21; + + /** + * + * + *
+   * Output only. Backup Appliance specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupApplianceBackupProperties field is set. + */ + @java.lang.Override + public boolean hasBackupApplianceBackupProperties() { + return backupPropertiesCase_ == 21; + } + + /** + * + * + *
+   * Output only. Backup Appliance specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupApplianceBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + getBackupApplianceBackupProperties() { + if (backupPropertiesCase_ == 21) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Backup Appliance specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupPropertiesOrBuilder + getBackupApplianceBackupPropertiesOrBuilder() { + if (backupPropertiesCase_ == 21) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.getDefaultInstance(); + } + + public static final int ALLOY_DB_BACKUP_PROPERTIES_FIELD_NUMBER = 27; + + /** + * + * + *
+   * Output only. AlloyDB specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbBackupProperties field is set. + */ + @java.lang.Override + public boolean hasAlloyDbBackupProperties() { + return backupPropertiesCase_ == 27; + } + + /** + * + * + *
+   * Output only. AlloyDB specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties + getAlloyDbBackupProperties() { + if (backupPropertiesCase_ == 27) { + return (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. AlloyDB specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupPropertiesOrBuilder + getAlloyDbBackupPropertiesOrBuilder() { + if (backupPropertiesCase_ == 27) { + return (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.getDefaultInstance(); + } + + public static final int DISK_BACKUP_PROPERTIES_FIELD_NUMBER = 28; + + /** + * + * + *
+   * Output only. Disk specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the diskBackupProperties field is set. + */ + @java.lang.Override + public boolean hasDiskBackupProperties() { + return backupPropertiesCase_ == 28; + } + + /** + * + * + *
+   * Output only. Disk specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The diskBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupProperties getDiskBackupProperties() { + if (backupPropertiesCase_ == 28) { + return (com.google.cloud.backupdr.v1beta.DiskBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Disk specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPropertiesOrBuilder + getDiskBackupPropertiesOrBuilder() { + if (backupPropertiesCase_ == 28) { + return (com.google.cloud.backupdr.v1beta.DiskBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance(); + } + + public static final int GCP_BACKUP_PLAN_INFO_FIELD_NUMBER = 22; + + /** + * + * + *
+   * Output only. Configuration for a Google Cloud resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcpBackupPlanInfo field is set. + */ + @java.lang.Override + public boolean hasGcpBackupPlanInfo() { + return planInfoCase_ == 22; + } + + /** + * + * + *
+   * Output only. Configuration for a Google Cloud resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcpBackupPlanInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo getGcpBackupPlanInfo() { + if (planInfoCase_ == 22) { + return (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) planInfo_; + } + return com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Configuration for a Google Cloud resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfoOrBuilder + getGcpBackupPlanInfoOrBuilder() { + if (planInfoCase_ == 22) { + return (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) planInfo_; + } + return com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance(); + } + + public static final int GCP_RESOURCE_FIELD_NUMBER = 31; + + /** + * + * + *
+   * Output only. Unique identifier of the GCP resource that is being backed
+   * up.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcpResource field is set. + */ + @java.lang.Override + public boolean hasGcpResource() { + return sourceResourceCase_ == 31; + } + + /** + * + * + *
+   * Output only. Unique identifier of the GCP resource that is being backed
+   * up.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcpResource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupGcpResource getGcpResource() { + if (sourceResourceCase_ == 31) { + return (com.google.cloud.backupdr.v1beta.BackupGcpResource) sourceResource_; + } + return com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Unique identifier of the GCP resource that is being backed
+   * up.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupGcpResourceOrBuilder getGcpResourceOrBuilder() { + if (sourceResourceCase_ == 31) { + return (com.google.cloud.backupdr.v1beta.BackupGcpResource) sourceResource_; + } + return com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Identifier. Name of the backup to create. It must have the
+   * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+   * `{backup}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the datasource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Identifier. Name of the backup to create. It must have the
+   * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+   * `{backup}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the datasource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Output only. The description of the Backup instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The description of the Backup instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+   * Output only. The description of the Backup instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .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 ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .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. The time when the instance was created.
+   * 
+ * + * + * optional .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 UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_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(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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 ENFORCED_RETENTION_END_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp enforcedRetentionEndTime_; + + /** + * + * + *
+   * Optional. The backup can not be deleted before this time.
+   * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enforcedRetentionEndTime field is set. + */ + @java.lang.Override + public boolean hasEnforcedRetentionEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. The backup can not be deleted before this time.
+   * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enforcedRetentionEndTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEnforcedRetentionEndTime() { + return enforcedRetentionEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : enforcedRetentionEndTime_; + } + + /** + * + * + *
+   * Optional. The backup can not be deleted before this time.
+   * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEnforcedRetentionEndTimeOrBuilder() { + return enforcedRetentionEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : enforcedRetentionEndTime_; + } + + public static final int BACKUP_RETENTION_INHERITANCE_FIELD_NUMBER = 30; + private int backupRetentionInheritance_ = 0; + + /** + * + * + *
+   * Output only. Setting for how the enforced retention end time is inherited.
+   * This value is copied from this backup's BackupVault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupRetentionInheritance field is set. + */ + @java.lang.Override + public boolean hasBackupRetentionInheritance() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. Setting for how the enforced retention end time is inherited.
+   * This value is copied from this backup's BackupVault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backupRetentionInheritance. + */ + @java.lang.Override + public int getBackupRetentionInheritanceValue() { + return backupRetentionInheritance_; + } + + /** + * + * + *
+   * Output only. Setting for how the enforced retention end time is inherited.
+   * This value is copied from this backup's BackupVault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupRetentionInheritance. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance + getBackupRetentionInheritance() { + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance result = + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance.forNumber( + backupRetentionInheritance_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance.UNRECOGNIZED + : result; + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp expireTime_; + + /** + * + * + *
+   * Optional. When this backup is automatically expired.
+   * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. When this backup is automatically expired.
+   * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + /** + * + * + *
+   * Optional. When this backup is automatically expired.
+   * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + public static final int CONSISTENCY_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp consistencyTime_; + + /** + * + * + *
+   * Output only. The point in time when this backup was captured from the
+   * source.
+   * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the consistencyTime field is set. + */ + @java.lang.Override + public boolean hasConsistencyTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Output only. The point in time when this backup was captured from the
+   * source.
+   * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The consistencyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getConsistencyTime() { + return consistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : consistencyTime_; + } + + /** + * + * + *
+   * Output only. The point in time when this backup was captured from the
+   * source.
+   * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getConsistencyTimeOrBuilder() { + return consistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : consistencyTime_; + } + + public static final int ETAG_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. Server specified ETag to prevent updates from overwriting each
+   * other.
+   * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the etag field is set. + */ + @java.lang.Override + public boolean hasEtag() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. Server specified ETag to prevent updates from overwriting each
+   * other.
+   * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Server specified ETag to prevent updates from overwriting each
+   * other.
+   * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 15; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The Backup resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.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 resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.State getState() { + com.google.cloud.backupdr.v1beta.Backup.State result = + com.google.cloud.backupdr.v1beta.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.backupdr.v1beta.Backup.State.UNRECOGNIZED : result; + } + + public static final int SERVICE_LOCKS_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private java.util.List serviceLocks_; + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getServiceLocksList() { + return serviceLocks_; + } + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getServiceLocksOrBuilderList() { + return serviceLocks_; + } + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getServiceLocksCount() { + return serviceLocks_.size(); + } + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLock getServiceLocks(int index) { + return serviceLocks_.get(index); + } + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLockOrBuilder getServiceLocksOrBuilder(int index) { + return serviceLocks_.get(index); + } + + public static final int BACKUP_APPLIANCE_LOCKS_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private java.util.List backupApplianceLocks_; + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getBackupApplianceLocksList() { + return backupApplianceLocks_; + } + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getBackupApplianceLocksOrBuilderList() { + return backupApplianceLocks_; + } + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getBackupApplianceLocksCount() { + return backupApplianceLocks_.size(); + } + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLock getBackupApplianceLocks(int index) { + return backupApplianceLocks_.get(index); + } + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLockOrBuilder getBackupApplianceLocksOrBuilder( + int index) { + return backupApplianceLocks_.get(index); + } + + public static final int BACKUP_TYPE_FIELD_NUMBER = 20; + private int backupType_ = 0; + + /** + * + * + *
+   * Output only. Type of the backup, unspecified, scheduled or ondemand.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.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 the backup, unspecified, scheduled or ondemand.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.BackupType getBackupType() { + com.google.cloud.backupdr.v1beta.Backup.BackupType result = + com.google.cloud.backupdr.v1beta.Backup.BackupType.forNumber(backupType_); + return result == null + ? com.google.cloud.backupdr.v1beta.Backup.BackupType.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_SIZE_BYTES_FIELD_NUMBER = 23; + private long resourceSizeBytes_ = 0L; + + /** + * + * + *
+   * Output only. source resource size in bytes at the time of the backup.
+   * 
+ * + * int64 resource_size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceSizeBytes. + */ + @java.lang.Override + public long getResourceSizeBytes() { + return resourceSizeBytes_; + } + + public static final int SATISFIES_PZS_FIELD_NUMBER = 24; + private boolean satisfiesPzs_ = false; + + /** + * + * + *
+   * Optional. Output only. Reserved for future use.
+   * 
+ * + * + * optional bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the satisfiesPzs field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzs() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. Output only. Reserved for future use.
+   * 
+ * + * + * optional bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + + public static final int SATISFIES_PZI_FIELD_NUMBER = 25; + private boolean satisfiesPzi_ = false; + + /** + * + * + *
+   * Optional. Output only. Reserved for future use.
+   * 
+ * + * + * optional bool satisfies_pzi = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the satisfiesPzi field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzi() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Optional. Output only. Reserved for future use.
+   * 
+ * + * + * optional bool satisfies_pzi = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + + public static final int KMS_KEY_VERSIONS_FIELD_NUMBER = 33; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList kmsKeyVersions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Output only. The list of KMS key versions used to encrypt the
+   * backup.
+   * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the kmsKeyVersions. + */ + public com.google.protobuf.ProtocolStringList getKmsKeyVersionsList() { + return kmsKeyVersions_; + } + + /** + * + * + *
+   * Optional. Output only. The list of KMS key versions used to encrypt the
+   * backup.
+   * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of kmsKeyVersions. + */ + public int getKmsKeyVersionsCount() { + return kmsKeyVersions_.size(); + } + + /** + * + * + *
+   * Optional. Output only. The list of KMS key versions used to encrypt the
+   * backup.
+   * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The kmsKeyVersions at the given index. + */ + public java.lang.String getKmsKeyVersions(int index) { + return kmsKeyVersions_.get(index); + } + + /** + * + * + *
+   * Optional. Output only. The list of KMS key versions used to encrypt the
+   * backup.
+   * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the kmsKeyVersions at the given index. + */ + public com.google.protobuf.ByteString getKmsKeyVersionsBytes(int index) { + return kmsKeyVersions_.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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getEnforcedRetentionEndTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(7, getExpireTime()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(9, getConsistencyTime()); + } + if (((bitField0_ & 0x00000080) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, etag_); + } + if (state_ != com.google.cloud.backupdr.v1beta.Backup.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(15, state_); + } + for (int i = 0; i < serviceLocks_.size(); i++) { + output.writeMessage(17, serviceLocks_.get(i)); + } + for (int i = 0; i < backupApplianceLocks_.size(); i++) { + output.writeMessage(18, backupApplianceLocks_.get(i)); + } + if (backupPropertiesCase_ == 19) { + output.writeMessage( + 19, (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) backupProperties_); + } + if (backupType_ + != com.google.cloud.backupdr.v1beta.Backup.BackupType.BACKUP_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(20, backupType_); + } + if (backupPropertiesCase_ == 21) { + output.writeMessage( + 21, (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) backupProperties_); + } + if (planInfoCase_ == 22) { + output.writeMessage( + 22, (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) planInfo_); + } + if (resourceSizeBytes_ != 0L) { + output.writeInt64(23, resourceSizeBytes_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeBool(24, satisfiesPzs_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeBool(25, satisfiesPzi_); + } + if (backupPropertiesCase_ == 26) { + output.writeMessage( + 26, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) backupProperties_); + } + if (backupPropertiesCase_ == 27) { + output.writeMessage( + 27, (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) backupProperties_); + } + if (backupPropertiesCase_ == 28) { + output.writeMessage( + 28, (com.google.cloud.backupdr.v1beta.DiskBackupProperties) backupProperties_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeEnum(30, backupRetentionInheritance_); + } + if (sourceResourceCase_ == 31) { + output.writeMessage(31, (com.google.cloud.backupdr.v1beta.BackupGcpResource) sourceResource_); + } + for (int i = 0; i < kmsKeyVersions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 33, kmsKeyVersions_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + 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__); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getEnforcedRetentionEndTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getExpireTime()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getConsistencyTime()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, etag_); + } + if (state_ != com.google.cloud.backupdr.v1beta.Backup.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, state_); + } + for (int i = 0; i < serviceLocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, serviceLocks_.get(i)); + } + for (int i = 0; i < backupApplianceLocks_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, backupApplianceLocks_.get(i)); + } + if (backupPropertiesCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) backupProperties_); + } + if (backupType_ + != com.google.cloud.backupdr.v1beta.Backup.BackupType.BACKUP_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, backupType_); + } + if (backupPropertiesCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 21, + (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) backupProperties_); + } + if (planInfoCase_ == 22) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 22, (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) planInfo_); + } + if (resourceSizeBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(23, resourceSizeBytes_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, satisfiesPzs_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(25, satisfiesPzi_); + } + if (backupPropertiesCase_ == 26) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 26, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + backupProperties_); + } + if (backupPropertiesCase_ == 27) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, + (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) backupProperties_); + } + if (backupPropertiesCase_ == 28) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 28, (com.google.cloud.backupdr.v1beta.DiskBackupProperties) backupProperties_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(30, backupRetentionInheritance_); + } + if (sourceResourceCase_ == 31) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 31, (com.google.cloud.backupdr.v1beta.BackupGcpResource) sourceResource_); + } + { + int dataSize = 0; + for (int i = 0; i < kmsKeyVersions_.size(); i++) { + dataSize += computeStringSizeNoTag(kmsKeyVersions_.getRaw(i)); + } + size += dataSize; + size += 2 * getKmsKeyVersionsList().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.backupdr.v1beta.Backup)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.Backup other = (com.google.cloud.backupdr.v1beta.Backup) obj; + + if (!getName().equals(other.getName())) return false; + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription().equals(other.getDescription())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasEnforcedRetentionEndTime() != other.hasEnforcedRetentionEndTime()) return false; + if (hasEnforcedRetentionEndTime()) { + if (!getEnforcedRetentionEndTime().equals(other.getEnforcedRetentionEndTime())) return false; + } + if (hasBackupRetentionInheritance() != other.hasBackupRetentionInheritance()) return false; + if (hasBackupRetentionInheritance()) { + if (backupRetentionInheritance_ != other.backupRetentionInheritance_) return false; + } + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (hasConsistencyTime() != other.hasConsistencyTime()) return false; + if (hasConsistencyTime()) { + if (!getConsistencyTime().equals(other.getConsistencyTime())) return false; + } + if (hasEtag() != other.hasEtag()) return false; + if (hasEtag()) { + if (!getEtag().equals(other.getEtag())) return false; + } + if (state_ != other.state_) return false; + if (!getServiceLocksList().equals(other.getServiceLocksList())) return false; + if (!getBackupApplianceLocksList().equals(other.getBackupApplianceLocksList())) return false; + if (backupType_ != other.backupType_) return false; + if (getResourceSizeBytes() != other.getResourceSizeBytes()) return false; + if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false; + if (hasSatisfiesPzs()) { + if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; + } + if (hasSatisfiesPzi() != other.hasSatisfiesPzi()) return false; + if (hasSatisfiesPzi()) { + if (getSatisfiesPzi() != other.getSatisfiesPzi()) return false; + } + if (!getKmsKeyVersionsList().equals(other.getKmsKeyVersionsList())) return false; + if (!getBackupPropertiesCase().equals(other.getBackupPropertiesCase())) return false; + switch (backupPropertiesCase_) { + case 19: + if (!getComputeInstanceBackupProperties() + .equals(other.getComputeInstanceBackupProperties())) return false; + break; + case 26: + if (!getCloudSqlInstanceBackupProperties() + .equals(other.getCloudSqlInstanceBackupProperties())) return false; + break; + case 21: + if (!getBackupApplianceBackupProperties() + .equals(other.getBackupApplianceBackupProperties())) return false; + break; + case 27: + if (!getAlloyDbBackupProperties().equals(other.getAlloyDbBackupProperties())) return false; + break; + case 28: + if (!getDiskBackupProperties().equals(other.getDiskBackupProperties())) return false; + break; + case 0: + default: + } + if (!getPlanInfoCase().equals(other.getPlanInfoCase())) return false; + switch (planInfoCase_) { + case 22: + if (!getGcpBackupPlanInfo().equals(other.getGcpBackupPlanInfo())) return false; + break; + case 0: + default: + } + if (!getSourceResourceCase().equals(other.getSourceResourceCase())) return false; + switch (sourceResourceCase_) { + case 31: + if (!getGcpResource().equals(other.getGcpResource())) return false; + break; + case 0: + default: + } + 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 (hasDescription()) { + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasEnforcedRetentionEndTime()) { + hash = (37 * hash) + ENFORCED_RETENTION_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEnforcedRetentionEndTime().hashCode(); + } + if (hasBackupRetentionInheritance()) { + hash = (37 * hash) + BACKUP_RETENTION_INHERITANCE_FIELD_NUMBER; + hash = (53 * hash) + backupRetentionInheritance_; + } + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + if (hasConsistencyTime()) { + hash = (37 * hash) + CONSISTENCY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getConsistencyTime().hashCode(); + } + if (hasEtag()) { + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getServiceLocksCount() > 0) { + hash = (37 * hash) + SERVICE_LOCKS_FIELD_NUMBER; + hash = (53 * hash) + getServiceLocksList().hashCode(); + } + if (getBackupApplianceLocksCount() > 0) { + hash = (37 * hash) + BACKUP_APPLIANCE_LOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBackupApplianceLocksList().hashCode(); + } + hash = (37 * hash) + BACKUP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + backupType_; + hash = (37 * hash) + RESOURCE_SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getResourceSizeBytes()); + if (hasSatisfiesPzs()) { + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); + } + if (hasSatisfiesPzi()) { + hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); + } + if (getKmsKeyVersionsCount() > 0) { + hash = (37 * hash) + KMS_KEY_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyVersionsList().hashCode(); + } + switch (backupPropertiesCase_) { + case 19: + hash = (37 * hash) + COMPUTE_INSTANCE_BACKUP_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getComputeInstanceBackupProperties().hashCode(); + break; + case 26: + hash = (37 * hash) + CLOUD_SQL_INSTANCE_BACKUP_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstanceBackupProperties().hashCode(); + break; + case 21: + hash = (37 * hash) + BACKUP_APPLIANCE_BACKUP_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getBackupApplianceBackupProperties().hashCode(); + break; + case 27: + hash = (37 * hash) + ALLOY_DB_BACKUP_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getAlloyDbBackupProperties().hashCode(); + break; + case 28: + hash = (37 * hash) + DISK_BACKUP_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getDiskBackupProperties().hashCode(); + break; + case 0: + default: + } + switch (planInfoCase_) { + case 22: + hash = (37 * hash) + GCP_BACKUP_PLAN_INFO_FIELD_NUMBER; + hash = (53 * hash) + getGcpBackupPlanInfo().hashCode(); + break; + case 0: + default: + } + switch (sourceResourceCase_) { + case 31: + hash = (37 * hash) + GCP_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcpResource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.Backup parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.Backup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.Backup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Backup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Backup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Backup parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Backup parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Backup parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Backup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Backup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing a Backup object.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Backup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.Backup) + com.google.cloud.backupdr.v1beta.BackupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Backup.class, + com.google.cloud.backupdr.v1beta.Backup.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.Backup.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetEnforcedRetentionEndTimeFieldBuilder(); + internalGetExpireTimeFieldBuilder(); + internalGetConsistencyTimeFieldBuilder(); + internalGetServiceLocksFieldBuilder(); + internalGetBackupApplianceLocksFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (computeInstanceBackupPropertiesBuilder_ != null) { + computeInstanceBackupPropertiesBuilder_.clear(); + } + if (cloudSqlInstanceBackupPropertiesBuilder_ != null) { + cloudSqlInstanceBackupPropertiesBuilder_.clear(); + } + if (backupApplianceBackupPropertiesBuilder_ != null) { + backupApplianceBackupPropertiesBuilder_.clear(); + } + if (alloyDbBackupPropertiesBuilder_ != null) { + alloyDbBackupPropertiesBuilder_.clear(); + } + if (diskBackupPropertiesBuilder_ != null) { + diskBackupPropertiesBuilder_.clear(); + } + if (gcpBackupPlanInfoBuilder_ != null) { + gcpBackupPlanInfoBuilder_.clear(); + } + if (gcpResourceBuilder_ != null) { + gcpResourceBuilder_.clear(); + } + name_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + enforcedRetentionEndTime_ = null; + if (enforcedRetentionEndTimeBuilder_ != null) { + enforcedRetentionEndTimeBuilder_.dispose(); + enforcedRetentionEndTimeBuilder_ = null; + } + backupRetentionInheritance_ = 0; + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + consistencyTime_ = null; + if (consistencyTimeBuilder_ != null) { + consistencyTimeBuilder_.dispose(); + consistencyTimeBuilder_ = null; + } + etag_ = ""; + state_ = 0; + if (serviceLocksBuilder_ == null) { + serviceLocks_ = java.util.Collections.emptyList(); + } else { + serviceLocks_ = null; + serviceLocksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00040000); + if (backupApplianceLocksBuilder_ == null) { + backupApplianceLocks_ = java.util.Collections.emptyList(); + } else { + backupApplianceLocks_ = null; + backupApplianceLocksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00080000); + backupType_ = 0; + resourceSizeBytes_ = 0L; + satisfiesPzs_ = false; + satisfiesPzi_ = false; + kmsKeyVersions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + backupPropertiesCase_ = 0; + backupProperties_ = null; + planInfoCase_ = 0; + planInfo_ = null; + sourceResourceCase_ = 0; + sourceResource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_Backup_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup build() { + com.google.cloud.backupdr.v1beta.Backup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup buildPartial() { + com.google.cloud.backupdr.v1beta.Backup result = + new com.google.cloud.backupdr.v1beta.Backup(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.backupdr.v1beta.Backup result) { + if (serviceLocksBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0)) { + serviceLocks_ = java.util.Collections.unmodifiableList(serviceLocks_); + bitField0_ = (bitField0_ & ~0x00040000); + } + result.serviceLocks_ = serviceLocks_; + } else { + result.serviceLocks_ = serviceLocksBuilder_.build(); + } + if (backupApplianceLocksBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0)) { + backupApplianceLocks_ = java.util.Collections.unmodifiableList(backupApplianceLocks_); + bitField0_ = (bitField0_ & ~0x00080000); + } + result.backupApplianceLocks_ = backupApplianceLocks_; + } else { + result.backupApplianceLocks_ = backupApplianceLocksBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.Backup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000100) != 0)) { + result.description_ = description_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.enforcedRetentionEndTime_ = + enforcedRetentionEndTimeBuilder_ == null + ? enforcedRetentionEndTime_ + : enforcedRetentionEndTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.backupRetentionInheritance_ = backupRetentionInheritance_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.consistencyTime_ = + consistencyTimeBuilder_ == null ? consistencyTime_ : consistencyTimeBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.etag_ = etag_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.backupType_ = backupType_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.resourceSizeBytes_ = resourceSizeBytes_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.satisfiesPzi_ = satisfiesPzi_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + kmsKeyVersions_.makeImmutable(); + result.kmsKeyVersions_ = kmsKeyVersions_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.Backup result) { + result.backupPropertiesCase_ = backupPropertiesCase_; + result.backupProperties_ = this.backupProperties_; + if (backupPropertiesCase_ == 19 && computeInstanceBackupPropertiesBuilder_ != null) { + result.backupProperties_ = computeInstanceBackupPropertiesBuilder_.build(); + } + if (backupPropertiesCase_ == 26 && cloudSqlInstanceBackupPropertiesBuilder_ != null) { + result.backupProperties_ = cloudSqlInstanceBackupPropertiesBuilder_.build(); + } + if (backupPropertiesCase_ == 21 && backupApplianceBackupPropertiesBuilder_ != null) { + result.backupProperties_ = backupApplianceBackupPropertiesBuilder_.build(); + } + if (backupPropertiesCase_ == 27 && alloyDbBackupPropertiesBuilder_ != null) { + result.backupProperties_ = alloyDbBackupPropertiesBuilder_.build(); + } + if (backupPropertiesCase_ == 28 && diskBackupPropertiesBuilder_ != null) { + result.backupProperties_ = diskBackupPropertiesBuilder_.build(); + } + result.planInfoCase_ = planInfoCase_; + result.planInfo_ = this.planInfo_; + if (planInfoCase_ == 22 && gcpBackupPlanInfoBuilder_ != null) { + result.planInfo_ = gcpBackupPlanInfoBuilder_.build(); + } + result.sourceResourceCase_ = sourceResourceCase_; + result.sourceResource_ = this.sourceResource_; + if (sourceResourceCase_ == 31 && gcpResourceBuilder_ != null) { + result.sourceResource_ = gcpResourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.Backup) { + return mergeFrom((com.google.cloud.backupdr.v1beta.Backup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.Backup other) { + if (other == com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasDescription()) { + description_ = other.description_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000800; + if (other.hasEnforcedRetentionEndTime()) { + mergeEnforcedRetentionEndTime(other.getEnforcedRetentionEndTime()); + } + if (other.hasBackupRetentionInheritance()) { + setBackupRetentionInheritanceValue(other.getBackupRetentionInheritanceValue()); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (other.hasConsistencyTime()) { + mergeConsistencyTime(other.getConsistencyTime()); + } + if (other.hasEtag()) { + etag_ = other.etag_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (serviceLocksBuilder_ == null) { + if (!other.serviceLocks_.isEmpty()) { + if (serviceLocks_.isEmpty()) { + serviceLocks_ = other.serviceLocks_; + bitField0_ = (bitField0_ & ~0x00040000); + } else { + ensureServiceLocksIsMutable(); + serviceLocks_.addAll(other.serviceLocks_); + } + onChanged(); + } + } else { + if (!other.serviceLocks_.isEmpty()) { + if (serviceLocksBuilder_.isEmpty()) { + serviceLocksBuilder_.dispose(); + serviceLocksBuilder_ = null; + serviceLocks_ = other.serviceLocks_; + bitField0_ = (bitField0_ & ~0x00040000); + serviceLocksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetServiceLocksFieldBuilder() + : null; + } else { + serviceLocksBuilder_.addAllMessages(other.serviceLocks_); + } + } + } + if (backupApplianceLocksBuilder_ == null) { + if (!other.backupApplianceLocks_.isEmpty()) { + if (backupApplianceLocks_.isEmpty()) { + backupApplianceLocks_ = other.backupApplianceLocks_; + bitField0_ = (bitField0_ & ~0x00080000); + } else { + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.addAll(other.backupApplianceLocks_); + } + onChanged(); + } + } else { + if (!other.backupApplianceLocks_.isEmpty()) { + if (backupApplianceLocksBuilder_.isEmpty()) { + backupApplianceLocksBuilder_.dispose(); + backupApplianceLocksBuilder_ = null; + backupApplianceLocks_ = other.backupApplianceLocks_; + bitField0_ = (bitField0_ & ~0x00080000); + backupApplianceLocksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupApplianceLocksFieldBuilder() + : null; + } else { + backupApplianceLocksBuilder_.addAllMessages(other.backupApplianceLocks_); + } + } + } + if (other.backupType_ != 0) { + setBackupTypeValue(other.getBackupTypeValue()); + } + if (other.getResourceSizeBytes() != 0L) { + setResourceSizeBytes(other.getResourceSizeBytes()); + } + if (other.hasSatisfiesPzs()) { + setSatisfiesPzs(other.getSatisfiesPzs()); + } + if (other.hasSatisfiesPzi()) { + setSatisfiesPzi(other.getSatisfiesPzi()); + } + if (!other.kmsKeyVersions_.isEmpty()) { + if (kmsKeyVersions_.isEmpty()) { + kmsKeyVersions_ = other.kmsKeyVersions_; + bitField0_ |= 0x01000000; + } else { + ensureKmsKeyVersionsIsMutable(); + kmsKeyVersions_.addAll(other.kmsKeyVersions_); + } + onChanged(); + } + switch (other.getBackupPropertiesCase()) { + case COMPUTE_INSTANCE_BACKUP_PROPERTIES: + { + mergeComputeInstanceBackupProperties(other.getComputeInstanceBackupProperties()); + break; + } + case CLOUD_SQL_INSTANCE_BACKUP_PROPERTIES: + { + mergeCloudSqlInstanceBackupProperties(other.getCloudSqlInstanceBackupProperties()); + break; + } + case BACKUP_APPLIANCE_BACKUP_PROPERTIES: + { + mergeBackupApplianceBackupProperties(other.getBackupApplianceBackupProperties()); + break; + } + case ALLOY_DB_BACKUP_PROPERTIES: + { + mergeAlloyDbBackupProperties(other.getAlloyDbBackupProperties()); + break; + } + case DISK_BACKUP_PROPERTIES: + { + mergeDiskBackupProperties(other.getDiskBackupProperties()); + break; + } + case BACKUPPROPERTIES_NOT_SET: + { + break; + } + } + switch (other.getPlanInfoCase()) { + case GCP_BACKUP_PLAN_INFO: + { + mergeGcpBackupPlanInfo(other.getGcpBackupPlanInfo()); + break; + } + case PLANINFO_NOT_SET: + { + break; + } + } + switch (other.getSourceResourceCase()) { + case GCP_RESOURCE: + { + mergeGcpResource(other.getGcpResource()); + break; + } + case SOURCERESOURCE_NOT_SET: + { + break; + } + } + 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_ |= 0x00000080; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetEnforcedRetentionEndTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 58 + case 74: + { + input.readMessage( + internalGetConsistencyTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 74 + case 90: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 90 + case 120: + { + state_ = input.readEnum(); + bitField0_ |= 0x00020000; + break; + } // case 120 + case 138: + { + com.google.cloud.backupdr.v1beta.BackupLock m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupLock.parser(), extensionRegistry); + if (serviceLocksBuilder_ == null) { + ensureServiceLocksIsMutable(); + serviceLocks_.add(m); + } else { + serviceLocksBuilder_.addMessage(m); + } + break; + } // case 138 + case 146: + { + com.google.cloud.backupdr.v1beta.BackupLock m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupLock.parser(), extensionRegistry); + if (backupApplianceLocksBuilder_ == null) { + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.add(m); + } else { + backupApplianceLocksBuilder_.addMessage(m); + } + break; + } // case 146 + case 154: + { + input.readMessage( + internalGetComputeInstanceBackupPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + backupPropertiesCase_ = 19; + break; + } // case 154 + case 160: + { + backupType_ = input.readEnum(); + bitField0_ |= 0x00100000; + break; + } // case 160 + case 170: + { + input.readMessage( + internalGetBackupApplianceBackupPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + backupPropertiesCase_ = 21; + break; + } // case 170 + case 178: + { + input.readMessage( + internalGetGcpBackupPlanInfoFieldBuilder().getBuilder(), extensionRegistry); + planInfoCase_ = 22; + break; + } // case 178 + case 184: + { + resourceSizeBytes_ = input.readInt64(); + bitField0_ |= 0x00200000; + break; + } // case 184 + case 192: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00400000; + break; + } // case 192 + case 200: + { + satisfiesPzi_ = input.readBool(); + bitField0_ |= 0x00800000; + break; + } // case 200 + case 210: + { + input.readMessage( + internalGetCloudSqlInstanceBackupPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + backupPropertiesCase_ = 26; + break; + } // case 210 + case 218: + { + input.readMessage( + internalGetAlloyDbBackupPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + backupPropertiesCase_ = 27; + break; + } // case 218 + case 226: + { + input.readMessage( + internalGetDiskBackupPropertiesFieldBuilder().getBuilder(), extensionRegistry); + backupPropertiesCase_ = 28; + break; + } // case 226 + case 240: + { + backupRetentionInheritance_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 240 + case 250: + { + input.readMessage( + internalGetGcpResourceFieldBuilder().getBuilder(), extensionRegistry); + sourceResourceCase_ = 31; + break; + } // case 250 + case 266: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureKmsKeyVersionsIsMutable(); + kmsKeyVersions_.add(s); + break; + } // case 266 + 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 backupPropertiesCase_ = 0; + private java.lang.Object backupProperties_; + + public BackupPropertiesCase getBackupPropertiesCase() { + return BackupPropertiesCase.forNumber(backupPropertiesCase_); + } + + public Builder clearBackupProperties() { + backupPropertiesCase_ = 0; + backupProperties_ = null; + onChanged(); + return this; + } + + private int planInfoCase_ = 0; + private java.lang.Object planInfo_; + + public PlanInfoCase getPlanInfoCase() { + return PlanInfoCase.forNumber(planInfoCase_); + } + + public Builder clearPlanInfo() { + planInfoCase_ = 0; + planInfo_ = null; + onChanged(); + return this; + } + + private int sourceResourceCase_ = 0; + private java.lang.Object sourceResource_; + + public SourceResourceCase getSourceResourceCase() { + return SourceResourceCase.forNumber(sourceResourceCase_); + } + + public Builder clearSourceResource() { + sourceResourceCase_ = 0; + sourceResource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPropertiesOrBuilder> + computeInstanceBackupPropertiesBuilder_; + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the computeInstanceBackupProperties field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceBackupProperties() { + return backupPropertiesCase_ == 19; + } + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The computeInstanceBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + getComputeInstanceBackupProperties() { + if (computeInstanceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + backupProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + .getDefaultInstance(); + } else { + if (backupPropertiesCase_ == 19) { + return computeInstanceBackupPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setComputeInstanceBackupProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties value) { + if (computeInstanceBackupPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupProperties_ = value; + onChanged(); + } else { + computeInstanceBackupPropertiesBuilder_.setMessage(value); + } + backupPropertiesCase_ = 19; + return this; + } + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setComputeInstanceBackupProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.Builder builderForValue) { + if (computeInstanceBackupPropertiesBuilder_ == null) { + backupProperties_ = builderForValue.build(); + onChanged(); + } else { + computeInstanceBackupPropertiesBuilder_.setMessage(builderForValue.build()); + } + backupPropertiesCase_ = 19; + return this; + } + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeComputeInstanceBackupProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties value) { + if (computeInstanceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 19 + && backupProperties_ + != com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + .getDefaultInstance()) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + backupProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + backupProperties_ = value; + } + onChanged(); + } else { + if (backupPropertiesCase_ == 19) { + computeInstanceBackupPropertiesBuilder_.mergeFrom(value); + } else { + computeInstanceBackupPropertiesBuilder_.setMessage(value); + } + } + backupPropertiesCase_ = 19; + return this; + } + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearComputeInstanceBackupProperties() { + if (computeInstanceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 19) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + onChanged(); + } + } else { + if (backupPropertiesCase_ == 19) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + } + computeInstanceBackupPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.Builder + getComputeInstanceBackupPropertiesBuilder() { + return internalGetComputeInstanceBackupPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPropertiesOrBuilder + getComputeInstanceBackupPropertiesOrBuilder() { + if ((backupPropertiesCase_ == 19) && (computeInstanceBackupPropertiesBuilder_ != null)) { + return computeInstanceBackupPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (backupPropertiesCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + backupProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Compute Engine specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPropertiesOrBuilder> + internalGetComputeInstanceBackupPropertiesFieldBuilder() { + if (computeInstanceBackupPropertiesBuilder_ == null) { + if (!(backupPropertiesCase_ == 19)) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.getDefaultInstance(); + } + computeInstanceBackupPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + backupProperties_, + getParentForChildren(), + isClean()); + backupProperties_ = null; + } + backupPropertiesCase_ = 19; + onChanged(); + return computeInstanceBackupPropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPropertiesOrBuilder> + cloudSqlInstanceBackupPropertiesBuilder_; + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceBackupProperties field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceBackupProperties() { + return backupPropertiesCase_ == 26; + } + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + getCloudSqlInstanceBackupProperties() { + if (cloudSqlInstanceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 26) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + backupProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + .getDefaultInstance(); + } else { + if (backupPropertiesCase_ == 26) { + return cloudSqlInstanceBackupPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudSqlInstanceBackupProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties value) { + if (cloudSqlInstanceBackupPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupProperties_ = value; + onChanged(); + } else { + cloudSqlInstanceBackupPropertiesBuilder_.setMessage(value); + } + backupPropertiesCase_ = 26; + return this; + } + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudSqlInstanceBackupProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.Builder builderForValue) { + if (cloudSqlInstanceBackupPropertiesBuilder_ == null) { + backupProperties_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlInstanceBackupPropertiesBuilder_.setMessage(builderForValue.build()); + } + backupPropertiesCase_ = 26; + return this; + } + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCloudSqlInstanceBackupProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties value) { + if (cloudSqlInstanceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 26 + && backupProperties_ + != com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + .getDefaultInstance()) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + backupProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + backupProperties_ = value; + } + onChanged(); + } else { + if (backupPropertiesCase_ == 26) { + cloudSqlInstanceBackupPropertiesBuilder_.mergeFrom(value); + } else { + cloudSqlInstanceBackupPropertiesBuilder_.setMessage(value); + } + } + backupPropertiesCase_ = 26; + return this; + } + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCloudSqlInstanceBackupProperties() { + if (cloudSqlInstanceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 26) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + onChanged(); + } + } else { + if (backupPropertiesCase_ == 26) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + } + cloudSqlInstanceBackupPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.Builder + getCloudSqlInstanceBackupPropertiesBuilder() { + return internalGetCloudSqlInstanceBackupPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPropertiesOrBuilder + getCloudSqlInstanceBackupPropertiesOrBuilder() { + if ((backupPropertiesCase_ == 26) && (cloudSqlInstanceBackupPropertiesBuilder_ != null)) { + return cloudSqlInstanceBackupPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (backupPropertiesCase_ == 26) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + backupProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Cloud SQL specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPropertiesOrBuilder> + internalGetCloudSqlInstanceBackupPropertiesFieldBuilder() { + if (cloudSqlInstanceBackupPropertiesBuilder_ == null) { + if (!(backupPropertiesCase_ == 26)) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + .getDefaultInstance(); + } + cloudSqlInstanceBackupPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + backupProperties_, + getParentForChildren(), + isClean()); + backupProperties_ = null; + } + backupPropertiesCase_ = 26; + onChanged(); + return cloudSqlInstanceBackupPropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupPropertiesOrBuilder> + backupApplianceBackupPropertiesBuilder_; + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupApplianceBackupProperties field is set. + */ + @java.lang.Override + public boolean hasBackupApplianceBackupProperties() { + return backupPropertiesCase_ == 21; + } + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupApplianceBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + getBackupApplianceBackupProperties() { + if (backupApplianceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 21) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + backupProperties_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + .getDefaultInstance(); + } else { + if (backupPropertiesCase_ == 21) { + return backupApplianceBackupPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBackupApplianceBackupProperties( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties value) { + if (backupApplianceBackupPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupProperties_ = value; + onChanged(); + } else { + backupApplianceBackupPropertiesBuilder_.setMessage(value); + } + backupPropertiesCase_ = 21; + return this; + } + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBackupApplianceBackupProperties( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.Builder builderForValue) { + if (backupApplianceBackupPropertiesBuilder_ == null) { + backupProperties_ = builderForValue.build(); + onChanged(); + } else { + backupApplianceBackupPropertiesBuilder_.setMessage(builderForValue.build()); + } + backupPropertiesCase_ = 21; + return this; + } + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeBackupApplianceBackupProperties( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties value) { + if (backupApplianceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 21 + && backupProperties_ + != com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + .getDefaultInstance()) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + backupProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + backupProperties_ = value; + } + onChanged(); + } else { + if (backupPropertiesCase_ == 21) { + backupApplianceBackupPropertiesBuilder_.mergeFrom(value); + } else { + backupApplianceBackupPropertiesBuilder_.setMessage(value); + } + } + backupPropertiesCase_ = 21; + return this; + } + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBackupApplianceBackupProperties() { + if (backupApplianceBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 21) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + onChanged(); + } + } else { + if (backupPropertiesCase_ == 21) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + } + backupApplianceBackupPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.Builder + getBackupApplianceBackupPropertiesBuilder() { + return internalGetBackupApplianceBackupPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupPropertiesOrBuilder + getBackupApplianceBackupPropertiesOrBuilder() { + if ((backupPropertiesCase_ == 21) && (backupApplianceBackupPropertiesBuilder_ != null)) { + return backupApplianceBackupPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (backupPropertiesCase_ == 21) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + backupProperties_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Backup Appliance specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupPropertiesOrBuilder> + internalGetBackupApplianceBackupPropertiesFieldBuilder() { + if (backupApplianceBackupPropertiesBuilder_ == null) { + if (!(backupPropertiesCase_ == 21)) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.getDefaultInstance(); + } + backupApplianceBackupPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + backupProperties_, + getParentForChildren(), + isClean()); + backupProperties_ = null; + } + backupPropertiesCase_ = 21; + onChanged(); + return backupApplianceBackupPropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties, + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupPropertiesOrBuilder> + alloyDbBackupPropertiesBuilder_; + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbBackupProperties field is set. + */ + @java.lang.Override + public boolean hasAlloyDbBackupProperties() { + return backupPropertiesCase_ == 27; + } + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties + getAlloyDbBackupProperties() { + if (alloyDbBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 27) { + return (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) + backupProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.getDefaultInstance(); + } else { + if (backupPropertiesCase_ == 27) { + return alloyDbBackupPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAlloyDbBackupProperties( + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties value) { + if (alloyDbBackupPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupProperties_ = value; + onChanged(); + } else { + alloyDbBackupPropertiesBuilder_.setMessage(value); + } + backupPropertiesCase_ = 27; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAlloyDbBackupProperties( + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.Builder builderForValue) { + if (alloyDbBackupPropertiesBuilder_ == null) { + backupProperties_ = builderForValue.build(); + onChanged(); + } else { + alloyDbBackupPropertiesBuilder_.setMessage(builderForValue.build()); + } + backupPropertiesCase_ = 27; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAlloyDbBackupProperties( + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties value) { + if (alloyDbBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 27 + && backupProperties_ + != com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties + .getDefaultInstance()) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) + backupProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + backupProperties_ = value; + } + onChanged(); + } else { + if (backupPropertiesCase_ == 27) { + alloyDbBackupPropertiesBuilder_.mergeFrom(value); + } else { + alloyDbBackupPropertiesBuilder_.setMessage(value); + } + } + backupPropertiesCase_ = 27; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAlloyDbBackupProperties() { + if (alloyDbBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 27) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + onChanged(); + } + } else { + if (backupPropertiesCase_ == 27) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + } + alloyDbBackupPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.Builder + getAlloyDbBackupPropertiesBuilder() { + return internalGetAlloyDbBackupPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupPropertiesOrBuilder + getAlloyDbBackupPropertiesOrBuilder() { + if ((backupPropertiesCase_ == 27) && (alloyDbBackupPropertiesBuilder_ != null)) { + return alloyDbBackupPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (backupPropertiesCase_ == 27) { + return (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) + backupProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. AlloyDB specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties, + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupPropertiesOrBuilder> + internalGetAlloyDbBackupPropertiesFieldBuilder() { + if (alloyDbBackupPropertiesBuilder_ == null) { + if (!(backupPropertiesCase_ == 27)) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.getDefaultInstance(); + } + alloyDbBackupPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties, + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties) backupProperties_, + getParentForChildren(), + isClean()); + backupProperties_ = null; + } + backupPropertiesCase_ = 27; + onChanged(); + return alloyDbBackupPropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskBackupProperties, + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskBackupPropertiesOrBuilder> + diskBackupPropertiesBuilder_; + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the diskBackupProperties field is set. + */ + @java.lang.Override + public boolean hasDiskBackupProperties() { + return backupPropertiesCase_ == 28; + } + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The diskBackupProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupProperties getDiskBackupProperties() { + if (diskBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 28) { + return (com.google.cloud.backupdr.v1beta.DiskBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance(); + } else { + if (backupPropertiesCase_ == 28) { + return diskBackupPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiskBackupProperties( + com.google.cloud.backupdr.v1beta.DiskBackupProperties value) { + if (diskBackupPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupProperties_ = value; + onChanged(); + } else { + diskBackupPropertiesBuilder_.setMessage(value); + } + backupPropertiesCase_ = 28; + return this; + } + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDiskBackupProperties( + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Builder builderForValue) { + if (diskBackupPropertiesBuilder_ == null) { + backupProperties_ = builderForValue.build(); + onChanged(); + } else { + diskBackupPropertiesBuilder_.setMessage(builderForValue.build()); + } + backupPropertiesCase_ = 28; + return this; + } + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDiskBackupProperties( + com.google.cloud.backupdr.v1beta.DiskBackupProperties value) { + if (diskBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 28 + && backupProperties_ + != com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance()) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.DiskBackupProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.DiskBackupProperties) backupProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + backupProperties_ = value; + } + onChanged(); + } else { + if (backupPropertiesCase_ == 28) { + diskBackupPropertiesBuilder_.mergeFrom(value); + } else { + diskBackupPropertiesBuilder_.setMessage(value); + } + } + backupPropertiesCase_ = 28; + return this; + } + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDiskBackupProperties() { + if (diskBackupPropertiesBuilder_ == null) { + if (backupPropertiesCase_ == 28) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + onChanged(); + } + } else { + if (backupPropertiesCase_ == 28) { + backupPropertiesCase_ = 0; + backupProperties_ = null; + } + diskBackupPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.DiskBackupProperties.Builder + getDiskBackupPropertiesBuilder() { + return internalGetDiskBackupPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPropertiesOrBuilder + getDiskBackupPropertiesOrBuilder() { + if ((backupPropertiesCase_ == 28) && (diskBackupPropertiesBuilder_ != null)) { + return diskBackupPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (backupPropertiesCase_ == 28) { + return (com.google.cloud.backupdr.v1beta.DiskBackupProperties) backupProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Disk specific backup properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskBackupProperties, + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskBackupPropertiesOrBuilder> + internalGetDiskBackupPropertiesFieldBuilder() { + if (diskBackupPropertiesBuilder_ == null) { + if (!(backupPropertiesCase_ == 28)) { + backupProperties_ = + com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance(); + } + diskBackupPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskBackupProperties, + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskBackupPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.DiskBackupProperties) backupProperties_, + getParentForChildren(), + isClean()); + backupProperties_ = null; + } + backupPropertiesCase_ = 28; + onChanged(); + return diskBackupPropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo, + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.Builder, + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfoOrBuilder> + gcpBackupPlanInfoBuilder_; + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcpBackupPlanInfo field is set. + */ + @java.lang.Override + public boolean hasGcpBackupPlanInfo() { + return planInfoCase_ == 22; + } + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcpBackupPlanInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo getGcpBackupPlanInfo() { + if (gcpBackupPlanInfoBuilder_ == null) { + if (planInfoCase_ == 22) { + return (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) planInfo_; + } + return com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance(); + } else { + if (planInfoCase_ == 22) { + return gcpBackupPlanInfoBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGcpBackupPlanInfo( + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo value) { + if (gcpBackupPlanInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + planInfo_ = value; + onChanged(); + } else { + gcpBackupPlanInfoBuilder_.setMessage(value); + } + planInfoCase_ = 22; + return this; + } + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGcpBackupPlanInfo( + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.Builder builderForValue) { + if (gcpBackupPlanInfoBuilder_ == null) { + planInfo_ = builderForValue.build(); + onChanged(); + } else { + gcpBackupPlanInfoBuilder_.setMessage(builderForValue.build()); + } + planInfoCase_ = 22; + return this; + } + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeGcpBackupPlanInfo( + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo value) { + if (gcpBackupPlanInfoBuilder_ == null) { + if (planInfoCase_ == 22 + && planInfo_ + != com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance()) { + planInfo_ = + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.newBuilder( + (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) planInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + planInfo_ = value; + } + onChanged(); + } else { + if (planInfoCase_ == 22) { + gcpBackupPlanInfoBuilder_.mergeFrom(value); + } else { + gcpBackupPlanInfoBuilder_.setMessage(value); + } + } + planInfoCase_ = 22; + return this; + } + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGcpBackupPlanInfo() { + if (gcpBackupPlanInfoBuilder_ == null) { + if (planInfoCase_ == 22) { + planInfoCase_ = 0; + planInfo_ = null; + onChanged(); + } + } else { + if (planInfoCase_ == 22) { + planInfoCase_ = 0; + planInfo_ = null; + } + gcpBackupPlanInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.Builder + getGcpBackupPlanInfoBuilder() { + return internalGetGcpBackupPlanInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfoOrBuilder + getGcpBackupPlanInfoOrBuilder() { + if ((planInfoCase_ == 22) && (gcpBackupPlanInfoBuilder_ != null)) { + return gcpBackupPlanInfoBuilder_.getMessageOrBuilder(); + } else { + if (planInfoCase_ == 22) { + return (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) planInfo_; + } + return com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Configuration for a Google Cloud resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo, + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.Builder, + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfoOrBuilder> + internalGetGcpBackupPlanInfoFieldBuilder() { + if (gcpBackupPlanInfoBuilder_ == null) { + if (!(planInfoCase_ == 22)) { + planInfo_ = + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.getDefaultInstance(); + } + gcpBackupPlanInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo, + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo.Builder, + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfoOrBuilder>( + (com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo) planInfo_, + getParentForChildren(), + isClean()); + planInfo_ = null; + } + planInfoCase_ = 22; + onChanged(); + return gcpBackupPlanInfoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupGcpResource, + com.google.cloud.backupdr.v1beta.BackupGcpResource.Builder, + com.google.cloud.backupdr.v1beta.BackupGcpResourceOrBuilder> + gcpResourceBuilder_; + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcpResource field is set. + */ + @java.lang.Override + public boolean hasGcpResource() { + return sourceResourceCase_ == 31; + } + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcpResource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupGcpResource getGcpResource() { + if (gcpResourceBuilder_ == null) { + if (sourceResourceCase_ == 31) { + return (com.google.cloud.backupdr.v1beta.BackupGcpResource) sourceResource_; + } + return com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance(); + } else { + if (sourceResourceCase_ == 31) { + return gcpResourceBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGcpResource(com.google.cloud.backupdr.v1beta.BackupGcpResource value) { + if (gcpResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceResource_ = value; + onChanged(); + } else { + gcpResourceBuilder_.setMessage(value); + } + sourceResourceCase_ = 31; + return this; + } + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGcpResource( + com.google.cloud.backupdr.v1beta.BackupGcpResource.Builder builderForValue) { + if (gcpResourceBuilder_ == null) { + sourceResource_ = builderForValue.build(); + onChanged(); + } else { + gcpResourceBuilder_.setMessage(builderForValue.build()); + } + sourceResourceCase_ = 31; + return this; + } + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeGcpResource(com.google.cloud.backupdr.v1beta.BackupGcpResource value) { + if (gcpResourceBuilder_ == null) { + if (sourceResourceCase_ == 31 + && sourceResource_ + != com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance()) { + sourceResource_ = + com.google.cloud.backupdr.v1beta.BackupGcpResource.newBuilder( + (com.google.cloud.backupdr.v1beta.BackupGcpResource) sourceResource_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceResource_ = value; + } + onChanged(); + } else { + if (sourceResourceCase_ == 31) { + gcpResourceBuilder_.mergeFrom(value); + } else { + gcpResourceBuilder_.setMessage(value); + } + } + sourceResourceCase_ = 31; + return this; + } + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGcpResource() { + if (gcpResourceBuilder_ == null) { + if (sourceResourceCase_ == 31) { + sourceResourceCase_ = 0; + sourceResource_ = null; + onChanged(); + } + } else { + if (sourceResourceCase_ == 31) { + sourceResourceCase_ = 0; + sourceResource_ = null; + } + gcpResourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupGcpResource.Builder getGcpResourceBuilder() { + return internalGetGcpResourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupGcpResourceOrBuilder getGcpResourceOrBuilder() { + if ((sourceResourceCase_ == 31) && (gcpResourceBuilder_ != null)) { + return gcpResourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceResourceCase_ == 31) { + return (com.google.cloud.backupdr.v1beta.BackupGcpResource) sourceResource_; + } + return com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Unique identifier of the GCP resource that is being backed
+     * up.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupGcpResource, + com.google.cloud.backupdr.v1beta.BackupGcpResource.Builder, + com.google.cloud.backupdr.v1beta.BackupGcpResourceOrBuilder> + internalGetGcpResourceFieldBuilder() { + if (gcpResourceBuilder_ == null) { + if (!(sourceResourceCase_ == 31)) { + sourceResource_ = com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance(); + } + gcpResourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupGcpResource, + com.google.cloud.backupdr.v1beta.BackupGcpResource.Builder, + com.google.cloud.backupdr.v1beta.BackupGcpResourceOrBuilder>( + (com.google.cloud.backupdr.v1beta.BackupGcpResource) sourceResource_, + getParentForChildren(), + isClean()); + sourceResource_ = null; + } + sourceResourceCase_ = 31; + onChanged(); + return gcpResourceBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. Identifier. Name of the backup to create. It must have the
+     * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+     * `{backup}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. Name of the backup to create. It must have the
+     * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+     * `{backup}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. Name of the backup to create. It must have the
+     * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+     * `{backup}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. Name of the backup to create. It must have the
+     * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+     * `{backup}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. Name of the backup to create. It must have the
+     * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+     * `{backup}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the datasource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Output only. The description of the Backup instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. The description of the Backup instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. The description of the Backup instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. The description of the Backup instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The description of the Backup instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The description of the Backup instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .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. The time when the instance was created.
+     * 
+ * + * + * optional .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_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .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_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .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_ & 0x00000200) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .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. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + 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_ |= 0x00000800; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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_ & ~0x00000800); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00000800; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00000800; + return this; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000800; + return this; + } + + private com.google.protobuf.Timestamp enforcedRetentionEndTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + enforcedRetentionEndTimeBuilder_; + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enforcedRetentionEndTime field is set. + */ + public boolean hasEnforcedRetentionEndTime() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enforcedRetentionEndTime. + */ + public com.google.protobuf.Timestamp getEnforcedRetentionEndTime() { + if (enforcedRetentionEndTimeBuilder_ == null) { + return enforcedRetentionEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : enforcedRetentionEndTime_; + } else { + return enforcedRetentionEndTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEnforcedRetentionEndTime(com.google.protobuf.Timestamp value) { + if (enforcedRetentionEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enforcedRetentionEndTime_ = value; + } else { + enforcedRetentionEndTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEnforcedRetentionEndTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (enforcedRetentionEndTimeBuilder_ == null) { + enforcedRetentionEndTime_ = builderForValue.build(); + } else { + enforcedRetentionEndTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEnforcedRetentionEndTime(com.google.protobuf.Timestamp value) { + if (enforcedRetentionEndTimeBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && enforcedRetentionEndTime_ != null + && enforcedRetentionEndTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEnforcedRetentionEndTimeBuilder().mergeFrom(value); + } else { + enforcedRetentionEndTime_ = value; + } + } else { + enforcedRetentionEndTimeBuilder_.mergeFrom(value); + } + if (enforcedRetentionEndTime_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEnforcedRetentionEndTime() { + bitField0_ = (bitField0_ & ~0x00001000); + enforcedRetentionEndTime_ = null; + if (enforcedRetentionEndTimeBuilder_ != null) { + enforcedRetentionEndTimeBuilder_.dispose(); + enforcedRetentionEndTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getEnforcedRetentionEndTimeBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetEnforcedRetentionEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEnforcedRetentionEndTimeOrBuilder() { + if (enforcedRetentionEndTimeBuilder_ != null) { + return enforcedRetentionEndTimeBuilder_.getMessageOrBuilder(); + } else { + return enforcedRetentionEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : enforcedRetentionEndTime_; + } + } + + /** + * + * + *
+     * Optional. The backup can not be deleted before this time.
+     * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEnforcedRetentionEndTimeFieldBuilder() { + if (enforcedRetentionEndTimeBuilder_ == null) { + enforcedRetentionEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEnforcedRetentionEndTime(), getParentForChildren(), isClean()); + enforcedRetentionEndTime_ = null; + } + return enforcedRetentionEndTimeBuilder_; + } + + private int backupRetentionInheritance_ = 0; + + /** + * + * + *
+     * Output only. Setting for how the enforced retention end time is inherited.
+     * This value is copied from this backup's BackupVault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupRetentionInheritance field is set. + */ + @java.lang.Override + public boolean hasBackupRetentionInheritance() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+     * Output only. Setting for how the enforced retention end time is inherited.
+     * This value is copied from this backup's BackupVault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backupRetentionInheritance. + */ + @java.lang.Override + public int getBackupRetentionInheritanceValue() { + return backupRetentionInheritance_; + } + + /** + * + * + *
+     * Output only. Setting for how the enforced retention end time is inherited.
+     * This value is copied from this backup's BackupVault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for backupRetentionInheritance to set. + * @return This builder for chaining. + */ + public Builder setBackupRetentionInheritanceValue(int value) { + backupRetentionInheritance_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Setting for how the enforced retention end time is inherited.
+     * This value is copied from this backup's BackupVault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupRetentionInheritance. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance + getBackupRetentionInheritance() { + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance result = + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance.forNumber( + backupRetentionInheritance_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Setting for how the enforced retention end time is inherited.
+     * This value is copied from this backup's BackupVault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backupRetentionInheritance to set. + * @return This builder for chaining. + */ + public Builder setBackupRetentionInheritance( + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + backupRetentionInheritance_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Setting for how the enforced retention end time is inherited.
+     * This value is copied from this backup's BackupVault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupRetentionInheritance() { + bitField0_ = (bitField0_ & ~0x00002000); + backupRetentionInheritance_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + if (expireTime_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00004000); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return internalGetExpireTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + + /** + * + * + *
+     * Optional. When this backup is automatically expired.
+     * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private com.google.protobuf.Timestamp consistencyTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + consistencyTimeBuilder_; + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the consistencyTime field is set. + */ + public boolean hasConsistencyTime() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The consistencyTime. + */ + public com.google.protobuf.Timestamp getConsistencyTime() { + if (consistencyTimeBuilder_ == null) { + return consistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : consistencyTime_; + } else { + return consistencyTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setConsistencyTime(com.google.protobuf.Timestamp value) { + if (consistencyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consistencyTime_ = value; + } else { + consistencyTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setConsistencyTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (consistencyTimeBuilder_ == null) { + consistencyTime_ = builderForValue.build(); + } else { + consistencyTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeConsistencyTime(com.google.protobuf.Timestamp value) { + if (consistencyTimeBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && consistencyTime_ != null + && consistencyTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getConsistencyTimeBuilder().mergeFrom(value); + } else { + consistencyTime_ = value; + } + } else { + consistencyTimeBuilder_.mergeFrom(value); + } + if (consistencyTime_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearConsistencyTime() { + bitField0_ = (bitField0_ & ~0x00008000); + consistencyTime_ = null; + if (consistencyTimeBuilder_ != null) { + consistencyTimeBuilder_.dispose(); + consistencyTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getConsistencyTimeBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return internalGetConsistencyTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getConsistencyTimeOrBuilder() { + if (consistencyTimeBuilder_ != null) { + return consistencyTimeBuilder_.getMessageOrBuilder(); + } else { + return consistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : consistencyTime_; + } + } + + /** + * + * + *
+     * Output only. The point in time when this backup was captured from the
+     * source.
+     * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetConsistencyTimeFieldBuilder() { + if (consistencyTimeBuilder_ == null) { + consistencyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getConsistencyTime(), getParentForChildren(), isClean()); + consistencyTime_ = null; + } + return consistencyTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. Server specified ETag to prevent updates from overwriting each
+     * other.
+     * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the etag field is set. + */ + public boolean hasEtag() { + return ((bitField0_ & 0x00010000) != 0); + } + + /** + * + * + *
+     * Optional. Server specified ETag to prevent updates from overwriting each
+     * other.
+     * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Server specified ETag to prevent updates from overwriting each
+     * other.
+     * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Server specified ETag to prevent updates from overwriting each
+     * other.
+     * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Server specified ETag to prevent updates from overwriting each
+     * other.
+     * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Server specified ETag to prevent updates from overwriting each
+     * other.
+     * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The Backup resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.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 resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.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_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Backup resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.State getState() { + com.google.cloud.backupdr.v1beta.Backup.State result = + com.google.cloud.backupdr.v1beta.Backup.State.forNumber(state_); + return result == null ? com.google.cloud.backupdr.v1beta.Backup.State.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Output only. The Backup resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.Backup.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00020000; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Backup resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00020000); + state_ = 0; + onChanged(); + return this; + } + + private java.util.List serviceLocks_ = + java.util.Collections.emptyList(); + + private void ensureServiceLocksIsMutable() { + if (!((bitField0_ & 0x00040000) != 0)) { + serviceLocks_ = + new java.util.ArrayList(serviceLocks_); + bitField0_ |= 0x00040000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLock, + com.google.cloud.backupdr.v1beta.BackupLock.Builder, + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder> + serviceLocksBuilder_; + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getServiceLocksList() { + if (serviceLocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceLocks_); + } else { + return serviceLocksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getServiceLocksCount() { + if (serviceLocksBuilder_ == null) { + return serviceLocks_.size(); + } else { + return serviceLocksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLock getServiceLocks(int index) { + if (serviceLocksBuilder_ == null) { + return serviceLocks_.get(index); + } else { + return serviceLocksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServiceLocks(int index, com.google.cloud.backupdr.v1beta.BackupLock value) { + if (serviceLocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceLocksIsMutable(); + serviceLocks_.set(index, value); + onChanged(); + } else { + serviceLocksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServiceLocks( + int index, com.google.cloud.backupdr.v1beta.BackupLock.Builder builderForValue) { + if (serviceLocksBuilder_ == null) { + ensureServiceLocksIsMutable(); + serviceLocks_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceLocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServiceLocks(com.google.cloud.backupdr.v1beta.BackupLock value) { + if (serviceLocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceLocksIsMutable(); + serviceLocks_.add(value); + onChanged(); + } else { + serviceLocksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServiceLocks(int index, com.google.cloud.backupdr.v1beta.BackupLock value) { + if (serviceLocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceLocksIsMutable(); + serviceLocks_.add(index, value); + onChanged(); + } else { + serviceLocksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServiceLocks( + com.google.cloud.backupdr.v1beta.BackupLock.Builder builderForValue) { + if (serviceLocksBuilder_ == null) { + ensureServiceLocksIsMutable(); + serviceLocks_.add(builderForValue.build()); + onChanged(); + } else { + serviceLocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServiceLocks( + int index, com.google.cloud.backupdr.v1beta.BackupLock.Builder builderForValue) { + if (serviceLocksBuilder_ == null) { + ensureServiceLocksIsMutable(); + serviceLocks_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceLocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllServiceLocks( + java.lang.Iterable values) { + if (serviceLocksBuilder_ == null) { + ensureServiceLocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceLocks_); + onChanged(); + } else { + serviceLocksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearServiceLocks() { + if (serviceLocksBuilder_ == null) { + serviceLocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + } else { + serviceLocksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeServiceLocks(int index) { + if (serviceLocksBuilder_ == null) { + ensureServiceLocksIsMutable(); + serviceLocks_.remove(index); + onChanged(); + } else { + serviceLocksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLock.Builder getServiceLocksBuilder(int index) { + return internalGetServiceLocksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLockOrBuilder getServiceLocksOrBuilder( + int index) { + if (serviceLocksBuilder_ == null) { + return serviceLocks_.get(index); + } else { + return serviceLocksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServiceLocksOrBuilderList() { + if (serviceLocksBuilder_ != null) { + return serviceLocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceLocks_); + } + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLock.Builder addServiceLocksBuilder() { + return internalGetServiceLocksFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupLock.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLock.Builder addServiceLocksBuilder(int index) { + return internalGetServiceLocksFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.BackupLock.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The list of BackupLocks taken by the service to prevent the
+     * deletion of the backup.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServiceLocksBuilderList() { + return internalGetServiceLocksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLock, + com.google.cloud.backupdr.v1beta.BackupLock.Builder, + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder> + internalGetServiceLocksFieldBuilder() { + if (serviceLocksBuilder_ == null) { + serviceLocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLock, + com.google.cloud.backupdr.v1beta.BackupLock.Builder, + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder>( + serviceLocks_, ((bitField0_ & 0x00040000) != 0), getParentForChildren(), isClean()); + serviceLocks_ = null; + } + return serviceLocksBuilder_; + } + + private java.util.List backupApplianceLocks_ = + java.util.Collections.emptyList(); + + private void ensureBackupApplianceLocksIsMutable() { + if (!((bitField0_ & 0x00080000) != 0)) { + backupApplianceLocks_ = + new java.util.ArrayList( + backupApplianceLocks_); + bitField0_ |= 0x00080000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLock, + com.google.cloud.backupdr.v1beta.BackupLock.Builder, + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder> + backupApplianceLocksBuilder_; + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBackupApplianceLocksList() { + if (backupApplianceLocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupApplianceLocks_); + } else { + return backupApplianceLocksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getBackupApplianceLocksCount() { + if (backupApplianceLocksBuilder_ == null) { + return backupApplianceLocks_.size(); + } else { + return backupApplianceLocksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLock getBackupApplianceLocks(int index) { + if (backupApplianceLocksBuilder_ == null) { + return backupApplianceLocks_.get(index); + } else { + return backupApplianceLocksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBackupApplianceLocks( + int index, com.google.cloud.backupdr.v1beta.BackupLock value) { + if (backupApplianceLocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.set(index, value); + onChanged(); + } else { + backupApplianceLocksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBackupApplianceLocks( + int index, com.google.cloud.backupdr.v1beta.BackupLock.Builder builderForValue) { + if (backupApplianceLocksBuilder_ == null) { + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.set(index, builderForValue.build()); + onChanged(); + } else { + backupApplianceLocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBackupApplianceLocks(com.google.cloud.backupdr.v1beta.BackupLock value) { + if (backupApplianceLocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.add(value); + onChanged(); + } else { + backupApplianceLocksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBackupApplianceLocks( + int index, com.google.cloud.backupdr.v1beta.BackupLock value) { + if (backupApplianceLocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.add(index, value); + onChanged(); + } else { + backupApplianceLocksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBackupApplianceLocks( + com.google.cloud.backupdr.v1beta.BackupLock.Builder builderForValue) { + if (backupApplianceLocksBuilder_ == null) { + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.add(builderForValue.build()); + onChanged(); + } else { + backupApplianceLocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBackupApplianceLocks( + int index, com.google.cloud.backupdr.v1beta.BackupLock.Builder builderForValue) { + if (backupApplianceLocksBuilder_ == null) { + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.add(index, builderForValue.build()); + onChanged(); + } else { + backupApplianceLocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllBackupApplianceLocks( + java.lang.Iterable values) { + if (backupApplianceLocksBuilder_ == null) { + ensureBackupApplianceLocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupApplianceLocks_); + onChanged(); + } else { + backupApplianceLocksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBackupApplianceLocks() { + if (backupApplianceLocksBuilder_ == null) { + backupApplianceLocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00080000); + onChanged(); + } else { + backupApplianceLocksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeBackupApplianceLocks(int index) { + if (backupApplianceLocksBuilder_ == null) { + ensureBackupApplianceLocksIsMutable(); + backupApplianceLocks_.remove(index); + onChanged(); + } else { + backupApplianceLocksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLock.Builder getBackupApplianceLocksBuilder( + int index) { + return internalGetBackupApplianceLocksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLockOrBuilder getBackupApplianceLocksOrBuilder( + int index) { + if (backupApplianceLocksBuilder_ == null) { + return backupApplianceLocks_.get(index); + } else { + return backupApplianceLocksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBackupApplianceLocksOrBuilderList() { + if (backupApplianceLocksBuilder_ != null) { + return backupApplianceLocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupApplianceLocks_); + } + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLock.Builder addBackupApplianceLocksBuilder() { + return internalGetBackupApplianceLocksFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupLock.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupLock.Builder addBackupApplianceLocksBuilder( + int index) { + return internalGetBackupApplianceLocksFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.BackupLock.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBackupApplianceLocksBuilderList() { + return internalGetBackupApplianceLocksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLock, + com.google.cloud.backupdr.v1beta.BackupLock.Builder, + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder> + internalGetBackupApplianceLocksFieldBuilder() { + if (backupApplianceLocksBuilder_ == null) { + backupApplianceLocksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLock, + com.google.cloud.backupdr.v1beta.BackupLock.Builder, + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder>( + backupApplianceLocks_, + ((bitField0_ & 0x00080000) != 0), + getParentForChildren(), + isClean()); + backupApplianceLocks_ = null; + } + return backupApplianceLocksBuilder_; + } + + private int backupType_ = 0; + + /** + * + * + *
+     * Output only. Type of the backup, unspecified, scheduled or ondemand.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.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 the backup, unspecified, scheduled or ondemand.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.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_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Type of the backup, unspecified, scheduled or ondemand.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup.BackupType getBackupType() { + com.google.cloud.backupdr.v1beta.Backup.BackupType result = + com.google.cloud.backupdr.v1beta.Backup.BackupType.forNumber(backupType_); + return result == null + ? com.google.cloud.backupdr.v1beta.Backup.BackupType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Type of the backup, unspecified, scheduled or ondemand.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backupType to set. + * @return This builder for chaining. + */ + public Builder setBackupType(com.google.cloud.backupdr.v1beta.Backup.BackupType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00100000; + backupType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Type of the backup, unspecified, scheduled or ondemand.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupType() { + bitField0_ = (bitField0_ & ~0x00100000); + backupType_ = 0; + onChanged(); + return this; + } + + private long resourceSizeBytes_; + + /** + * + * + *
+     * Output only. source resource size in bytes at the time of the backup.
+     * 
+ * + * int64 resource_size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceSizeBytes. + */ + @java.lang.Override + public long getResourceSizeBytes() { + return resourceSizeBytes_; + } + + /** + * + * + *
+     * Output only. source resource size in bytes at the time of the backup.
+     * 
+ * + * int64 resource_size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The resourceSizeBytes to set. + * @return This builder for chaining. + */ + public Builder setResourceSizeBytes(long value) { + + resourceSizeBytes_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. source resource size in bytes at the time of the backup.
+     * 
+ * + * int64 resource_size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearResourceSizeBytes() { + bitField0_ = (bitField0_ & ~0x00200000); + resourceSizeBytes_ = 0L; + onChanged(); + return this; + } + + private boolean satisfiesPzs_; + + /** + * + * + *
+     * Optional. Output only. Reserved for future use.
+     * 
+ * + * + * optional bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the satisfiesPzs field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzs() { + return ((bitField0_ & 0x00400000) != 0); + } + + /** + * + * + *
+     * Optional. Output only. Reserved for future use.
+     * 
+ * + * + * optional bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + + /** + * + * + *
+     * Optional. Output only. Reserved for future use.
+     * 
+ * + * + * optional bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The satisfiesPzs to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzs(boolean value) { + + satisfiesPzs_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. Reserved for future use.
+     * 
+ * + * + * optional bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzs() { + bitField0_ = (bitField0_ & ~0x00400000); + satisfiesPzs_ = false; + onChanged(); + return this; + } + + private boolean satisfiesPzi_; + + /** + * + * + *
+     * Optional. Output only. Reserved for future use.
+     * 
+ * + * + * optional bool satisfies_pzi = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the satisfiesPzi field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzi() { + return ((bitField0_ & 0x00800000) != 0); + } + + /** + * + * + *
+     * Optional. Output only. Reserved for future use.
+     * 
+ * + * + * optional bool satisfies_pzi = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + + /** + * + * + *
+     * Optional. Output only. Reserved for future use.
+     * 
+ * + * + * optional bool satisfies_pzi = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The satisfiesPzi to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzi(boolean value) { + + satisfiesPzi_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. Reserved for future use.
+     * 
+ * + * + * optional bool satisfies_pzi = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzi() { + bitField0_ = (bitField0_ & ~0x00800000); + satisfiesPzi_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList kmsKeyVersions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureKmsKeyVersionsIsMutable() { + if (!kmsKeyVersions_.isModifiable()) { + kmsKeyVersions_ = new com.google.protobuf.LazyStringArrayList(kmsKeyVersions_); + } + bitField0_ |= 0x01000000; + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the kmsKeyVersions. + */ + public com.google.protobuf.ProtocolStringList getKmsKeyVersionsList() { + kmsKeyVersions_.makeImmutable(); + return kmsKeyVersions_; + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of kmsKeyVersions. + */ + public int getKmsKeyVersionsCount() { + return kmsKeyVersions_.size(); + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The kmsKeyVersions at the given index. + */ + public java.lang.String getKmsKeyVersions(int index) { + return kmsKeyVersions_.get(index); + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the kmsKeyVersions at the given index. + */ + public com.google.protobuf.ByteString getKmsKeyVersionsBytes(int index) { + return kmsKeyVersions_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The kmsKeyVersions to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyVersions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKmsKeyVersionsIsMutable(); + kmsKeyVersions_.set(index, value); + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The kmsKeyVersions to add. + * @return This builder for chaining. + */ + public Builder addKmsKeyVersions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureKmsKeyVersionsIsMutable(); + kmsKeyVersions_.add(value); + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The kmsKeyVersions to add. + * @return This builder for chaining. + */ + public Builder addAllKmsKeyVersions(java.lang.Iterable values) { + ensureKmsKeyVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, kmsKeyVersions_); + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyVersions() { + kmsKeyVersions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x01000000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The list of KMS key versions used to encrypt the
+     * backup.
+     * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the kmsKeyVersions to add. + * @return This builder for chaining. + */ + public Builder addKmsKeyVersionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureKmsKeyVersionsIsMutable(); + kmsKeyVersions_.add(value); + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.Backup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.Backup) + private static final com.google.cloud.backupdr.v1beta.Backup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.Backup(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.Backup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupConfig.java new file mode 100644 index 000000000000..cf0644b15415 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupConfig.java @@ -0,0 +1,1553 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupApplianceBackupConfig captures the backup configuration for
+ * applications that are protected by Backup Appliances.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupApplianceBackupConfig} + */ +@com.google.protobuf.Generated +public final class BackupApplianceBackupConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) + BackupApplianceBackupConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupApplianceBackupConfig"); + } + + // Use BackupApplianceBackupConfig.newBuilder() to construct. + private BackupApplianceBackupConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupApplianceBackupConfig() { + backupApplianceName_ = ""; + applicationName_ = ""; + hostName_ = ""; + sltName_ = ""; + slpName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.class, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.Builder.class); + } + + public static final int BACKUP_APPLIANCE_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupApplianceName_ = ""; + + /** + * + * + *
+   * The name of the backup appliance.
+   * 
+ * + * string backup_appliance_name = 1; + * + * @return The backupApplianceName. + */ + @java.lang.Override + public java.lang.String getBackupApplianceName() { + java.lang.Object ref = backupApplianceName_; + 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(); + backupApplianceName_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the backup appliance.
+   * 
+ * + * string backup_appliance_name = 1; + * + * @return The bytes for backupApplianceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupApplianceNameBytes() { + java.lang.Object ref = backupApplianceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupApplianceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_APPLIANCE_ID_FIELD_NUMBER = 2; + private long backupApplianceId_ = 0L; + + /** + * + * + *
+   * The ID of the backup appliance.
+   * 
+ * + * int64 backup_appliance_id = 2; + * + * @return The backupApplianceId. + */ + @java.lang.Override + public long getBackupApplianceId() { + return backupApplianceId_; + } + + public static final int SLA_ID_FIELD_NUMBER = 3; + private long slaId_ = 0L; + + /** + * + * + *
+   * The ID of the SLA of this application.
+   * 
+ * + * int64 sla_id = 3; + * + * @return The slaId. + */ + @java.lang.Override + public long getSlaId() { + return slaId_; + } + + public static final int APPLICATION_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicationName_ = ""; + + /** + * + * + *
+   * The name of the application.
+   * 
+ * + * string application_name = 4; + * + * @return The applicationName. + */ + @java.lang.Override + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + 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(); + applicationName_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the application.
+   * 
+ * + * string application_name = 4; + * + * @return The bytes for applicationName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOST_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object hostName_ = ""; + + /** + * + * + *
+   * The name of the host where the application is running.
+   * 
+ * + * string host_name = 5; + * + * @return The hostName. + */ + @java.lang.Override + public java.lang.String getHostName() { + java.lang.Object ref = hostName_; + 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(); + hostName_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the host where the application is running.
+   * 
+ * + * string host_name = 5; + * + * @return The bytes for hostName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostNameBytes() { + java.lang.Object ref = hostName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SLT_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object sltName_ = ""; + + /** + * + * + *
+   * The name of the SLT associated with the application.
+   * 
+ * + * string slt_name = 6; + * + * @return The sltName. + */ + @java.lang.Override + public java.lang.String getSltName() { + java.lang.Object ref = sltName_; + 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(); + sltName_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the SLT associated with the application.
+   * 
+ * + * string slt_name = 6; + * + * @return The bytes for sltName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSltNameBytes() { + java.lang.Object ref = sltName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sltName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SLP_NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object slpName_ = ""; + + /** + * + * + *
+   * The name of the SLP associated with the application.
+   * 
+ * + * string slp_name = 7; + * + * @return The slpName. + */ + @java.lang.Override + public java.lang.String getSlpName() { + java.lang.Object ref = slpName_; + 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(); + slpName_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the SLP associated with the application.
+   * 
+ * + * string slp_name = 7; + * + * @return The bytes for slpName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSlpNameBytes() { + java.lang.Object ref = slpName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + slpName_ = 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.GeneratedMessage.isStringEmpty(backupApplianceName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, backupApplianceName_); + } + if (backupApplianceId_ != 0L) { + output.writeInt64(2, backupApplianceId_); + } + if (slaId_ != 0L) { + output.writeInt64(3, slaId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, applicationName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, hostName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sltName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, sltName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(slpName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, slpName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupApplianceName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, backupApplianceName_); + } + if (backupApplianceId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, backupApplianceId_); + } + if (slaId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, slaId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, applicationName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, hostName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sltName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, sltName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(slpName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, slpName_); + } + 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.backupdr.v1beta.BackupApplianceBackupConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig other = + (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) obj; + + if (!getBackupApplianceName().equals(other.getBackupApplianceName())) return false; + if (getBackupApplianceId() != other.getBackupApplianceId()) return false; + if (getSlaId() != other.getSlaId()) return false; + if (!getApplicationName().equals(other.getApplicationName())) return false; + if (!getHostName().equals(other.getHostName())) return false; + if (!getSltName().equals(other.getSltName())) return false; + if (!getSlpName().equals(other.getSlpName())) 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) + BACKUP_APPLIANCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBackupApplianceName().hashCode(); + hash = (37 * hash) + BACKUP_APPLIANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBackupApplianceId()); + hash = (37 * hash) + SLA_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSlaId()); + hash = (37 * hash) + APPLICATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getApplicationName().hashCode(); + hash = (37 * hash) + HOST_NAME_FIELD_NUMBER; + hash = (53 * hash) + getHostName().hashCode(); + hash = (37 * hash) + SLT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSltName().hashCode(); + hash = (37 * hash) + SLP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSlpName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig 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.backupdr.v1beta.BackupApplianceBackupConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig 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.backupdr.v1beta.BackupApplianceBackupConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupApplianceBackupConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupApplianceBackupConfig captures the backup configuration for
+   * applications that are protected by Backup Appliances.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupApplianceBackupConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.class, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupApplianceName_ = ""; + backupApplianceId_ = 0L; + slaId_ = 0L; + applicationName_ = ""; + hostName_ = ""; + sltName_ = ""; + slpName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig build() { + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig buildPartial() { + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig result = + new com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backupApplianceName_ = backupApplianceName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupApplianceId_ = backupApplianceId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.slaId_ = slaId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.applicationName_ = applicationName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.hostName_ = hostName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sltName_ = sltName_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.slpName_ = slpName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig other) { + if (other + == com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.getDefaultInstance()) + return this; + if (!other.getBackupApplianceName().isEmpty()) { + backupApplianceName_ = other.backupApplianceName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getBackupApplianceId() != 0L) { + setBackupApplianceId(other.getBackupApplianceId()); + } + if (other.getSlaId() != 0L) { + setSlaId(other.getSlaId()); + } + if (!other.getApplicationName().isEmpty()) { + applicationName_ = other.applicationName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getHostName().isEmpty()) { + hostName_ = other.hostName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getSltName().isEmpty()) { + sltName_ = other.sltName_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getSlpName().isEmpty()) { + slpName_ = other.slpName_; + bitField0_ |= 0x00000040; + 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: + { + backupApplianceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + backupApplianceId_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + slaId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + applicationName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + hostName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + sltName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + slpName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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 backupApplianceName_ = ""; + + /** + * + * + *
+     * The name of the backup appliance.
+     * 
+ * + * string backup_appliance_name = 1; + * + * @return The backupApplianceName. + */ + public java.lang.String getBackupApplianceName() { + java.lang.Object ref = backupApplianceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupApplianceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the backup appliance.
+     * 
+ * + * string backup_appliance_name = 1; + * + * @return The bytes for backupApplianceName. + */ + public com.google.protobuf.ByteString getBackupApplianceNameBytes() { + java.lang.Object ref = backupApplianceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupApplianceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the backup appliance.
+     * 
+ * + * string backup_appliance_name = 1; + * + * @param value The backupApplianceName to set. + * @return This builder for chaining. + */ + public Builder setBackupApplianceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupApplianceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the backup appliance.
+     * 
+ * + * string backup_appliance_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearBackupApplianceName() { + backupApplianceName_ = getDefaultInstance().getBackupApplianceName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the backup appliance.
+     * 
+ * + * string backup_appliance_name = 1; + * + * @param value The bytes for backupApplianceName to set. + * @return This builder for chaining. + */ + public Builder setBackupApplianceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupApplianceName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long backupApplianceId_; + + /** + * + * + *
+     * The ID of the backup appliance.
+     * 
+ * + * int64 backup_appliance_id = 2; + * + * @return The backupApplianceId. + */ + @java.lang.Override + public long getBackupApplianceId() { + return backupApplianceId_; + } + + /** + * + * + *
+     * The ID of the backup appliance.
+     * 
+ * + * int64 backup_appliance_id = 2; + * + * @param value The backupApplianceId to set. + * @return This builder for chaining. + */ + public Builder setBackupApplianceId(long value) { + + backupApplianceId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID of the backup appliance.
+     * 
+ * + * int64 backup_appliance_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearBackupApplianceId() { + bitField0_ = (bitField0_ & ~0x00000002); + backupApplianceId_ = 0L; + onChanged(); + return this; + } + + private long slaId_; + + /** + * + * + *
+     * The ID of the SLA of this application.
+     * 
+ * + * int64 sla_id = 3; + * + * @return The slaId. + */ + @java.lang.Override + public long getSlaId() { + return slaId_; + } + + /** + * + * + *
+     * The ID of the SLA of this application.
+     * 
+ * + * int64 sla_id = 3; + * + * @param value The slaId to set. + * @return This builder for chaining. + */ + public Builder setSlaId(long value) { + + slaId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID of the SLA of this application.
+     * 
+ * + * int64 sla_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearSlaId() { + bitField0_ = (bitField0_ & ~0x00000004); + slaId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object applicationName_ = ""; + + /** + * + * + *
+     * The name of the application.
+     * 
+ * + * string application_name = 4; + * + * @return The applicationName. + */ + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the application.
+     * 
+ * + * string application_name = 4; + * + * @return The bytes for applicationName. + */ + public com.google.protobuf.ByteString getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the application.
+     * 
+ * + * string application_name = 4; + * + * @param value The applicationName to set. + * @return This builder for chaining. + */ + public Builder setApplicationName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicationName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the application.
+     * 
+ * + * string application_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearApplicationName() { + applicationName_ = getDefaultInstance().getApplicationName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the application.
+     * 
+ * + * string application_name = 4; + * + * @param value The bytes for applicationName to set. + * @return This builder for chaining. + */ + public Builder setApplicationNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicationName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object hostName_ = ""; + + /** + * + * + *
+     * The name of the host where the application is running.
+     * 
+ * + * string host_name = 5; + * + * @return The hostName. + */ + public java.lang.String getHostName() { + java.lang.Object ref = hostName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the host where the application is running.
+     * 
+ * + * string host_name = 5; + * + * @return The bytes for hostName. + */ + public com.google.protobuf.ByteString getHostNameBytes() { + java.lang.Object ref = hostName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the host where the application is running.
+     * 
+ * + * string host_name = 5; + * + * @param value The hostName to set. + * @return This builder for chaining. + */ + public Builder setHostName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hostName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the host where the application is running.
+     * 
+ * + * string host_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearHostName() { + hostName_ = getDefaultInstance().getHostName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the host where the application is running.
+     * 
+ * + * string host_name = 5; + * + * @param value The bytes for hostName to set. + * @return This builder for chaining. + */ + public Builder setHostNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hostName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object sltName_ = ""; + + /** + * + * + *
+     * The name of the SLT associated with the application.
+     * 
+ * + * string slt_name = 6; + * + * @return The sltName. + */ + public java.lang.String getSltName() { + java.lang.Object ref = sltName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sltName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the SLT associated with the application.
+     * 
+ * + * string slt_name = 6; + * + * @return The bytes for sltName. + */ + public com.google.protobuf.ByteString getSltNameBytes() { + java.lang.Object ref = sltName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sltName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the SLT associated with the application.
+     * 
+ * + * string slt_name = 6; + * + * @param value The sltName to set. + * @return This builder for chaining. + */ + public Builder setSltName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sltName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the SLT associated with the application.
+     * 
+ * + * string slt_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearSltName() { + sltName_ = getDefaultInstance().getSltName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the SLT associated with the application.
+     * 
+ * + * string slt_name = 6; + * + * @param value The bytes for sltName to set. + * @return This builder for chaining. + */ + public Builder setSltNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sltName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object slpName_ = ""; + + /** + * + * + *
+     * The name of the SLP associated with the application.
+     * 
+ * + * string slp_name = 7; + * + * @return The slpName. + */ + public java.lang.String getSlpName() { + java.lang.Object ref = slpName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + slpName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the SLP associated with the application.
+     * 
+ * + * string slp_name = 7; + * + * @return The bytes for slpName. + */ + public com.google.protobuf.ByteString getSlpNameBytes() { + java.lang.Object ref = slpName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + slpName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the SLP associated with the application.
+     * 
+ * + * string slp_name = 7; + * + * @param value The slpName to set. + * @return This builder for chaining. + */ + public Builder setSlpName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + slpName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the SLP associated with the application.
+     * 
+ * + * string slp_name = 7; + * + * @return This builder for chaining. + */ + public Builder clearSlpName() { + slpName_ = getDefaultInstance().getSlpName(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the SLP associated with the application.
+     * 
+ * + * string slp_name = 7; + * + * @param value The bytes for slpName to set. + * @return This builder for chaining. + */ + public Builder setSlpNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + slpName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) + private static final com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig(); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupApplianceBackupConfig 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.backupdr.v1beta.BackupApplianceBackupConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupConfigOrBuilder.java new file mode 100644 index 000000000000..8803cb633ff2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupConfigOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupApplianceBackupConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the backup appliance.
+   * 
+ * + * string backup_appliance_name = 1; + * + * @return The backupApplianceName. + */ + java.lang.String getBackupApplianceName(); + + /** + * + * + *
+   * The name of the backup appliance.
+   * 
+ * + * string backup_appliance_name = 1; + * + * @return The bytes for backupApplianceName. + */ + com.google.protobuf.ByteString getBackupApplianceNameBytes(); + + /** + * + * + *
+   * The ID of the backup appliance.
+   * 
+ * + * int64 backup_appliance_id = 2; + * + * @return The backupApplianceId. + */ + long getBackupApplianceId(); + + /** + * + * + *
+   * The ID of the SLA of this application.
+   * 
+ * + * int64 sla_id = 3; + * + * @return The slaId. + */ + long getSlaId(); + + /** + * + * + *
+   * The name of the application.
+   * 
+ * + * string application_name = 4; + * + * @return The applicationName. + */ + java.lang.String getApplicationName(); + + /** + * + * + *
+   * The name of the application.
+   * 
+ * + * string application_name = 4; + * + * @return The bytes for applicationName. + */ + com.google.protobuf.ByteString getApplicationNameBytes(); + + /** + * + * + *
+   * The name of the host where the application is running.
+   * 
+ * + * string host_name = 5; + * + * @return The hostName. + */ + java.lang.String getHostName(); + + /** + * + * + *
+   * The name of the host where the application is running.
+   * 
+ * + * string host_name = 5; + * + * @return The bytes for hostName. + */ + com.google.protobuf.ByteString getHostNameBytes(); + + /** + * + * + *
+   * The name of the SLT associated with the application.
+   * 
+ * + * string slt_name = 6; + * + * @return The sltName. + */ + java.lang.String getSltName(); + + /** + * + * + *
+   * The name of the SLT associated with the application.
+   * 
+ * + * string slt_name = 6; + * + * @return The bytes for sltName. + */ + com.google.protobuf.ByteString getSltNameBytes(); + + /** + * + * + *
+   * The name of the SLP associated with the application.
+   * 
+ * + * string slp_name = 7; + * + * @return The slpName. + */ + java.lang.String getSlpName(); + + /** + * + * + *
+   * The name of the SLP associated with the application.
+   * 
+ * + * string slp_name = 7; + * + * @return The bytes for slpName. + */ + com.google.protobuf.ByteString getSlpNameBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupProperties.java new file mode 100644 index 000000000000..fb0a0ccba59b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupProperties.java @@ -0,0 +1,1506 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_ba.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupApplianceBackupProperties represents BackupDR backup appliance's
+ * properties.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupApplianceBackupProperties} + */ +@com.google.protobuf.Generated +public final class BackupApplianceBackupProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + BackupApplianceBackupPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupApplianceBackupProperties"); + } + + // Use BackupApplianceBackupProperties.newBuilder() to construct. + private BackupApplianceBackupProperties(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupApplianceBackupProperties() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultBaProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultBaProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.class, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.Builder.class); + } + + private int bitField0_; + public static final int GENERATION_ID_FIELD_NUMBER = 1; + private int generationId_ = 0; + + /** + * + * + *
+   * Output only. The numeric generation ID of the backup (monotonically
+   * increasing).
+   * 
+ * + * optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the generationId field is set. + */ + @java.lang.Override + public boolean hasGenerationId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The numeric generation ID of the backup (monotonically
+   * increasing).
+   * 
+ * + * optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The generationId. + */ + @java.lang.Override + public int getGenerationId() { + return generationId_; + } + + public static final int FINALIZE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp finalizeTime_; + + /** + * + * + *
+   * Output only. The time when this backup object was finalized (if none,
+   * backup is not finalized).
+   * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalizeTime field is set. + */ + @java.lang.Override + public boolean hasFinalizeTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when this backup object was finalized (if none,
+   * backup is not finalized).
+   * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalizeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getFinalizeTime() { + return finalizeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : finalizeTime_; + } + + /** + * + * + *
+   * Output only. The time when this backup object was finalized (if none,
+   * backup is not finalized).
+   * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getFinalizeTimeOrBuilder() { + return finalizeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : finalizeTime_; + } + + public static final int RECOVERY_RANGE_START_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp recoveryRangeStartTime_; + + /** + * + * + *
+   * Optional. The earliest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the recoveryRangeStartTime field is set. + */ + @java.lang.Override + public boolean hasRecoveryRangeStartTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The earliest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recoveryRangeStartTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRecoveryRangeStartTime() { + return recoveryRangeStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : recoveryRangeStartTime_; + } + + /** + * + * + *
+   * Optional. The earliest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRecoveryRangeStartTimeOrBuilder() { + return recoveryRangeStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : recoveryRangeStartTime_; + } + + public static final int RECOVERY_RANGE_END_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp recoveryRangeEndTime_; + + /** + * + * + *
+   * Optional. The latest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the recoveryRangeEndTime field is set. + */ + @java.lang.Override + public boolean hasRecoveryRangeEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. The latest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recoveryRangeEndTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRecoveryRangeEndTime() { + return recoveryRangeEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : recoveryRangeEndTime_; + } + + /** + * + * + *
+   * Optional. The latest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRecoveryRangeEndTimeOrBuilder() { + return recoveryRangeEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : recoveryRangeEndTime_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(1, generationId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getFinalizeTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getRecoveryRangeStartTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getRecoveryRangeEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, generationId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFinalizeTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRecoveryRangeStartTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRecoveryRangeEndTime()); + } + 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.backupdr.v1beta.BackupApplianceBackupProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties other = + (com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) obj; + + if (hasGenerationId() != other.hasGenerationId()) return false; + if (hasGenerationId()) { + if (getGenerationId() != other.getGenerationId()) return false; + } + if (hasFinalizeTime() != other.hasFinalizeTime()) return false; + if (hasFinalizeTime()) { + if (!getFinalizeTime().equals(other.getFinalizeTime())) return false; + } + if (hasRecoveryRangeStartTime() != other.hasRecoveryRangeStartTime()) return false; + if (hasRecoveryRangeStartTime()) { + if (!getRecoveryRangeStartTime().equals(other.getRecoveryRangeStartTime())) return false; + } + if (hasRecoveryRangeEndTime() != other.hasRecoveryRangeEndTime()) return false; + if (hasRecoveryRangeEndTime()) { + if (!getRecoveryRangeEndTime().equals(other.getRecoveryRangeEndTime())) 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 (hasGenerationId()) { + hash = (37 * hash) + GENERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getGenerationId(); + } + if (hasFinalizeTime()) { + hash = (37 * hash) + FINALIZE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getFinalizeTime().hashCode(); + } + if (hasRecoveryRangeStartTime()) { + hash = (37 * hash) + RECOVERY_RANGE_START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRecoveryRangeStartTime().hashCode(); + } + if (hasRecoveryRangeEndTime()) { + hash = (37 * hash) + RECOVERY_RANGE_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRecoveryRangeEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties 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.backupdr.v1beta.BackupApplianceBackupProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties 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.backupdr.v1beta.BackupApplianceBackupProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupApplianceBackupProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupApplianceBackupProperties represents BackupDR backup appliance's
+   * properties.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupApplianceBackupProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + com.google.cloud.backupdr.v1beta.BackupApplianceBackupPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultBaProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultBaProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.class, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFinalizeTimeFieldBuilder(); + internalGetRecoveryRangeStartTimeFieldBuilder(); + internalGetRecoveryRangeEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + generationId_ = 0; + finalizeTime_ = null; + if (finalizeTimeBuilder_ != null) { + finalizeTimeBuilder_.dispose(); + finalizeTimeBuilder_ = null; + } + recoveryRangeStartTime_ = null; + if (recoveryRangeStartTimeBuilder_ != null) { + recoveryRangeStartTimeBuilder_.dispose(); + recoveryRangeStartTimeBuilder_ = null; + } + recoveryRangeEndTime_ = null; + if (recoveryRangeEndTimeBuilder_ != null) { + recoveryRangeEndTimeBuilder_.dispose(); + recoveryRangeEndTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultBaProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties build() { + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties buildPartial() { + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties result = + new com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.generationId_ = generationId_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.finalizeTime_ = + finalizeTimeBuilder_ == null ? finalizeTime_ : finalizeTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.recoveryRangeStartTime_ = + recoveryRangeStartTimeBuilder_ == null + ? recoveryRangeStartTime_ + : recoveryRangeStartTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.recoveryRangeEndTime_ = + recoveryRangeEndTimeBuilder_ == null + ? recoveryRangeEndTime_ + : recoveryRangeEndTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties.getDefaultInstance()) + return this; + if (other.hasGenerationId()) { + setGenerationId(other.getGenerationId()); + } + if (other.hasFinalizeTime()) { + mergeFinalizeTime(other.getFinalizeTime()); + } + if (other.hasRecoveryRangeStartTime()) { + mergeRecoveryRangeStartTime(other.getRecoveryRangeStartTime()); + } + if (other.hasRecoveryRangeEndTime()) { + mergeRecoveryRangeEndTime(other.getRecoveryRangeEndTime()); + } + 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 8: + { + generationId_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetFinalizeTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetRecoveryRangeStartTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetRecoveryRangeEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 int generationId_; + + /** + * + * + *
+     * Output only. The numeric generation ID of the backup (monotonically
+     * increasing).
+     * 
+ * + * optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the generationId field is set. + */ + @java.lang.Override + public boolean hasGenerationId() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The numeric generation ID of the backup (monotonically
+     * increasing).
+     * 
+ * + * optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The generationId. + */ + @java.lang.Override + public int getGenerationId() { + return generationId_; + } + + /** + * + * + *
+     * Output only. The numeric generation ID of the backup (monotonically
+     * increasing).
+     * 
+ * + * optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The generationId to set. + * @return This builder for chaining. + */ + public Builder setGenerationId(int value) { + + generationId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The numeric generation ID of the backup (monotonically
+     * increasing).
+     * 
+ * + * optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGenerationId() { + bitField0_ = (bitField0_ & ~0x00000001); + generationId_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp finalizeTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + finalizeTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalizeTime field is set. + */ + public boolean hasFinalizeTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalizeTime. + */ + public com.google.protobuf.Timestamp getFinalizeTime() { + if (finalizeTimeBuilder_ == null) { + return finalizeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : finalizeTime_; + } else { + return finalizeTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalizeTime(com.google.protobuf.Timestamp value) { + if (finalizeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + finalizeTime_ = value; + } else { + finalizeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalizeTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (finalizeTimeBuilder_ == null) { + finalizeTime_ = builderForValue.build(); + } else { + finalizeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFinalizeTime(com.google.protobuf.Timestamp value) { + if (finalizeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && finalizeTime_ != null + && finalizeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getFinalizeTimeBuilder().mergeFrom(value); + } else { + finalizeTime_ = value; + } + } else { + finalizeTimeBuilder_.mergeFrom(value); + } + if (finalizeTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFinalizeTime() { + bitField0_ = (bitField0_ & ~0x00000002); + finalizeTime_ = null; + if (finalizeTimeBuilder_ != null) { + finalizeTimeBuilder_.dispose(); + finalizeTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getFinalizeTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetFinalizeTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getFinalizeTimeOrBuilder() { + if (finalizeTimeBuilder_ != null) { + return finalizeTimeBuilder_.getMessageOrBuilder(); + } else { + return finalizeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : finalizeTime_; + } + } + + /** + * + * + *
+     * Output only. The time when this backup object was finalized (if none,
+     * backup is not finalized).
+     * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetFinalizeTimeFieldBuilder() { + if (finalizeTimeBuilder_ == null) { + finalizeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getFinalizeTime(), getParentForChildren(), isClean()); + finalizeTime_ = null; + } + return finalizeTimeBuilder_; + } + + private com.google.protobuf.Timestamp recoveryRangeStartTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + recoveryRangeStartTimeBuilder_; + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the recoveryRangeStartTime field is set. + */ + public boolean hasRecoveryRangeStartTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recoveryRangeStartTime. + */ + public com.google.protobuf.Timestamp getRecoveryRangeStartTime() { + if (recoveryRangeStartTimeBuilder_ == null) { + return recoveryRangeStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : recoveryRangeStartTime_; + } else { + return recoveryRangeStartTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRecoveryRangeStartTime(com.google.protobuf.Timestamp value) { + if (recoveryRangeStartTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recoveryRangeStartTime_ = value; + } else { + recoveryRangeStartTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRecoveryRangeStartTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (recoveryRangeStartTimeBuilder_ == null) { + recoveryRangeStartTime_ = builderForValue.build(); + } else { + recoveryRangeStartTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRecoveryRangeStartTime(com.google.protobuf.Timestamp value) { + if (recoveryRangeStartTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && recoveryRangeStartTime_ != null + && recoveryRangeStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRecoveryRangeStartTimeBuilder().mergeFrom(value); + } else { + recoveryRangeStartTime_ = value; + } + } else { + recoveryRangeStartTimeBuilder_.mergeFrom(value); + } + if (recoveryRangeStartTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRecoveryRangeStartTime() { + bitField0_ = (bitField0_ & ~0x00000004); + recoveryRangeStartTime_ = null; + if (recoveryRangeStartTimeBuilder_ != null) { + recoveryRangeStartTimeBuilder_.dispose(); + recoveryRangeStartTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getRecoveryRangeStartTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetRecoveryRangeStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRecoveryRangeStartTimeOrBuilder() { + if (recoveryRangeStartTimeBuilder_ != null) { + return recoveryRangeStartTimeBuilder_.getMessageOrBuilder(); + } else { + return recoveryRangeStartTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : recoveryRangeStartTime_; + } + } + + /** + * + * + *
+     * Optional. The earliest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetRecoveryRangeStartTimeFieldBuilder() { + if (recoveryRangeStartTimeBuilder_ == null) { + recoveryRangeStartTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRecoveryRangeStartTime(), getParentForChildren(), isClean()); + recoveryRangeStartTime_ = null; + } + return recoveryRangeStartTimeBuilder_; + } + + private com.google.protobuf.Timestamp recoveryRangeEndTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + recoveryRangeEndTimeBuilder_; + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the recoveryRangeEndTime field is set. + */ + public boolean hasRecoveryRangeEndTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recoveryRangeEndTime. + */ + public com.google.protobuf.Timestamp getRecoveryRangeEndTime() { + if (recoveryRangeEndTimeBuilder_ == null) { + return recoveryRangeEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : recoveryRangeEndTime_; + } else { + return recoveryRangeEndTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRecoveryRangeEndTime(com.google.protobuf.Timestamp value) { + if (recoveryRangeEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + recoveryRangeEndTime_ = value; + } else { + recoveryRangeEndTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRecoveryRangeEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (recoveryRangeEndTimeBuilder_ == null) { + recoveryRangeEndTime_ = builderForValue.build(); + } else { + recoveryRangeEndTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRecoveryRangeEndTime(com.google.protobuf.Timestamp value) { + if (recoveryRangeEndTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && recoveryRangeEndTime_ != null + && recoveryRangeEndTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRecoveryRangeEndTimeBuilder().mergeFrom(value); + } else { + recoveryRangeEndTime_ = value; + } + } else { + recoveryRangeEndTimeBuilder_.mergeFrom(value); + } + if (recoveryRangeEndTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRecoveryRangeEndTime() { + bitField0_ = (bitField0_ & ~0x00000008); + recoveryRangeEndTime_ = null; + if (recoveryRangeEndTimeBuilder_ != null) { + recoveryRangeEndTimeBuilder_.dispose(); + recoveryRangeEndTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getRecoveryRangeEndTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetRecoveryRangeEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRecoveryRangeEndTimeOrBuilder() { + if (recoveryRangeEndTimeBuilder_ != null) { + return recoveryRangeEndTimeBuilder_.getMessageOrBuilder(); + } else { + return recoveryRangeEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : recoveryRangeEndTime_; + } + } + + /** + * + * + *
+     * Optional. The latest timestamp of data available in this Backup.
+     * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetRecoveryRangeEndTimeFieldBuilder() { + if (recoveryRangeEndTimeBuilder_ == null) { + recoveryRangeEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRecoveryRangeEndTime(), getParentForChildren(), isClean()); + recoveryRangeEndTime_ = null; + } + return recoveryRangeEndTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + private static final com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties(); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupApplianceBackupProperties 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.backupdr.v1beta.BackupApplianceBackupProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupPropertiesOrBuilder.java new file mode 100644 index 000000000000..434efe71f8be --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceBackupPropertiesOrBuilder.java @@ -0,0 +1,188 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_ba.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupApplianceBackupPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupApplianceBackupProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The numeric generation ID of the backup (monotonically
+   * increasing).
+   * 
+ * + * optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the generationId field is set. + */ + boolean hasGenerationId(); + + /** + * + * + *
+   * Output only. The numeric generation ID of the backup (monotonically
+   * increasing).
+   * 
+ * + * optional int32 generation_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The generationId. + */ + int getGenerationId(); + + /** + * + * + *
+   * Output only. The time when this backup object was finalized (if none,
+   * backup is not finalized).
+   * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalizeTime field is set. + */ + boolean hasFinalizeTime(); + + /** + * + * + *
+   * Output only. The time when this backup object was finalized (if none,
+   * backup is not finalized).
+   * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalizeTime. + */ + com.google.protobuf.Timestamp getFinalizeTime(); + + /** + * + * + *
+   * Output only. The time when this backup object was finalized (if none,
+   * backup is not finalized).
+   * 
+ * + * + * optional .google.protobuf.Timestamp finalize_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getFinalizeTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The earliest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the recoveryRangeStartTime field is set. + */ + boolean hasRecoveryRangeStartTime(); + + /** + * + * + *
+   * Optional. The earliest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recoveryRangeStartTime. + */ + com.google.protobuf.Timestamp getRecoveryRangeStartTime(); + + /** + * + * + *
+   * Optional. The earliest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getRecoveryRangeStartTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The latest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the recoveryRangeEndTime field is set. + */ + boolean hasRecoveryRangeEndTime(); + + /** + * + * + *
+   * Optional. The latest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recoveryRangeEndTime. + */ + com.google.protobuf.Timestamp getRecoveryRangeEndTime(); + + /** + * + * + *
+   * Optional. The latest timestamp of data available in this Backup.
+   * 
+ * + * + * optional .google.protobuf.Timestamp recovery_range_end_time = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getRecoveryRangeEndTimeOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceLockInfo.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceLockInfo.java new file mode 100644 index 000000000000..aa6732efa82b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceLockInfo.java @@ -0,0 +1,1604 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupApplianceLockInfo contains metadata about the backupappliance that
+ * created the lock.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupApplianceLockInfo} + */ +@com.google.protobuf.Generated +public final class BackupApplianceLockInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupApplianceLockInfo) + BackupApplianceLockInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupApplianceLockInfo"); + } + + // Use BackupApplianceLockInfo.newBuilder() to construct. + private BackupApplianceLockInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupApplianceLockInfo() { + backupApplianceName_ = ""; + lockReason_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.class, + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.Builder.class); + } + + private int lockSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object lockSource_; + + public enum LockSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + JOB_NAME(6), + BACKUP_IMAGE(7), + SLA_ID(8), + LOCKSOURCE_NOT_SET(0); + private final int value; + + private LockSourceCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LockSourceCase valueOf(int value) { + return forNumber(value); + } + + public static LockSourceCase forNumber(int value) { + switch (value) { + case 6: + return JOB_NAME; + case 7: + return BACKUP_IMAGE; + case 8: + return SLA_ID; + case 0: + return LOCKSOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public LockSourceCase getLockSourceCase() { + return LockSourceCase.forNumber(lockSourceCase_); + } + + public static final int JOB_NAME_FIELD_NUMBER = 6; + + /** + * + * + *
+   * The job name on the backup/recovery appliance that created this lock.
+   * 
+ * + * string job_name = 6; + * + * @return Whether the jobName field is set. + */ + public boolean hasJobName() { + return lockSourceCase_ == 6; + } + + /** + * + * + *
+   * The job name on the backup/recovery appliance that created this lock.
+   * 
+ * + * string job_name = 6; + * + * @return The jobName. + */ + public java.lang.String getJobName() { + java.lang.Object ref = ""; + if (lockSourceCase_ == 6) { + ref = lockSource_; + } + 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 (lockSourceCase_ == 6) { + lockSource_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The job name on the backup/recovery appliance that created this lock.
+   * 
+ * + * string job_name = 6; + * + * @return The bytes for jobName. + */ + public com.google.protobuf.ByteString getJobNameBytes() { + java.lang.Object ref = ""; + if (lockSourceCase_ == 6) { + ref = lockSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (lockSourceCase_ == 6) { + lockSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_IMAGE_FIELD_NUMBER = 7; + + /** + * + * + *
+   * The image name that depends on this Backup.
+   * 
+ * + * string backup_image = 7; + * + * @return Whether the backupImage field is set. + */ + public boolean hasBackupImage() { + return lockSourceCase_ == 7; + } + + /** + * + * + *
+   * The image name that depends on this Backup.
+   * 
+ * + * string backup_image = 7; + * + * @return The backupImage. + */ + public java.lang.String getBackupImage() { + java.lang.Object ref = ""; + if (lockSourceCase_ == 7) { + ref = lockSource_; + } + 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 (lockSourceCase_ == 7) { + lockSource_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The image name that depends on this Backup.
+   * 
+ * + * string backup_image = 7; + * + * @return The bytes for backupImage. + */ + public com.google.protobuf.ByteString getBackupImageBytes() { + java.lang.Object ref = ""; + if (lockSourceCase_ == 7) { + ref = lockSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (lockSourceCase_ == 7) { + lockSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SLA_ID_FIELD_NUMBER = 8; + + /** + * + * + *
+   * The SLA on the backup/recovery appliance that owns the lock.
+   * 
+ * + * int64 sla_id = 8; + * + * @return Whether the slaId field is set. + */ + @java.lang.Override + public boolean hasSlaId() { + return lockSourceCase_ == 8; + } + + /** + * + * + *
+   * The SLA on the backup/recovery appliance that owns the lock.
+   * 
+ * + * int64 sla_id = 8; + * + * @return The slaId. + */ + @java.lang.Override + public long getSlaId() { + if (lockSourceCase_ == 8) { + return (java.lang.Long) lockSource_; + } + return 0L; + } + + public static final int BACKUP_APPLIANCE_ID_FIELD_NUMBER = 1; + private long backupApplianceId_ = 0L; + + /** + * + * + *
+   * Required. The ID of the backup/recovery appliance that created this lock.
+   * 
+ * + * int64 backup_appliance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupApplianceId. + */ + @java.lang.Override + public long getBackupApplianceId() { + return backupApplianceId_; + } + + public static final int BACKUP_APPLIANCE_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupApplianceName_ = ""; + + /** + * + * + *
+   * Required. The name of the backup/recovery appliance that created this lock.
+   * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupApplianceName. + */ + @java.lang.Override + public java.lang.String getBackupApplianceName() { + java.lang.Object ref = backupApplianceName_; + 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(); + backupApplianceName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the backup/recovery appliance that created this lock.
+   * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupApplianceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupApplianceNameBytes() { + java.lang.Object ref = backupApplianceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupApplianceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCK_REASON_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object lockReason_ = ""; + + /** + * + * + *
+   * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+   * value of this string is only meaningful to the client and it is not
+   * interpreted by the BackupVault service.
+   * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockReason. + */ + @java.lang.Override + public java.lang.String getLockReason() { + java.lang.Object ref = lockReason_; + 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(); + lockReason_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+   * value of this string is only meaningful to the client and it is not
+   * interpreted by the BackupVault service.
+   * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lockReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLockReasonBytes() { + java.lang.Object ref = lockReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lockReason_ = 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 (backupApplianceId_ != 0L) { + output.writeInt64(1, backupApplianceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupApplianceName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupApplianceName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lockReason_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, lockReason_); + } + if (lockSourceCase_ == 6) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, lockSource_); + } + if (lockSourceCase_ == 7) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, lockSource_); + } + if (lockSourceCase_ == 8) { + output.writeInt64(8, (long) ((java.lang.Long) lockSource_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (backupApplianceId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, backupApplianceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupApplianceName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupApplianceName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lockReason_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, lockReason_); + } + if (lockSourceCase_ == 6) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, lockSource_); + } + if (lockSourceCase_ == 7) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, lockSource_); + } + if (lockSourceCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 8, (long) ((java.lang.Long) lockSource_)); + } + 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.backupdr.v1beta.BackupApplianceLockInfo)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo other = + (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) obj; + + if (getBackupApplianceId() != other.getBackupApplianceId()) return false; + if (!getBackupApplianceName().equals(other.getBackupApplianceName())) return false; + if (!getLockReason().equals(other.getLockReason())) return false; + if (!getLockSourceCase().equals(other.getLockSourceCase())) return false; + switch (lockSourceCase_) { + case 6: + if (!getJobName().equals(other.getJobName())) return false; + break; + case 7: + if (!getBackupImage().equals(other.getBackupImage())) return false; + break; + case 8: + if (getSlaId() != other.getSlaId()) return false; + break; + case 0: + default: + } + 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) + BACKUP_APPLIANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBackupApplianceId()); + hash = (37 * hash) + BACKUP_APPLIANCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBackupApplianceName().hashCode(); + hash = (37 * hash) + LOCK_REASON_FIELD_NUMBER; + hash = (53 * hash) + getLockReason().hashCode(); + switch (lockSourceCase_) { + case 6: + hash = (37 * hash) + JOB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJobName().hashCode(); + break; + case 7: + hash = (37 * hash) + BACKUP_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getBackupImage().hashCode(); + break; + case 8: + hash = (37 * hash) + SLA_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSlaId()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo 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.backupdr.v1beta.BackupApplianceLockInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo 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.backupdr.v1beta.BackupApplianceLockInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupApplianceLockInfo 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupApplianceLockInfo contains metadata about the backupappliance that
+   * created the lock.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupApplianceLockInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupApplianceLockInfo) + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.class, + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupApplianceId_ = 0L; + backupApplianceName_ = ""; + lockReason_ = ""; + lockSourceCase_ = 0; + lockSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo build() { + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo buildPartial() { + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo result = + new com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backupApplianceId_ = backupApplianceId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.backupApplianceName_ = backupApplianceName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.lockReason_ = lockReason_; + } + } + + private void buildPartialOneofs( + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo result) { + result.lockSourceCase_ = lockSourceCase_; + result.lockSource_ = this.lockSource_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo other) { + if (other == com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance()) + return this; + if (other.getBackupApplianceId() != 0L) { + setBackupApplianceId(other.getBackupApplianceId()); + } + if (!other.getBackupApplianceName().isEmpty()) { + backupApplianceName_ = other.backupApplianceName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getLockReason().isEmpty()) { + lockReason_ = other.lockReason_; + bitField0_ |= 0x00000020; + onChanged(); + } + switch (other.getLockSourceCase()) { + case JOB_NAME: + { + lockSourceCase_ = 6; + lockSource_ = other.lockSource_; + onChanged(); + break; + } + case BACKUP_IMAGE: + { + lockSourceCase_ = 7; + lockSource_ = other.lockSource_; + onChanged(); + break; + } + case SLA_ID: + { + setSlaId(other.getSlaId()); + break; + } + case LOCKSOURCE_NOT_SET: + { + break; + } + } + 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 8: + { + backupApplianceId_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 8 + case 18: + { + backupApplianceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 18 + case 42: + { + lockReason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + lockSourceCase_ = 6; + lockSource_ = s; + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + lockSourceCase_ = 7; + lockSource_ = s; + break; + } // case 58 + case 64: + { + lockSource_ = input.readInt64(); + lockSourceCase_ = 8; + break; + } // case 64 + 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 lockSourceCase_ = 0; + private java.lang.Object lockSource_; + + public LockSourceCase getLockSourceCase() { + return LockSourceCase.forNumber(lockSourceCase_); + } + + public Builder clearLockSource() { + lockSourceCase_ = 0; + lockSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The job name on the backup/recovery appliance that created this lock.
+     * 
+ * + * string job_name = 6; + * + * @return Whether the jobName field is set. + */ + @java.lang.Override + public boolean hasJobName() { + return lockSourceCase_ == 6; + } + + /** + * + * + *
+     * The job name on the backup/recovery appliance that created this lock.
+     * 
+ * + * string job_name = 6; + * + * @return The jobName. + */ + @java.lang.Override + public java.lang.String getJobName() { + java.lang.Object ref = ""; + if (lockSourceCase_ == 6) { + ref = lockSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (lockSourceCase_ == 6) { + lockSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The job name on the backup/recovery appliance that created this lock.
+     * 
+ * + * string job_name = 6; + * + * @return The bytes for jobName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobNameBytes() { + java.lang.Object ref = ""; + if (lockSourceCase_ == 6) { + ref = lockSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (lockSourceCase_ == 6) { + lockSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The job name on the backup/recovery appliance that created this lock.
+     * 
+ * + * string job_name = 6; + * + * @param value The jobName to set. + * @return This builder for chaining. + */ + public Builder setJobName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lockSourceCase_ = 6; + lockSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The job name on the backup/recovery appliance that created this lock.
+     * 
+ * + * string job_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearJobName() { + if (lockSourceCase_ == 6) { + lockSourceCase_ = 0; + lockSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The job name on the backup/recovery appliance that created this lock.
+     * 
+ * + * string job_name = 6; + * + * @param value The bytes for jobName to set. + * @return This builder for chaining. + */ + public Builder setJobNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lockSourceCase_ = 6; + lockSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The image name that depends on this Backup.
+     * 
+ * + * string backup_image = 7; + * + * @return Whether the backupImage field is set. + */ + @java.lang.Override + public boolean hasBackupImage() { + return lockSourceCase_ == 7; + } + + /** + * + * + *
+     * The image name that depends on this Backup.
+     * 
+ * + * string backup_image = 7; + * + * @return The backupImage. + */ + @java.lang.Override + public java.lang.String getBackupImage() { + java.lang.Object ref = ""; + if (lockSourceCase_ == 7) { + ref = lockSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (lockSourceCase_ == 7) { + lockSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The image name that depends on this Backup.
+     * 
+ * + * string backup_image = 7; + * + * @return The bytes for backupImage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupImageBytes() { + java.lang.Object ref = ""; + if (lockSourceCase_ == 7) { + ref = lockSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (lockSourceCase_ == 7) { + lockSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The image name that depends on this Backup.
+     * 
+ * + * string backup_image = 7; + * + * @param value The backupImage to set. + * @return This builder for chaining. + */ + public Builder setBackupImage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lockSourceCase_ = 7; + lockSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The image name that depends on this Backup.
+     * 
+ * + * string backup_image = 7; + * + * @return This builder for chaining. + */ + public Builder clearBackupImage() { + if (lockSourceCase_ == 7) { + lockSourceCase_ = 0; + lockSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The image name that depends on this Backup.
+     * 
+ * + * string backup_image = 7; + * + * @param value The bytes for backupImage to set. + * @return This builder for chaining. + */ + public Builder setBackupImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lockSourceCase_ = 7; + lockSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The SLA on the backup/recovery appliance that owns the lock.
+     * 
+ * + * int64 sla_id = 8; + * + * @return Whether the slaId field is set. + */ + public boolean hasSlaId() { + return lockSourceCase_ == 8; + } + + /** + * + * + *
+     * The SLA on the backup/recovery appliance that owns the lock.
+     * 
+ * + * int64 sla_id = 8; + * + * @return The slaId. + */ + public long getSlaId() { + if (lockSourceCase_ == 8) { + return (java.lang.Long) lockSource_; + } + return 0L; + } + + /** + * + * + *
+     * The SLA on the backup/recovery appliance that owns the lock.
+     * 
+ * + * int64 sla_id = 8; + * + * @param value The slaId to set. + * @return This builder for chaining. + */ + public Builder setSlaId(long value) { + + lockSourceCase_ = 8; + lockSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The SLA on the backup/recovery appliance that owns the lock.
+     * 
+ * + * int64 sla_id = 8; + * + * @return This builder for chaining. + */ + public Builder clearSlaId() { + if (lockSourceCase_ == 8) { + lockSourceCase_ = 0; + lockSource_ = null; + onChanged(); + } + return this; + } + + private long backupApplianceId_; + + /** + * + * + *
+     * Required. The ID of the backup/recovery appliance that created this lock.
+     * 
+ * + * int64 backup_appliance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupApplianceId. + */ + @java.lang.Override + public long getBackupApplianceId() { + return backupApplianceId_; + } + + /** + * + * + *
+     * Required. The ID of the backup/recovery appliance that created this lock.
+     * 
+ * + * int64 backup_appliance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The backupApplianceId to set. + * @return This builder for chaining. + */ + public Builder setBackupApplianceId(long value) { + + backupApplianceId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the backup/recovery appliance that created this lock.
+     * 
+ * + * int64 backup_appliance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBackupApplianceId() { + bitField0_ = (bitField0_ & ~0x00000008); + backupApplianceId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object backupApplianceName_ = ""; + + /** + * + * + *
+     * Required. The name of the backup/recovery appliance that created this lock.
+     * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupApplianceName. + */ + public java.lang.String getBackupApplianceName() { + java.lang.Object ref = backupApplianceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupApplianceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the backup/recovery appliance that created this lock.
+     * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupApplianceName. + */ + public com.google.protobuf.ByteString getBackupApplianceNameBytes() { + java.lang.Object ref = backupApplianceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupApplianceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the backup/recovery appliance that created this lock.
+     * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The backupApplianceName to set. + * @return This builder for chaining. + */ + public Builder setBackupApplianceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupApplianceName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the backup/recovery appliance that created this lock.
+     * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBackupApplianceName() { + backupApplianceName_ = getDefaultInstance().getBackupApplianceName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the backup/recovery appliance that created this lock.
+     * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for backupApplianceName to set. + * @return This builder for chaining. + */ + public Builder setBackupApplianceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupApplianceName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object lockReason_ = ""; + + /** + * + * + *
+     * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+     * value of this string is only meaningful to the client and it is not
+     * interpreted by the BackupVault service.
+     * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockReason. + */ + public java.lang.String getLockReason() { + java.lang.Object ref = lockReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lockReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+     * value of this string is only meaningful to the client and it is not
+     * interpreted by the BackupVault service.
+     * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lockReason. + */ + public com.google.protobuf.ByteString getLockReasonBytes() { + java.lang.Object ref = lockReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lockReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+     * value of this string is only meaningful to the client and it is not
+     * interpreted by the BackupVault service.
+     * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The lockReason to set. + * @return This builder for chaining. + */ + public Builder setLockReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lockReason_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+     * value of this string is only meaningful to the client and it is not
+     * interpreted by the BackupVault service.
+     * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLockReason() { + lockReason_ = getDefaultInstance().getLockReason(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+     * value of this string is only meaningful to the client and it is not
+     * interpreted by the BackupVault service.
+     * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for lockReason to set. + * @return This builder for chaining. + */ + public Builder setLockReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lockReason_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupApplianceLockInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupApplianceLockInfo) + private static final com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo(); + } + + public static com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupApplianceLockInfo 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.backupdr.v1beta.BackupApplianceLockInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceLockInfoOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceLockInfoOrBuilder.java new file mode 100644 index 000000000000..f192cf4ee23c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupApplianceLockInfoOrBuilder.java @@ -0,0 +1,203 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupApplianceLockInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupApplianceLockInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The job name on the backup/recovery appliance that created this lock.
+   * 
+ * + * string job_name = 6; + * + * @return Whether the jobName field is set. + */ + boolean hasJobName(); + + /** + * + * + *
+   * The job name on the backup/recovery appliance that created this lock.
+   * 
+ * + * string job_name = 6; + * + * @return The jobName. + */ + java.lang.String getJobName(); + + /** + * + * + *
+   * The job name on the backup/recovery appliance that created this lock.
+   * 
+ * + * string job_name = 6; + * + * @return The bytes for jobName. + */ + com.google.protobuf.ByteString getJobNameBytes(); + + /** + * + * + *
+   * The image name that depends on this Backup.
+   * 
+ * + * string backup_image = 7; + * + * @return Whether the backupImage field is set. + */ + boolean hasBackupImage(); + + /** + * + * + *
+   * The image name that depends on this Backup.
+   * 
+ * + * string backup_image = 7; + * + * @return The backupImage. + */ + java.lang.String getBackupImage(); + + /** + * + * + *
+   * The image name that depends on this Backup.
+   * 
+ * + * string backup_image = 7; + * + * @return The bytes for backupImage. + */ + com.google.protobuf.ByteString getBackupImageBytes(); + + /** + * + * + *
+   * The SLA on the backup/recovery appliance that owns the lock.
+   * 
+ * + * int64 sla_id = 8; + * + * @return Whether the slaId field is set. + */ + boolean hasSlaId(); + + /** + * + * + *
+   * The SLA on the backup/recovery appliance that owns the lock.
+   * 
+ * + * int64 sla_id = 8; + * + * @return The slaId. + */ + long getSlaId(); + + /** + * + * + *
+   * Required. The ID of the backup/recovery appliance that created this lock.
+   * 
+ * + * int64 backup_appliance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupApplianceId. + */ + long getBackupApplianceId(); + + /** + * + * + *
+   * Required. The name of the backup/recovery appliance that created this lock.
+   * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupApplianceName. + */ + java.lang.String getBackupApplianceName(); + + /** + * + * + *
+   * Required. The name of the backup/recovery appliance that created this lock.
+   * 
+ * + * string backup_appliance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupApplianceName. + */ + com.google.protobuf.ByteString getBackupApplianceNameBytes(); + + /** + * + * + *
+   * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+   * value of this string is only meaningful to the client and it is not
+   * interpreted by the BackupVault service.
+   * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lockReason. + */ + java.lang.String getLockReason(); + + /** + * + * + *
+   * Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc.  The
+   * value of this string is only meaningful to the client and it is not
+   * interpreted by the BackupVault service.
+   * 
+ * + * string lock_reason = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lockReason. + */ + com.google.protobuf.ByteString getLockReasonBytes(); + + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.LockSourceCase getLockSourceCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigDetails.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigDetails.java new file mode 100644 index 000000000000..877b4751d3c9 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigDetails.java @@ -0,0 +1,3942 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupConfigDetails has information about how the resource is configured
+ * for backups and about the most recent backup taken for this configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupConfigDetails} + */ +@com.google.protobuf.Generated +public final class BackupConfigDetails extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupConfigDetails) + BackupConfigDetailsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupConfigDetails"); + } + + // Use BackupConfigDetails.newBuilder() to construct. + private BackupConfigDetails(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupConfigDetails() { + backupConfigSource_ = ""; + backupConfigSourceDisplayName_ = ""; + type_ = 0; + state_ = 0; + applicableResource_ = ""; + backupVault_ = ""; + backupLocations_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupConfigDetails.class, + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder.class); + } + + /** + * + * + *
+   * Type of the backup configuration.
+   * This enum may receive new values in the future.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupConfigDetails.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Backup config type is unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Backup config is Cloud SQL instance's automated backup config.
+     * 
+ * + * CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1; + */ + CLOUD_SQL_INSTANCE_BACKUP_CONFIG(1), + /** + * + * + *
+     * Backup config is Compute Engine Resource Policy.
+     * 
+ * + * COMPUTE_ENGINE_RESOURCE_POLICY = 2; + */ + COMPUTE_ENGINE_RESOURCE_POLICY(2), + /** + * + * + *
+     * Backup config is Google Cloud Backup and DR's Backup Plan.
+     * 
+ * + * BACKUPDR_BACKUP_PLAN = 3; + */ + BACKUPDR_BACKUP_PLAN(3), + /** + * + * + *
+     * Backup config is Google Cloud Backup and DR's Template.
+     * 
+ * + * BACKUPDR_TEMPLATE = 4; + */ + BACKUPDR_TEMPLATE(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+     * Backup config type is unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Backup config is Cloud SQL instance's automated backup config.
+     * 
+ * + * CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1; + */ + public static final int CLOUD_SQL_INSTANCE_BACKUP_CONFIG_VALUE = 1; + + /** + * + * + *
+     * Backup config is Compute Engine Resource Policy.
+     * 
+ * + * COMPUTE_ENGINE_RESOURCE_POLICY = 2; + */ + public static final int COMPUTE_ENGINE_RESOURCE_POLICY_VALUE = 2; + + /** + * + * + *
+     * Backup config is Google Cloud Backup and DR's Backup Plan.
+     * 
+ * + * BACKUPDR_BACKUP_PLAN = 3; + */ + public static final int BACKUPDR_BACKUP_PLAN_VALUE = 3; + + /** + * + * + *
+     * Backup config is Google Cloud Backup and DR's Template.
+     * 
+ * + * BACKUPDR_TEMPLATE = 4; + */ + public static final int BACKUPDR_TEMPLATE_VALUE = 4; + + 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 CLOUD_SQL_INSTANCE_BACKUP_CONFIG; + case 2: + return COMPUTE_ENGINE_RESOURCE_POLICY; + case 3: + return BACKUPDR_BACKUP_PLAN; + case 4: + return BACKUPDR_TEMPLATE; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupConfigDetails.getDescriptor() + .getEnumTypes() + .get(0); + } + + 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.backupdr.v1beta.BackupConfigDetails.Type) + } + + /** + * + * + *
+   * The state tells whether the backup config is active or not.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupConfigDetails.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Backup config state not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The config is in an active state protecting the resource
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+     * The config is currently not protecting the resource. Either because it is
+     * disabled or the owning project has been deleted without cleanup of the
+     * actual resource.
+     * 
+ * + * INACTIVE = 2; + */ + INACTIVE(2), + /** + * + * + *
+     * The config still exists but because of some error state it is not
+     * protecting the resource. Like the source project is deleted. For eg.
+     * PlanAssociation, BackupPlan is deleted.
+     * 
+ * + * ERROR = 3; + */ + ERROR(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * Backup config state not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The config is in an active state protecting the resource
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
+     * The config is currently not protecting the resource. Either because it is
+     * disabled or the owning project has been deleted without cleanup of the
+     * actual resource.
+     * 
+ * + * INACTIVE = 2; + */ + public static final int INACTIVE_VALUE = 2; + + /** + * + * + *
+     * The config still exists but because of some error state it is not
+     * protecting the resource. Like the source project is deleted. For eg.
+     * PlanAssociation, BackupPlan is deleted.
+     * 
+ * + * ERROR = 3; + */ + public static final int ERROR_VALUE = 3; + + 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 ACTIVE; + case 2: + return INACTIVE; + case 3: + return ERROR; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupConfigDetails.getDescriptor() + .getEnumTypes() + .get(1); + } + + 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.backupdr.v1beta.BackupConfigDetails.State) + } + + private int bitField0_; + private int planSpecificConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object planSpecificConfig_; + + public enum PlanSpecificConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BACKUP_DR_PLAN_CONFIG(10), + BACKUP_DR_TEMPLATE_CONFIG(11), + PLANSPECIFICCONFIG_NOT_SET(0); + private final int value; + + private PlanSpecificConfigCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PlanSpecificConfigCase valueOf(int value) { + return forNumber(value); + } + + public static PlanSpecificConfigCase forNumber(int value) { + switch (value) { + case 10: + return BACKUP_DR_PLAN_CONFIG; + case 11: + return BACKUP_DR_TEMPLATE_CONFIG; + case 0: + return PLANSPECIFICCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PlanSpecificConfigCase getPlanSpecificConfigCase() { + return PlanSpecificConfigCase.forNumber(planSpecificConfigCase_); + } + + public static final int BACKUP_DR_PLAN_CONFIG_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Google Cloud Backup and DR's Backup Plan specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + * + * @return Whether the backupDrPlanConfig field is set. + */ + @java.lang.Override + public boolean hasBackupDrPlanConfig() { + return planSpecificConfigCase_ == 10; + } + + /** + * + * + *
+   * Google Cloud Backup and DR's Backup Plan specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + * + * @return The backupDrPlanConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanConfig getBackupDrPlanConfig() { + if (planSpecificConfigCase_ == 10) { + return (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) planSpecificConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Google Cloud Backup and DR's Backup Plan specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanConfigOrBuilder + getBackupDrPlanConfigOrBuilder() { + if (planSpecificConfigCase_ == 10) { + return (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) planSpecificConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance(); + } + + public static final int BACKUP_DR_TEMPLATE_CONFIG_FIELD_NUMBER = 11; + + /** + * + * + *
+   * Google Cloud Backup and DR's Template specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + * + * @return Whether the backupDrTemplateConfig field is set. + */ + @java.lang.Override + public boolean hasBackupDrTemplateConfig() { + return planSpecificConfigCase_ == 11; + } + + /** + * + * + *
+   * Google Cloud Backup and DR's Template specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + * + * @return The backupDrTemplateConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig getBackupDrTemplateConfig() { + if (planSpecificConfigCase_ == 11) { + return (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) planSpecificConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Google Cloud Backup and DR's Template specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrTemplateConfigOrBuilder + getBackupDrTemplateConfigOrBuilder() { + if (planSpecificConfigCase_ == 11) { + return (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) planSpecificConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance(); + } + + public static final int BACKUP_CONFIG_SOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupConfigSource_ = ""; + + /** + * + * + *
+   * Output only. The full resource name of the backup config source resource.
+   * For example,
+   * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+   * or
+   * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+   * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupConfigSource. + */ + @java.lang.Override + public java.lang.String getBackupConfigSource() { + java.lang.Object ref = backupConfigSource_; + 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(); + backupConfigSource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The full resource name of the backup config source resource.
+   * For example,
+   * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+   * or
+   * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+   * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for backupConfigSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupConfigSourceBytes() { + java.lang.Object ref = backupConfigSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupConfigSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_CONFIG_SOURCE_DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupConfigSourceDisplayName_ = ""; + + /** + * + * + *
+   * Output only. The display name of the backup config source resource.
+   * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupConfigSourceDisplayName. + */ + @java.lang.Override + public java.lang.String getBackupConfigSourceDisplayName() { + java.lang.Object ref = backupConfigSourceDisplayName_; + 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(); + backupConfigSourceDisplayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The display name of the backup config source resource.
+   * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupConfigSourceDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupConfigSourceDisplayNameBytes() { + java.lang.Object ref = backupConfigSourceDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupConfigSourceDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_ = 0; + + /** + * + * + *
+   * Output only. The type of the backup config resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Output only. The type of the backup config resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type getType() { + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type result = + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type.UNRECOGNIZED + : result; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The state of the backup config resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.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 state of the backup config resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetails.State getState() { + com.google.cloud.backupdr.v1beta.BackupConfigDetails.State result = + com.google.cloud.backupdr.v1beta.BackupConfigDetails.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigDetails.State.UNRECOGNIZED + : result; + } + + public static final int PITR_SETTINGS_FIELD_NUMBER = 5; + private com.google.cloud.backupdr.v1beta.PitrSettings pitrSettings_; + + /** + * + * + *
+   * Output only. Point in time recovery settings of the backup configuration
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pitrSettings field is set. + */ + @java.lang.Override + public boolean hasPitrSettings() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Point in time recovery settings of the backup configuration
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pitrSettings. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PitrSettings getPitrSettings() { + return pitrSettings_ == null + ? com.google.cloud.backupdr.v1beta.PitrSettings.getDefaultInstance() + : pitrSettings_; + } + + /** + * + * + *
+   * Output only. Point in time recovery settings of the backup configuration
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PitrSettingsOrBuilder getPitrSettingsOrBuilder() { + return pitrSettings_ == null + ? com.google.cloud.backupdr.v1beta.PitrSettings.getDefaultInstance() + : pitrSettings_; + } + + public static final int LATEST_SUCCESSFUL_BACKUP_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp latestSuccessfulBackupTime_; + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup configuration.
+   * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the latestSuccessfulBackupTime field is set. + */ + @java.lang.Override + public boolean hasLatestSuccessfulBackupTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup configuration.
+   * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The latestSuccessfulBackupTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLatestSuccessfulBackupTime() { + return latestSuccessfulBackupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestSuccessfulBackupTime_; + } + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup configuration.
+   * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLatestSuccessfulBackupTimeOrBuilder() { + return latestSuccessfulBackupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestSuccessfulBackupTime_; + } + + public static final int APPLICABLE_RESOURCE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicableResource_ = ""; + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource that is applicable for the backup configuration. Example:
+   * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+   * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The applicableResource. + */ + @java.lang.Override + public java.lang.String getApplicableResource() { + java.lang.Object ref = applicableResource_; + 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(); + applicableResource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource that is applicable for the backup configuration. Example:
+   * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+   * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for applicableResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicableResourceBytes() { + java.lang.Object ref = applicableResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicableResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_VAULT_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupVault_ = ""; + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the backup vault that will store the backups generated through this
+   * backup configuration. Example:
+   * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+   * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the backup vault that will store the backups generated through this
+   * backup configuration. Example:
+   * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+   * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 BACKUP_LOCATIONS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private java.util.List backupLocations_; + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + @java.lang.Override + public java.util.List getBackupLocationsList() { + return backupLocations_; + } + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + @java.lang.Override + public java.util.List + getBackupLocationsOrBuilderList() { + return backupLocations_; + } + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + @java.lang.Override + public int getBackupLocationsCount() { + return backupLocations_.size(); + } + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLocation getBackupLocations(int index) { + return backupLocations_.get(index); + } + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLocationOrBuilder getBackupLocationsOrBuilder( + int index) { + return backupLocations_.get(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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupConfigSource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, backupConfigSource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupConfigSourceDisplayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupConfigSourceDisplayName_); + } + if (type_ + != com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, type_); + } + if (state_ + != com.google.cloud.backupdr.v1beta.BackupConfigDetails.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getPitrSettings()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getLatestSuccessfulBackupTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicableResource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, applicableResource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVault_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, backupVault_); + } + if (planSpecificConfigCase_ == 10) { + output.writeMessage( + 10, (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) planSpecificConfig_); + } + if (planSpecificConfigCase_ == 11) { + output.writeMessage( + 11, (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) planSpecificConfig_); + } + for (int i = 0; i < backupLocations_.size(); i++) { + output.writeMessage(12, backupLocations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupConfigSource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, backupConfigSource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupConfigSourceDisplayName_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(2, backupConfigSourceDisplayName_); + } + if (type_ + != com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + if (state_ + != com.google.cloud.backupdr.v1beta.BackupConfigDetails.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getPitrSettings()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getLatestSuccessfulBackupTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicableResource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, applicableResource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVault_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, backupVault_); + } + if (planSpecificConfigCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) planSpecificConfig_); + } + if (planSpecificConfigCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) planSpecificConfig_); + } + for (int i = 0; i < backupLocations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, backupLocations_.get(i)); + } + 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.backupdr.v1beta.BackupConfigDetails)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupConfigDetails other = + (com.google.cloud.backupdr.v1beta.BackupConfigDetails) obj; + + if (!getBackupConfigSource().equals(other.getBackupConfigSource())) return false; + if (!getBackupConfigSourceDisplayName().equals(other.getBackupConfigSourceDisplayName())) + return false; + if (type_ != other.type_) return false; + if (state_ != other.state_) return false; + if (hasPitrSettings() != other.hasPitrSettings()) return false; + if (hasPitrSettings()) { + if (!getPitrSettings().equals(other.getPitrSettings())) return false; + } + if (hasLatestSuccessfulBackupTime() != other.hasLatestSuccessfulBackupTime()) return false; + if (hasLatestSuccessfulBackupTime()) { + if (!getLatestSuccessfulBackupTime().equals(other.getLatestSuccessfulBackupTime())) + return false; + } + if (!getApplicableResource().equals(other.getApplicableResource())) return false; + if (!getBackupVault().equals(other.getBackupVault())) return false; + if (!getBackupLocationsList().equals(other.getBackupLocationsList())) return false; + if (!getPlanSpecificConfigCase().equals(other.getPlanSpecificConfigCase())) return false; + switch (planSpecificConfigCase_) { + case 10: + if (!getBackupDrPlanConfig().equals(other.getBackupDrPlanConfig())) return false; + break; + case 11: + if (!getBackupDrTemplateConfig().equals(other.getBackupDrTemplateConfig())) return false; + break; + case 0: + default: + } + 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) + BACKUP_CONFIG_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getBackupConfigSource().hashCode(); + hash = (37 * hash) + BACKUP_CONFIG_SOURCE_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBackupConfigSourceDisplayName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasPitrSettings()) { + hash = (37 * hash) + PITR_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getPitrSettings().hashCode(); + } + if (hasLatestSuccessfulBackupTime()) { + hash = (37 * hash) + LATEST_SUCCESSFUL_BACKUP_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLatestSuccessfulBackupTime().hashCode(); + } + hash = (37 * hash) + APPLICABLE_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getApplicableResource().hashCode(); + hash = (37 * hash) + BACKUP_VAULT_FIELD_NUMBER; + hash = (53 * hash) + getBackupVault().hashCode(); + if (getBackupLocationsCount() > 0) { + hash = (37 * hash) + BACKUP_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getBackupLocationsList().hashCode(); + } + switch (planSpecificConfigCase_) { + case 10: + hash = (37 * hash) + BACKUP_DR_PLAN_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBackupDrPlanConfig().hashCode(); + break; + case 11: + hash = (37 * hash) + BACKUP_DR_TEMPLATE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBackupDrTemplateConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails 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.backupdr.v1beta.BackupConfigDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails 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.backupdr.v1beta.BackupConfigDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupConfigDetails 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupConfigDetails has information about how the resource is configured
+   * for backups and about the most recent backup taken for this configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupConfigDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupConfigDetails) + com.google.cloud.backupdr.v1beta.BackupConfigDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupConfigDetails.class, + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupConfigDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPitrSettingsFieldBuilder(); + internalGetLatestSuccessfulBackupTimeFieldBuilder(); + internalGetBackupLocationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupDrPlanConfigBuilder_ != null) { + backupDrPlanConfigBuilder_.clear(); + } + if (backupDrTemplateConfigBuilder_ != null) { + backupDrTemplateConfigBuilder_.clear(); + } + backupConfigSource_ = ""; + backupConfigSourceDisplayName_ = ""; + type_ = 0; + state_ = 0; + pitrSettings_ = null; + if (pitrSettingsBuilder_ != null) { + pitrSettingsBuilder_.dispose(); + pitrSettingsBuilder_ = null; + } + latestSuccessfulBackupTime_ = null; + if (latestSuccessfulBackupTimeBuilder_ != null) { + latestSuccessfulBackupTimeBuilder_.dispose(); + latestSuccessfulBackupTimeBuilder_ = null; + } + applicableResource_ = ""; + backupVault_ = ""; + if (backupLocationsBuilder_ == null) { + backupLocations_ = java.util.Collections.emptyList(); + } else { + backupLocations_ = null; + backupLocationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + planSpecificConfigCase_ = 0; + planSpecificConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetails getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupConfigDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetails build() { + com.google.cloud.backupdr.v1beta.BackupConfigDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetails buildPartial() { + com.google.cloud.backupdr.v1beta.BackupConfigDetails result = + new com.google.cloud.backupdr.v1beta.BackupConfigDetails(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.BackupConfigDetails result) { + if (backupLocationsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + backupLocations_ = java.util.Collections.unmodifiableList(backupLocations_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.backupLocations_ = backupLocations_; + } else { + result.backupLocations_ = backupLocationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupConfigDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupConfigSource_ = backupConfigSource_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backupConfigSourceDisplayName_ = backupConfigSourceDisplayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pitrSettings_ = + pitrSettingsBuilder_ == null ? pitrSettings_ : pitrSettingsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.latestSuccessfulBackupTime_ = + latestSuccessfulBackupTimeBuilder_ == null + ? latestSuccessfulBackupTime_ + : latestSuccessfulBackupTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.applicableResource_ = applicableResource_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.backupVault_ = backupVault_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.BackupConfigDetails result) { + result.planSpecificConfigCase_ = planSpecificConfigCase_; + result.planSpecificConfig_ = this.planSpecificConfig_; + if (planSpecificConfigCase_ == 10 && backupDrPlanConfigBuilder_ != null) { + result.planSpecificConfig_ = backupDrPlanConfigBuilder_.build(); + } + if (planSpecificConfigCase_ == 11 && backupDrTemplateConfigBuilder_ != null) { + result.planSpecificConfig_ = backupDrTemplateConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupConfigDetails) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupConfigDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupConfigDetails other) { + if (other == com.google.cloud.backupdr.v1beta.BackupConfigDetails.getDefaultInstance()) + return this; + if (!other.getBackupConfigSource().isEmpty()) { + backupConfigSource_ = other.backupConfigSource_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getBackupConfigSourceDisplayName().isEmpty()) { + backupConfigSourceDisplayName_ = other.backupConfigSourceDisplayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasPitrSettings()) { + mergePitrSettings(other.getPitrSettings()); + } + if (other.hasLatestSuccessfulBackupTime()) { + mergeLatestSuccessfulBackupTime(other.getLatestSuccessfulBackupTime()); + } + if (!other.getApplicableResource().isEmpty()) { + applicableResource_ = other.applicableResource_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getBackupVault().isEmpty()) { + backupVault_ = other.backupVault_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (backupLocationsBuilder_ == null) { + if (!other.backupLocations_.isEmpty()) { + if (backupLocations_.isEmpty()) { + backupLocations_ = other.backupLocations_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureBackupLocationsIsMutable(); + backupLocations_.addAll(other.backupLocations_); + } + onChanged(); + } + } else { + if (!other.backupLocations_.isEmpty()) { + if (backupLocationsBuilder_.isEmpty()) { + backupLocationsBuilder_.dispose(); + backupLocationsBuilder_ = null; + backupLocations_ = other.backupLocations_; + bitField0_ = (bitField0_ & ~0x00000400); + backupLocationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupLocationsFieldBuilder() + : null; + } else { + backupLocationsBuilder_.addAllMessages(other.backupLocations_); + } + } + } + switch (other.getPlanSpecificConfigCase()) { + case BACKUP_DR_PLAN_CONFIG: + { + mergeBackupDrPlanConfig(other.getBackupDrPlanConfig()); + break; + } + case BACKUP_DR_TEMPLATE_CONFIG: + { + mergeBackupDrTemplateConfig(other.getBackupDrTemplateConfig()); + break; + } + case PLANSPECIFICCONFIG_NOT_SET: + { + break; + } + } + 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: + { + backupConfigSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + backupConfigSourceDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 24 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetPitrSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetLatestSuccessfulBackupTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 58: + { + applicableResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 58 + case 66: + { + backupVault_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 66 + case 82: + { + input.readMessage( + internalGetBackupDrPlanConfigFieldBuilder().getBuilder(), extensionRegistry); + planSpecificConfigCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetBackupDrTemplateConfigFieldBuilder().getBuilder(), + extensionRegistry); + planSpecificConfigCase_ = 11; + break; + } // case 90 + case 98: + { + com.google.cloud.backupdr.v1beta.BackupLocation m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupLocation.parser(), + extensionRegistry); + if (backupLocationsBuilder_ == null) { + ensureBackupLocationsIsMutable(); + backupLocations_.add(m); + } else { + backupLocationsBuilder_.addMessage(m); + } + break; + } // case 98 + 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 planSpecificConfigCase_ = 0; + private java.lang.Object planSpecificConfig_; + + public PlanSpecificConfigCase getPlanSpecificConfigCase() { + return PlanSpecificConfigCase.forNumber(planSpecificConfigCase_); + } + + public Builder clearPlanSpecificConfig() { + planSpecificConfigCase_ = 0; + planSpecificConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig, + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupDrPlanConfigOrBuilder> + backupDrPlanConfigBuilder_; + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + * + * @return Whether the backupDrPlanConfig field is set. + */ + @java.lang.Override + public boolean hasBackupDrPlanConfig() { + return planSpecificConfigCase_ == 10; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + * + * @return The backupDrPlanConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanConfig getBackupDrPlanConfig() { + if (backupDrPlanConfigBuilder_ == null) { + if (planSpecificConfigCase_ == 10) { + return (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) planSpecificConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance(); + } else { + if (planSpecificConfigCase_ == 10) { + return backupDrPlanConfigBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + public Builder setBackupDrPlanConfig( + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig value) { + if (backupDrPlanConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + planSpecificConfig_ = value; + onChanged(); + } else { + backupDrPlanConfigBuilder_.setMessage(value); + } + planSpecificConfigCase_ = 10; + return this; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + public Builder setBackupDrPlanConfig( + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.Builder builderForValue) { + if (backupDrPlanConfigBuilder_ == null) { + planSpecificConfig_ = builderForValue.build(); + onChanged(); + } else { + backupDrPlanConfigBuilder_.setMessage(builderForValue.build()); + } + planSpecificConfigCase_ = 10; + return this; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + public Builder mergeBackupDrPlanConfig( + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig value) { + if (backupDrPlanConfigBuilder_ == null) { + if (planSpecificConfigCase_ == 10 + && planSpecificConfig_ + != com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance()) { + planSpecificConfig_ = + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.newBuilder( + (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) planSpecificConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + planSpecificConfig_ = value; + } + onChanged(); + } else { + if (planSpecificConfigCase_ == 10) { + backupDrPlanConfigBuilder_.mergeFrom(value); + } else { + backupDrPlanConfigBuilder_.setMessage(value); + } + } + planSpecificConfigCase_ = 10; + return this; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + public Builder clearBackupDrPlanConfig() { + if (backupDrPlanConfigBuilder_ == null) { + if (planSpecificConfigCase_ == 10) { + planSpecificConfigCase_ = 0; + planSpecificConfig_ = null; + onChanged(); + } + } else { + if (planSpecificConfigCase_ == 10) { + planSpecificConfigCase_ = 0; + planSpecificConfig_ = null; + } + backupDrPlanConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + public com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.Builder + getBackupDrPlanConfigBuilder() { + return internalGetBackupDrPlanConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanConfigOrBuilder + getBackupDrPlanConfigOrBuilder() { + if ((planSpecificConfigCase_ == 10) && (backupDrPlanConfigBuilder_ != null)) { + return backupDrPlanConfigBuilder_.getMessageOrBuilder(); + } else { + if (planSpecificConfigCase_ == 10) { + return (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) planSpecificConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Backup Plan specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig, + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupDrPlanConfigOrBuilder> + internalGetBackupDrPlanConfigFieldBuilder() { + if (backupDrPlanConfigBuilder_ == null) { + if (!(planSpecificConfigCase_ == 10)) { + planSpecificConfig_ = + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance(); + } + backupDrPlanConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig, + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupDrPlanConfigOrBuilder>( + (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) planSpecificConfig_, + getParentForChildren(), + isClean()); + planSpecificConfig_ = null; + } + planSpecificConfigCase_ = 10; + onChanged(); + return backupDrPlanConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig, + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfigOrBuilder> + backupDrTemplateConfigBuilder_; + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + * + * @return Whether the backupDrTemplateConfig field is set. + */ + @java.lang.Override + public boolean hasBackupDrTemplateConfig() { + return planSpecificConfigCase_ == 11; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + * + * @return The backupDrTemplateConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig getBackupDrTemplateConfig() { + if (backupDrTemplateConfigBuilder_ == null) { + if (planSpecificConfigCase_ == 11) { + return (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) planSpecificConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance(); + } else { + if (planSpecificConfigCase_ == 11) { + return backupDrTemplateConfigBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + public Builder setBackupDrTemplateConfig( + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig value) { + if (backupDrTemplateConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + planSpecificConfig_ = value; + onChanged(); + } else { + backupDrTemplateConfigBuilder_.setMessage(value); + } + planSpecificConfigCase_ = 11; + return this; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + public Builder setBackupDrTemplateConfig( + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.Builder builderForValue) { + if (backupDrTemplateConfigBuilder_ == null) { + planSpecificConfig_ = builderForValue.build(); + onChanged(); + } else { + backupDrTemplateConfigBuilder_.setMessage(builderForValue.build()); + } + planSpecificConfigCase_ = 11; + return this; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + public Builder mergeBackupDrTemplateConfig( + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig value) { + if (backupDrTemplateConfigBuilder_ == null) { + if (planSpecificConfigCase_ == 11 + && planSpecificConfig_ + != com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance()) { + planSpecificConfig_ = + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.newBuilder( + (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) planSpecificConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + planSpecificConfig_ = value; + } + onChanged(); + } else { + if (planSpecificConfigCase_ == 11) { + backupDrTemplateConfigBuilder_.mergeFrom(value); + } else { + backupDrTemplateConfigBuilder_.setMessage(value); + } + } + planSpecificConfigCase_ = 11; + return this; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + public Builder clearBackupDrTemplateConfig() { + if (backupDrTemplateConfigBuilder_ == null) { + if (planSpecificConfigCase_ == 11) { + planSpecificConfigCase_ = 0; + planSpecificConfig_ = null; + onChanged(); + } + } else { + if (planSpecificConfigCase_ == 11) { + planSpecificConfigCase_ = 0; + planSpecificConfig_ = null; + } + backupDrTemplateConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + public com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.Builder + getBackupDrTemplateConfigBuilder() { + return internalGetBackupDrTemplateConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrTemplateConfigOrBuilder + getBackupDrTemplateConfigOrBuilder() { + if ((planSpecificConfigCase_ == 11) && (backupDrTemplateConfigBuilder_ != null)) { + return backupDrTemplateConfigBuilder_.getMessageOrBuilder(); + } else { + if (planSpecificConfigCase_ == 11) { + return (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) planSpecificConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Google Cloud Backup and DR's Template specific data.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig, + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfigOrBuilder> + internalGetBackupDrTemplateConfigFieldBuilder() { + if (backupDrTemplateConfigBuilder_ == null) { + if (!(planSpecificConfigCase_ == 11)) { + planSpecificConfig_ = + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance(); + } + backupDrTemplateConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig, + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfigOrBuilder>( + (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) planSpecificConfig_, + getParentForChildren(), + isClean()); + planSpecificConfig_ = null; + } + planSpecificConfigCase_ = 11; + onChanged(); + return backupDrTemplateConfigBuilder_; + } + + private java.lang.Object backupConfigSource_ = ""; + + /** + * + * + *
+     * Output only. The full resource name of the backup config source resource.
+     * For example,
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+     * or
+     * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+     * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupConfigSource. + */ + public java.lang.String getBackupConfigSource() { + java.lang.Object ref = backupConfigSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupConfigSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The full resource name of the backup config source resource.
+     * For example,
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+     * or
+     * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+     * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for backupConfigSource. + */ + public com.google.protobuf.ByteString getBackupConfigSourceBytes() { + java.lang.Object ref = backupConfigSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupConfigSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The full resource name of the backup config source resource.
+     * For example,
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+     * or
+     * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+     * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The backupConfigSource to set. + * @return This builder for chaining. + */ + public Builder setBackupConfigSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupConfigSource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The full resource name of the backup config source resource.
+     * For example,
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+     * or
+     * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+     * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBackupConfigSource() { + backupConfigSource_ = getDefaultInstance().getBackupConfigSource(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The full resource name of the backup config source resource.
+     * For example,
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+     * or
+     * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+     * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for backupConfigSource to set. + * @return This builder for chaining. + */ + public Builder setBackupConfigSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupConfigSource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object backupConfigSourceDisplayName_ = ""; + + /** + * + * + *
+     * Output only. The display name of the backup config source resource.
+     * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupConfigSourceDisplayName. + */ + public java.lang.String getBackupConfigSourceDisplayName() { + java.lang.Object ref = backupConfigSourceDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupConfigSourceDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the backup config source resource.
+     * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupConfigSourceDisplayName. + */ + public com.google.protobuf.ByteString getBackupConfigSourceDisplayNameBytes() { + java.lang.Object ref = backupConfigSourceDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupConfigSourceDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The display name of the backup config source resource.
+     * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backupConfigSourceDisplayName to set. + * @return This builder for chaining. + */ + public Builder setBackupConfigSourceDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupConfigSourceDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the backup config source resource.
+     * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupConfigSourceDisplayName() { + backupConfigSourceDisplayName_ = getDefaultInstance().getBackupConfigSourceDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The display name of the backup config source resource.
+     * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for backupConfigSourceDisplayName to set. + * @return This builder for chaining. + */ + public Builder setBackupConfigSourceDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupConfigSourceDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int type_ = 0; + + /** + * + * + *
+     * Output only. The type of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Output only. The type of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type getType() { + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type result = + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The type of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000010); + type_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The state of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.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 state of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetails.State getState() { + com.google.cloud.backupdr.v1beta.BackupConfigDetails.State result = + com.google.cloud.backupdr.v1beta.BackupConfigDetails.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigDetails.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The state of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.BackupConfigDetails.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the backup config resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.PitrSettings pitrSettings_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.PitrSettings, + com.google.cloud.backupdr.v1beta.PitrSettings.Builder, + com.google.cloud.backupdr.v1beta.PitrSettingsOrBuilder> + pitrSettingsBuilder_; + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pitrSettings field is set. + */ + public boolean hasPitrSettings() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pitrSettings. + */ + public com.google.cloud.backupdr.v1beta.PitrSettings getPitrSettings() { + if (pitrSettingsBuilder_ == null) { + return pitrSettings_ == null + ? com.google.cloud.backupdr.v1beta.PitrSettings.getDefaultInstance() + : pitrSettings_; + } else { + return pitrSettingsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPitrSettings(com.google.cloud.backupdr.v1beta.PitrSettings value) { + if (pitrSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pitrSettings_ = value; + } else { + pitrSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPitrSettings( + com.google.cloud.backupdr.v1beta.PitrSettings.Builder builderForValue) { + if (pitrSettingsBuilder_ == null) { + pitrSettings_ = builderForValue.build(); + } else { + pitrSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePitrSettings(com.google.cloud.backupdr.v1beta.PitrSettings value) { + if (pitrSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && pitrSettings_ != null + && pitrSettings_ + != com.google.cloud.backupdr.v1beta.PitrSettings.getDefaultInstance()) { + getPitrSettingsBuilder().mergeFrom(value); + } else { + pitrSettings_ = value; + } + } else { + pitrSettingsBuilder_.mergeFrom(value); + } + if (pitrSettings_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPitrSettings() { + bitField0_ = (bitField0_ & ~0x00000040); + pitrSettings_ = null; + if (pitrSettingsBuilder_ != null) { + pitrSettingsBuilder_.dispose(); + pitrSettingsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.PitrSettings.Builder getPitrSettingsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetPitrSettingsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.PitrSettingsOrBuilder getPitrSettingsOrBuilder() { + if (pitrSettingsBuilder_ != null) { + return pitrSettingsBuilder_.getMessageOrBuilder(); + } else { + return pitrSettings_ == null + ? com.google.cloud.backupdr.v1beta.PitrSettings.getDefaultInstance() + : pitrSettings_; + } + } + + /** + * + * + *
+     * Output only. Point in time recovery settings of the backup configuration
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.PitrSettings, + com.google.cloud.backupdr.v1beta.PitrSettings.Builder, + com.google.cloud.backupdr.v1beta.PitrSettingsOrBuilder> + internalGetPitrSettingsFieldBuilder() { + if (pitrSettingsBuilder_ == null) { + pitrSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.PitrSettings, + com.google.cloud.backupdr.v1beta.PitrSettings.Builder, + com.google.cloud.backupdr.v1beta.PitrSettingsOrBuilder>( + getPitrSettings(), getParentForChildren(), isClean()); + pitrSettings_ = null; + } + return pitrSettingsBuilder_; + } + + private com.google.protobuf.Timestamp latestSuccessfulBackupTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + latestSuccessfulBackupTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the latestSuccessfulBackupTime field is set. + */ + public boolean hasLatestSuccessfulBackupTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The latestSuccessfulBackupTime. + */ + public com.google.protobuf.Timestamp getLatestSuccessfulBackupTime() { + if (latestSuccessfulBackupTimeBuilder_ == null) { + return latestSuccessfulBackupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestSuccessfulBackupTime_; + } else { + return latestSuccessfulBackupTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLatestSuccessfulBackupTime(com.google.protobuf.Timestamp value) { + if (latestSuccessfulBackupTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latestSuccessfulBackupTime_ = value; + } else { + latestSuccessfulBackupTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLatestSuccessfulBackupTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (latestSuccessfulBackupTimeBuilder_ == null) { + latestSuccessfulBackupTime_ = builderForValue.build(); + } else { + latestSuccessfulBackupTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLatestSuccessfulBackupTime(com.google.protobuf.Timestamp value) { + if (latestSuccessfulBackupTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && latestSuccessfulBackupTime_ != null + && latestSuccessfulBackupTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLatestSuccessfulBackupTimeBuilder().mergeFrom(value); + } else { + latestSuccessfulBackupTime_ = value; + } + } else { + latestSuccessfulBackupTimeBuilder_.mergeFrom(value); + } + if (latestSuccessfulBackupTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLatestSuccessfulBackupTime() { + bitField0_ = (bitField0_ & ~0x00000080); + latestSuccessfulBackupTime_ = null; + if (latestSuccessfulBackupTimeBuilder_ != null) { + latestSuccessfulBackupTimeBuilder_.dispose(); + latestSuccessfulBackupTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLatestSuccessfulBackupTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetLatestSuccessfulBackupTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLatestSuccessfulBackupTimeOrBuilder() { + if (latestSuccessfulBackupTimeBuilder_ != null) { + return latestSuccessfulBackupTimeBuilder_.getMessageOrBuilder(); + } else { + return latestSuccessfulBackupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : latestSuccessfulBackupTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup configuration.
+     * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLatestSuccessfulBackupTimeFieldBuilder() { + if (latestSuccessfulBackupTimeBuilder_ == null) { + latestSuccessfulBackupTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLatestSuccessfulBackupTime(), getParentForChildren(), isClean()); + latestSuccessfulBackupTime_ = null; + } + return latestSuccessfulBackupTimeBuilder_; + } + + private java.lang.Object applicableResource_ = ""; + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource that is applicable for the backup configuration. Example:
+     * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+     * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The applicableResource. + */ + public java.lang.String getApplicableResource() { + java.lang.Object ref = applicableResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicableResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource that is applicable for the backup configuration. Example:
+     * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+     * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for applicableResource. + */ + public com.google.protobuf.ByteString getApplicableResourceBytes() { + java.lang.Object ref = applicableResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicableResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource that is applicable for the backup configuration. Example:
+     * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+     * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The applicableResource to set. + * @return This builder for chaining. + */ + public Builder setApplicableResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicableResource_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource that is applicable for the backup configuration. Example:
+     * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+     * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApplicableResource() { + applicableResource_ = getDefaultInstance().getApplicableResource(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource that is applicable for the backup configuration. Example:
+     * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+     * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for applicableResource to set. + * @return This builder for chaining. + */ + public Builder setApplicableResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicableResource_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object backupVault_ = ""; + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the backup vault that will store the backups generated through this
+     * backup configuration. Example:
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+     * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the backup vault that will store the backups generated through this
+     * backup configuration. Example:
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+     * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the backup vault that will store the backups generated through this
+     * backup configuration. Example:
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+     * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the backup vault that will store the backups generated through this
+     * backup configuration. Example:
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+     * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBackupVault() { + backupVault_ = getDefaultInstance().getBackupVault(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the backup vault that will store the backups generated through this
+     * backup configuration. Example:
+     * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+     * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000200; + onChanged(); + return this; + } + + private java.util.List backupLocations_ = + java.util.Collections.emptyList(); + + private void ensureBackupLocationsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + backupLocations_ = + new java.util.ArrayList( + backupLocations_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLocation, + com.google.cloud.backupdr.v1beta.BackupLocation.Builder, + com.google.cloud.backupdr.v1beta.BackupLocationOrBuilder> + backupLocationsBuilder_; + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public java.util.List + getBackupLocationsList() { + if (backupLocationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupLocations_); + } else { + return backupLocationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public int getBackupLocationsCount() { + if (backupLocationsBuilder_ == null) { + return backupLocations_.size(); + } else { + return backupLocationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public com.google.cloud.backupdr.v1beta.BackupLocation getBackupLocations(int index) { + if (backupLocationsBuilder_ == null) { + return backupLocations_.get(index); + } else { + return backupLocationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder setBackupLocations( + int index, com.google.cloud.backupdr.v1beta.BackupLocation value) { + if (backupLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupLocationsIsMutable(); + backupLocations_.set(index, value); + onChanged(); + } else { + backupLocationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder setBackupLocations( + int index, com.google.cloud.backupdr.v1beta.BackupLocation.Builder builderForValue) { + if (backupLocationsBuilder_ == null) { + ensureBackupLocationsIsMutable(); + backupLocations_.set(index, builderForValue.build()); + onChanged(); + } else { + backupLocationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder addBackupLocations(com.google.cloud.backupdr.v1beta.BackupLocation value) { + if (backupLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupLocationsIsMutable(); + backupLocations_.add(value); + onChanged(); + } else { + backupLocationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder addBackupLocations( + int index, com.google.cloud.backupdr.v1beta.BackupLocation value) { + if (backupLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupLocationsIsMutable(); + backupLocations_.add(index, value); + onChanged(); + } else { + backupLocationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder addBackupLocations( + com.google.cloud.backupdr.v1beta.BackupLocation.Builder builderForValue) { + if (backupLocationsBuilder_ == null) { + ensureBackupLocationsIsMutable(); + backupLocations_.add(builderForValue.build()); + onChanged(); + } else { + backupLocationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder addBackupLocations( + int index, com.google.cloud.backupdr.v1beta.BackupLocation.Builder builderForValue) { + if (backupLocationsBuilder_ == null) { + ensureBackupLocationsIsMutable(); + backupLocations_.add(index, builderForValue.build()); + onChanged(); + } else { + backupLocationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder addAllBackupLocations( + java.lang.Iterable values) { + if (backupLocationsBuilder_ == null) { + ensureBackupLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupLocations_); + onChanged(); + } else { + backupLocationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder clearBackupLocations() { + if (backupLocationsBuilder_ == null) { + backupLocations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + backupLocationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public Builder removeBackupLocations(int index) { + if (backupLocationsBuilder_ == null) { + ensureBackupLocationsIsMutable(); + backupLocations_.remove(index); + onChanged(); + } else { + backupLocationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public com.google.cloud.backupdr.v1beta.BackupLocation.Builder getBackupLocationsBuilder( + int index) { + return internalGetBackupLocationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public com.google.cloud.backupdr.v1beta.BackupLocationOrBuilder getBackupLocationsOrBuilder( + int index) { + if (backupLocationsBuilder_ == null) { + return backupLocations_.get(index); + } else { + return backupLocationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public java.util.List + getBackupLocationsOrBuilderList() { + if (backupLocationsBuilder_ != null) { + return backupLocationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupLocations_); + } + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public com.google.cloud.backupdr.v1beta.BackupLocation.Builder addBackupLocationsBuilder() { + return internalGetBackupLocationsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupLocation.getDefaultInstance()); + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public com.google.cloud.backupdr.v1beta.BackupLocation.Builder addBackupLocationsBuilder( + int index) { + return internalGetBackupLocationsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.BackupLocation.getDefaultInstance()); + } + + /** + * + * + *
+     * The locations where the backups are to be stored.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + public java.util.List + getBackupLocationsBuilderList() { + return internalGetBackupLocationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLocation, + com.google.cloud.backupdr.v1beta.BackupLocation.Builder, + com.google.cloud.backupdr.v1beta.BackupLocationOrBuilder> + internalGetBackupLocationsFieldBuilder() { + if (backupLocationsBuilder_ == null) { + backupLocationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupLocation, + com.google.cloud.backupdr.v1beta.BackupLocation.Builder, + com.google.cloud.backupdr.v1beta.BackupLocationOrBuilder>( + backupLocations_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + backupLocations_ = null; + } + return backupLocationsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupConfigDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupConfigDetails) + private static final com.google.cloud.backupdr.v1beta.BackupConfigDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupConfigDetails(); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupConfigDetails 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.backupdr.v1beta.BackupConfigDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigDetailsOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigDetailsOrBuilder.java new file mode 100644 index 000000000000..c4947965bfc2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigDetailsOrBuilder.java @@ -0,0 +1,447 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupConfigDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupConfigDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Google Cloud Backup and DR's Backup Plan specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + * + * @return Whether the backupDrPlanConfig field is set. + */ + boolean hasBackupDrPlanConfig(); + + /** + * + * + *
+   * Google Cloud Backup and DR's Backup Plan specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + * + * @return The backupDrPlanConfig. + */ + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig getBackupDrPlanConfig(); + + /** + * + * + *
+   * Google Cloud Backup and DR's Backup Plan specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrPlanConfig backup_dr_plan_config = 10; + */ + com.google.cloud.backupdr.v1beta.BackupDrPlanConfigOrBuilder getBackupDrPlanConfigOrBuilder(); + + /** + * + * + *
+   * Google Cloud Backup and DR's Template specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + * + * @return Whether the backupDrTemplateConfig field is set. + */ + boolean hasBackupDrTemplateConfig(); + + /** + * + * + *
+   * Google Cloud Backup and DR's Template specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + * + * @return The backupDrTemplateConfig. + */ + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig getBackupDrTemplateConfig(); + + /** + * + * + *
+   * Google Cloud Backup and DR's Template specific data.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupDrTemplateConfig backup_dr_template_config = 11; + * + */ + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfigOrBuilder + getBackupDrTemplateConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The full resource name of the backup config source resource.
+   * For example,
+   * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+   * or
+   * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+   * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupConfigSource. + */ + java.lang.String getBackupConfigSource(); + + /** + * + * + *
+   * Output only. The full resource name of the backup config source resource.
+   * For example,
+   * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}"
+   * or
+   * "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}".
+   * 
+ * + * string backup_config_source = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for backupConfigSource. + */ + com.google.protobuf.ByteString getBackupConfigSourceBytes(); + + /** + * + * + *
+   * Output only. The display name of the backup config source resource.
+   * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupConfigSourceDisplayName. + */ + java.lang.String getBackupConfigSourceDisplayName(); + + /** + * + * + *
+   * Output only. The display name of the backup config source resource.
+   * 
+ * + * + * string backup_config_source_display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupConfigSourceDisplayName. + */ + com.google.protobuf.ByteString getBackupConfigSourceDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The type of the backup config resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Output only. The type of the backup config resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.Type type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Type getType(); + + /** + * + * + *
+   * Output only. The state of the backup config resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The state of the backup config resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.BackupConfigDetails.State getState(); + + /** + * + * + *
+   * Output only. Point in time recovery settings of the backup configuration
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the pitrSettings field is set. + */ + boolean hasPitrSettings(); + + /** + * + * + *
+   * Output only. Point in time recovery settings of the backup configuration
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pitrSettings. + */ + com.google.cloud.backupdr.v1beta.PitrSettings getPitrSettings(); + + /** + * + * + *
+   * Output only. Point in time recovery settings of the backup configuration
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.PitrSettings pitr_settings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.PitrSettingsOrBuilder getPitrSettingsOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup configuration.
+   * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the latestSuccessfulBackupTime field is set. + */ + boolean hasLatestSuccessfulBackupTime(); + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup configuration.
+   * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The latestSuccessfulBackupTime. + */ + com.google.protobuf.Timestamp getLatestSuccessfulBackupTime(); + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup configuration.
+   * 
+ * + * + * .google.protobuf.Timestamp latest_successful_backup_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLatestSuccessfulBackupTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource that is applicable for the backup configuration. Example:
+   * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+   * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The applicableResource. + */ + java.lang.String getApplicableResource(); + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource that is applicable for the backup configuration. Example:
+   * "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}"
+   * 
+ * + * string applicable_resource = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for applicableResource. + */ + com.google.protobuf.ByteString getApplicableResourceBytes(); + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the backup vault that will store the backups generated through this
+   * backup configuration. Example:
+   * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+   * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupVault. + */ + java.lang.String getBackupVault(); + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the backup vault that will store the backups generated through this
+   * backup configuration. Example:
+   * "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}"
+   * 
+ * + * string backup_vault = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for backupVault. + */ + com.google.protobuf.ByteString getBackupVaultBytes(); + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + java.util.List getBackupLocationsList(); + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + com.google.cloud.backupdr.v1beta.BackupLocation getBackupLocations(int index); + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + int getBackupLocationsCount(); + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + java.util.List + getBackupLocationsOrBuilderList(); + + /** + * + * + *
+   * The locations where the backups are to be stored.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupLocation backup_locations = 12; + */ + com.google.cloud.backupdr.v1beta.BackupLocationOrBuilder getBackupLocationsOrBuilder(int index); + + com.google.cloud.backupdr.v1beta.BackupConfigDetails.PlanSpecificConfigCase + getPlanSpecificConfigCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigInfo.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigInfo.java new file mode 100644 index 000000000000..2a4af6313af4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigInfo.java @@ -0,0 +1,2173 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupConfigInfo has information about how the resource is configured
+ * for Backup and about the most recent backup to this vault.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupConfigInfo} + */ +@com.google.protobuf.Generated +public final class BackupConfigInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupConfigInfo) + BackupConfigInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupConfigInfo"); + } + + // Use BackupConfigInfo.newBuilder() to construct. + private BackupConfigInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupConfigInfo() { + lastBackupState_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupConfigInfo.class, + com.google.cloud.backupdr.v1beta.BackupConfigInfo.Builder.class); + } + + /** + * + * + *
+   * LastBackupstate tracks whether the last backup was not yet started,
+   * successful, failed, or could not be run because of the lack of permissions.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState} + */ + public enum LastBackupState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Status not set.
+     * 
+ * + * LAST_BACKUP_STATE_UNSPECIFIED = 0; + */ + LAST_BACKUP_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The first backup has not yet completed
+     * 
+ * + * FIRST_BACKUP_PENDING = 1; + */ + FIRST_BACKUP_PENDING(1), + /** + * + * + *
+     * The most recent backup was successful
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + * + * + *
+     * The most recent backup failed
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + * + * + *
+     * The most recent backup could not be run/failed because of the lack of
+     * permissions
+     * 
+ * + * PERMISSION_DENIED = 4; + */ + PERMISSION_DENIED(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "LastBackupState"); + } + + /** + * + * + *
+     * Status not set.
+     * 
+ * + * LAST_BACKUP_STATE_UNSPECIFIED = 0; + */ + public static final int LAST_BACKUP_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The first backup has not yet completed
+     * 
+ * + * FIRST_BACKUP_PENDING = 1; + */ + public static final int FIRST_BACKUP_PENDING_VALUE = 1; + + /** + * + * + *
+     * The most recent backup was successful
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + + /** + * + * + *
+     * The most recent backup failed
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + + /** + * + * + *
+     * The most recent backup could not be run/failed because of the lack of
+     * permissions
+     * 
+ * + * PERMISSION_DENIED = 4; + */ + public static final int PERMISSION_DENIED_VALUE = 4; + + 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 LastBackupState 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 LastBackupState forNumber(int value) { + switch (value) { + case 0: + return LAST_BACKUP_STATE_UNSPECIFIED; + case 1: + return FIRST_BACKUP_PENDING; + case 2: + return SUCCEEDED; + case 3: + return FAILED; + case 4: + return PERMISSION_DENIED; + 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 LastBackupState findValueByNumber(int number) { + return LastBackupState.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupConfigInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LastBackupState[] VALUES = values(); + + public static LastBackupState 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 LastBackupState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState) + } + + private int bitField0_; + private int backupConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object backupConfig_; + + public enum BackupConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCP_BACKUP_CONFIG(4), + BACKUP_APPLIANCE_BACKUP_CONFIG(5), + BACKUPCONFIG_NOT_SET(0); + private final int value; + + private BackupConfigCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BackupConfigCase valueOf(int value) { + return forNumber(value); + } + + public static BackupConfigCase forNumber(int value) { + switch (value) { + case 4: + return GCP_BACKUP_CONFIG; + case 5: + return BACKUP_APPLIANCE_BACKUP_CONFIG; + case 0: + return BACKUPCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BackupConfigCase getBackupConfigCase() { + return BackupConfigCase.forNumber(backupConfigCase_); + } + + public static final int GCP_BACKUP_CONFIG_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Configuration for a Google Cloud resource.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + * + * @return Whether the gcpBackupConfig field is set. + */ + @java.lang.Override + public boolean hasGcpBackupConfig() { + return backupConfigCase_ == 4; + } + + /** + * + * + *
+   * Configuration for a Google Cloud resource.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + * + * @return The gcpBackupConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpBackupConfig getGcpBackupConfig() { + if (backupConfigCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.GcpBackupConfig) backupConfig_; + } + return com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Configuration for a Google Cloud resource.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpBackupConfigOrBuilder getGcpBackupConfigOrBuilder() { + if (backupConfigCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.GcpBackupConfig) backupConfig_; + } + return com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance(); + } + + public static final int BACKUP_APPLIANCE_BACKUP_CONFIG_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Configuration for an application backed up by a Backup Appliance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + * + * @return Whether the backupApplianceBackupConfig field is set. + */ + @java.lang.Override + public boolean hasBackupApplianceBackupConfig() { + return backupConfigCase_ == 5; + } + + /** + * + * + *
+   * Configuration for an application backed up by a Backup Appliance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + * + * @return The backupApplianceBackupConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig + getBackupApplianceBackupConfig() { + if (backupConfigCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) backupConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Configuration for an application backed up by a Backup Appliance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfigOrBuilder + getBackupApplianceBackupConfigOrBuilder() { + if (backupConfigCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) backupConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.getDefaultInstance(); + } + + public static final int LAST_BACKUP_STATE_FIELD_NUMBER = 1; + private int lastBackupState_ = 0; + + /** + * + * + *
+   * Output only. The status of the last backup to this BackupVault
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + @java.lang.Override + public int getLastBackupStateValue() { + return lastBackupState_; + } + + /** + * + * + *
+   * Output only. The status of the last backup to this BackupVault
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState getLastBackupState() { + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState result = + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState.forNumber( + lastBackupState_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState.UNRECOGNIZED + : result; + } + + public static final int LAST_SUCCESSFUL_BACKUP_CONSISTENCY_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp lastSuccessfulBackupConsistencyTime_; + + /** + * + * + *
+   * Output only. If the last backup were successful, this field has the
+   * consistency date.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + @java.lang.Override + public boolean hasLastSuccessfulBackupConsistencyTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. If the last backup were successful, this field has the
+   * consistency date.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime() { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + + /** + * + * + *
+   * Output only. If the last backup were successful, this field has the
+   * consistency date.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupConsistencyTimeOrBuilder() { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + + public static final int LAST_BACKUP_ERROR_FIELD_NUMBER = 3; + private com.google.rpc.Status lastBackupError_; + + /** + * + * + *
+   * Output only. If the last backup failed, this field has the error message.
+   * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastBackupError field is set. + */ + @java.lang.Override + public boolean hasLastBackupError() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. If the last backup failed, this field has the error message.
+   * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupError. + */ + @java.lang.Override + public com.google.rpc.Status getLastBackupError() { + return lastBackupError_ == null ? com.google.rpc.Status.getDefaultInstance() : lastBackupError_; + } + + /** + * + * + *
+   * Output only. If the last backup failed, this field has the error message.
+   * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getLastBackupErrorOrBuilder() { + return lastBackupError_ == null ? com.google.rpc.Status.getDefaultInstance() : lastBackupError_; + } + + 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 (lastBackupState_ + != com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState + .LAST_BACKUP_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, lastBackupState_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLastSuccessfulBackupConsistencyTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getLastBackupError()); + } + if (backupConfigCase_ == 4) { + output.writeMessage(4, (com.google.cloud.backupdr.v1beta.GcpBackupConfig) backupConfig_); + } + if (backupConfigCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) backupConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lastBackupState_ + != com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState + .LAST_BACKUP_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, lastBackupState_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getLastSuccessfulBackupConsistencyTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLastBackupError()); + } + if (backupConfigCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.backupdr.v1beta.GcpBackupConfig) backupConfig_); + } + if (backupConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) backupConfig_); + } + 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.backupdr.v1beta.BackupConfigInfo)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupConfigInfo other = + (com.google.cloud.backupdr.v1beta.BackupConfigInfo) obj; + + if (lastBackupState_ != other.lastBackupState_) return false; + if (hasLastSuccessfulBackupConsistencyTime() != other.hasLastSuccessfulBackupConsistencyTime()) + return false; + if (hasLastSuccessfulBackupConsistencyTime()) { + if (!getLastSuccessfulBackupConsistencyTime() + .equals(other.getLastSuccessfulBackupConsistencyTime())) return false; + } + if (hasLastBackupError() != other.hasLastBackupError()) return false; + if (hasLastBackupError()) { + if (!getLastBackupError().equals(other.getLastBackupError())) return false; + } + if (!getBackupConfigCase().equals(other.getBackupConfigCase())) return false; + switch (backupConfigCase_) { + case 4: + if (!getGcpBackupConfig().equals(other.getGcpBackupConfig())) return false; + break; + case 5: + if (!getBackupApplianceBackupConfig().equals(other.getBackupApplianceBackupConfig())) + return false; + break; + case 0: + default: + } + 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) + LAST_BACKUP_STATE_FIELD_NUMBER; + hash = (53 * hash) + lastBackupState_; + if (hasLastSuccessfulBackupConsistencyTime()) { + hash = (37 * hash) + LAST_SUCCESSFUL_BACKUP_CONSISTENCY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastSuccessfulBackupConsistencyTime().hashCode(); + } + if (hasLastBackupError()) { + hash = (37 * hash) + LAST_BACKUP_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getLastBackupError().hashCode(); + } + switch (backupConfigCase_) { + case 4: + hash = (37 * hash) + GCP_BACKUP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGcpBackupConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + BACKUP_APPLIANCE_BACKUP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBackupApplianceBackupConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo 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.backupdr.v1beta.BackupConfigInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo 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.backupdr.v1beta.BackupConfigInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupConfigInfo 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupConfigInfo has information about how the resource is configured
+   * for Backup and about the most recent backup to this vault.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupConfigInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupConfigInfo) + com.google.cloud.backupdr.v1beta.BackupConfigInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupConfigInfo.class, + com.google.cloud.backupdr.v1beta.BackupConfigInfo.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupConfigInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder(); + internalGetLastBackupErrorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gcpBackupConfigBuilder_ != null) { + gcpBackupConfigBuilder_.clear(); + } + if (backupApplianceBackupConfigBuilder_ != null) { + backupApplianceBackupConfigBuilder_.clear(); + } + lastBackupState_ = 0; + lastSuccessfulBackupConsistencyTime_ = null; + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + lastSuccessfulBackupConsistencyTimeBuilder_.dispose(); + lastSuccessfulBackupConsistencyTimeBuilder_ = null; + } + lastBackupError_ = null; + if (lastBackupErrorBuilder_ != null) { + lastBackupErrorBuilder_.dispose(); + lastBackupErrorBuilder_ = null; + } + backupConfigCase_ = 0; + backupConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfo getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupConfigInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfo build() { + com.google.cloud.backupdr.v1beta.BackupConfigInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfo buildPartial() { + com.google.cloud.backupdr.v1beta.BackupConfigInfo result = + new com.google.cloud.backupdr.v1beta.BackupConfigInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupConfigInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lastBackupState_ = lastBackupState_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastSuccessfulBackupConsistencyTime_ = + lastSuccessfulBackupConsistencyTimeBuilder_ == null + ? lastSuccessfulBackupConsistencyTime_ + : lastSuccessfulBackupConsistencyTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.lastBackupError_ = + lastBackupErrorBuilder_ == null ? lastBackupError_ : lastBackupErrorBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.BackupConfigInfo result) { + result.backupConfigCase_ = backupConfigCase_; + result.backupConfig_ = this.backupConfig_; + if (backupConfigCase_ == 4 && gcpBackupConfigBuilder_ != null) { + result.backupConfig_ = gcpBackupConfigBuilder_.build(); + } + if (backupConfigCase_ == 5 && backupApplianceBackupConfigBuilder_ != null) { + result.backupConfig_ = backupApplianceBackupConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupConfigInfo) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupConfigInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupConfigInfo other) { + if (other == com.google.cloud.backupdr.v1beta.BackupConfigInfo.getDefaultInstance()) + return this; + if (other.lastBackupState_ != 0) { + setLastBackupStateValue(other.getLastBackupStateValue()); + } + if (other.hasLastSuccessfulBackupConsistencyTime()) { + mergeLastSuccessfulBackupConsistencyTime(other.getLastSuccessfulBackupConsistencyTime()); + } + if (other.hasLastBackupError()) { + mergeLastBackupError(other.getLastBackupError()); + } + switch (other.getBackupConfigCase()) { + case GCP_BACKUP_CONFIG: + { + mergeGcpBackupConfig(other.getGcpBackupConfig()); + break; + } + case BACKUP_APPLIANCE_BACKUP_CONFIG: + { + mergeBackupApplianceBackupConfig(other.getBackupApplianceBackupConfig()); + break; + } + case BACKUPCONFIG_NOT_SET: + { + break; + } + } + 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 8: + { + lastBackupState_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLastBackupErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetGcpBackupConfigFieldBuilder().getBuilder(), extensionRegistry); + backupConfigCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetBackupApplianceBackupConfigFieldBuilder().getBuilder(), + extensionRegistry); + backupConfigCase_ = 5; + 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 backupConfigCase_ = 0; + private java.lang.Object backupConfig_; + + public BackupConfigCase getBackupConfigCase() { + return BackupConfigCase.forNumber(backupConfigCase_); + } + + public Builder clearBackupConfig() { + backupConfigCase_ = 0; + backupConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.GcpBackupConfig, + com.google.cloud.backupdr.v1beta.GcpBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.GcpBackupConfigOrBuilder> + gcpBackupConfigBuilder_; + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + * + * @return Whether the gcpBackupConfig field is set. + */ + @java.lang.Override + public boolean hasGcpBackupConfig() { + return backupConfigCase_ == 4; + } + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + * + * @return The gcpBackupConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpBackupConfig getGcpBackupConfig() { + if (gcpBackupConfigBuilder_ == null) { + if (backupConfigCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.GcpBackupConfig) backupConfig_; + } + return com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance(); + } else { + if (backupConfigCase_ == 4) { + return gcpBackupConfigBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + public Builder setGcpBackupConfig(com.google.cloud.backupdr.v1beta.GcpBackupConfig value) { + if (gcpBackupConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupConfig_ = value; + onChanged(); + } else { + gcpBackupConfigBuilder_.setMessage(value); + } + backupConfigCase_ = 4; + return this; + } + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + public Builder setGcpBackupConfig( + com.google.cloud.backupdr.v1beta.GcpBackupConfig.Builder builderForValue) { + if (gcpBackupConfigBuilder_ == null) { + backupConfig_ = builderForValue.build(); + onChanged(); + } else { + gcpBackupConfigBuilder_.setMessage(builderForValue.build()); + } + backupConfigCase_ = 4; + return this; + } + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + public Builder mergeGcpBackupConfig(com.google.cloud.backupdr.v1beta.GcpBackupConfig value) { + if (gcpBackupConfigBuilder_ == null) { + if (backupConfigCase_ == 4 + && backupConfig_ + != com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance()) { + backupConfig_ = + com.google.cloud.backupdr.v1beta.GcpBackupConfig.newBuilder( + (com.google.cloud.backupdr.v1beta.GcpBackupConfig) backupConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + backupConfig_ = value; + } + onChanged(); + } else { + if (backupConfigCase_ == 4) { + gcpBackupConfigBuilder_.mergeFrom(value); + } else { + gcpBackupConfigBuilder_.setMessage(value); + } + } + backupConfigCase_ = 4; + return this; + } + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + public Builder clearGcpBackupConfig() { + if (gcpBackupConfigBuilder_ == null) { + if (backupConfigCase_ == 4) { + backupConfigCase_ = 0; + backupConfig_ = null; + onChanged(); + } + } else { + if (backupConfigCase_ == 4) { + backupConfigCase_ = 0; + backupConfig_ = null; + } + gcpBackupConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + public com.google.cloud.backupdr.v1beta.GcpBackupConfig.Builder getGcpBackupConfigBuilder() { + return internalGetGcpBackupConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpBackupConfigOrBuilder getGcpBackupConfigOrBuilder() { + if ((backupConfigCase_ == 4) && (gcpBackupConfigBuilder_ != null)) { + return gcpBackupConfigBuilder_.getMessageOrBuilder(); + } else { + if (backupConfigCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.GcpBackupConfig) backupConfig_; + } + return com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for a Google Cloud resource.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.GcpBackupConfig, + com.google.cloud.backupdr.v1beta.GcpBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.GcpBackupConfigOrBuilder> + internalGetGcpBackupConfigFieldBuilder() { + if (gcpBackupConfigBuilder_ == null) { + if (!(backupConfigCase_ == 4)) { + backupConfig_ = com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance(); + } + gcpBackupConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.GcpBackupConfig, + com.google.cloud.backupdr.v1beta.GcpBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.GcpBackupConfigOrBuilder>( + (com.google.cloud.backupdr.v1beta.GcpBackupConfig) backupConfig_, + getParentForChildren(), + isClean()); + backupConfig_ = null; + } + backupConfigCase_ = 4; + onChanged(); + return gcpBackupConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfigOrBuilder> + backupApplianceBackupConfigBuilder_; + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + * + * @return Whether the backupApplianceBackupConfig field is set. + */ + @java.lang.Override + public boolean hasBackupApplianceBackupConfig() { + return backupConfigCase_ == 5; + } + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + * + * @return The backupApplianceBackupConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig + getBackupApplianceBackupConfig() { + if (backupApplianceBackupConfigBuilder_ == null) { + if (backupConfigCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) backupConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.getDefaultInstance(); + } else { + if (backupConfigCase_ == 5) { + return backupApplianceBackupConfigBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + public Builder setBackupApplianceBackupConfig( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig value) { + if (backupApplianceBackupConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupConfig_ = value; + onChanged(); + } else { + backupApplianceBackupConfigBuilder_.setMessage(value); + } + backupConfigCase_ = 5; + return this; + } + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + public Builder setBackupApplianceBackupConfig( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.Builder builderForValue) { + if (backupApplianceBackupConfigBuilder_ == null) { + backupConfig_ = builderForValue.build(); + onChanged(); + } else { + backupApplianceBackupConfigBuilder_.setMessage(builderForValue.build()); + } + backupConfigCase_ = 5; + return this; + } + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + public Builder mergeBackupApplianceBackupConfig( + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig value) { + if (backupApplianceBackupConfigBuilder_ == null) { + if (backupConfigCase_ == 5 + && backupConfig_ + != com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig + .getDefaultInstance()) { + backupConfig_ = + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.newBuilder( + (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) backupConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + backupConfig_ = value; + } + onChanged(); + } else { + if (backupConfigCase_ == 5) { + backupApplianceBackupConfigBuilder_.mergeFrom(value); + } else { + backupApplianceBackupConfigBuilder_.setMessage(value); + } + } + backupConfigCase_ = 5; + return this; + } + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + public Builder clearBackupApplianceBackupConfig() { + if (backupApplianceBackupConfigBuilder_ == null) { + if (backupConfigCase_ == 5) { + backupConfigCase_ = 0; + backupConfig_ = null; + onChanged(); + } + } else { + if (backupConfigCase_ == 5) { + backupConfigCase_ = 0; + backupConfig_ = null; + } + backupApplianceBackupConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.Builder + getBackupApplianceBackupConfigBuilder() { + return internalGetBackupApplianceBackupConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfigOrBuilder + getBackupApplianceBackupConfigOrBuilder() { + if ((backupConfigCase_ == 5) && (backupApplianceBackupConfigBuilder_ != null)) { + return backupApplianceBackupConfigBuilder_.getMessageOrBuilder(); + } else { + if (backupConfigCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) backupConfig_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for an application backed up by a Backup Appliance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfigOrBuilder> + internalGetBackupApplianceBackupConfigFieldBuilder() { + if (backupApplianceBackupConfigBuilder_ == null) { + if (!(backupConfigCase_ == 5)) { + backupConfig_ = + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.getDefaultInstance(); + } + backupApplianceBackupConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfigOrBuilder>( + (com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig) backupConfig_, + getParentForChildren(), + isClean()); + backupConfig_ = null; + } + backupConfigCase_ = 5; + onChanged(); + return backupApplianceBackupConfigBuilder_; + } + + private int lastBackupState_ = 0; + + /** + * + * + *
+     * Output only. The status of the last backup to this BackupVault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + @java.lang.Override + public int getLastBackupStateValue() { + return lastBackupState_; + } + + /** + * + * + *
+     * Output only. The status of the last backup to this BackupVault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lastBackupState to set. + * @return This builder for chaining. + */ + public Builder setLastBackupStateValue(int value) { + lastBackupState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of the last backup to this BackupVault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState getLastBackupState() { + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState result = + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState.forNumber( + lastBackupState_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The status of the last backup to this BackupVault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lastBackupState to set. + * @return This builder for chaining. + */ + public Builder setLastBackupState( + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + lastBackupState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of the last backup to this BackupVault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLastBackupState() { + bitField0_ = (bitField0_ & ~0x00000004); + lastBackupState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastSuccessfulBackupConsistencyTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastSuccessfulBackupConsistencyTimeBuilder_; + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + public boolean hasLastSuccessfulBackupConsistencyTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + public com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } else { + return lastSuccessfulBackupConsistencyTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastSuccessfulBackupConsistencyTime(com.google.protobuf.Timestamp value) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastSuccessfulBackupConsistencyTime_ = value; + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastSuccessfulBackupConsistencyTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + lastSuccessfulBackupConsistencyTime_ = builderForValue.build(); + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastSuccessfulBackupConsistencyTime(com.google.protobuf.Timestamp value) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && lastSuccessfulBackupConsistencyTime_ != null + && lastSuccessfulBackupConsistencyTime_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastSuccessfulBackupConsistencyTimeBuilder().mergeFrom(value); + } else { + lastSuccessfulBackupConsistencyTime_ = value; + } + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.mergeFrom(value); + } + if (lastSuccessfulBackupConsistencyTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastSuccessfulBackupConsistencyTime() { + bitField0_ = (bitField0_ & ~0x00000008); + lastSuccessfulBackupConsistencyTime_ = null; + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + lastSuccessfulBackupConsistencyTimeBuilder_.dispose(); + lastSuccessfulBackupConsistencyTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastSuccessfulBackupConsistencyTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder + getLastSuccessfulBackupConsistencyTimeOrBuilder() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + return lastSuccessfulBackupConsistencyTimeBuilder_.getMessageOrBuilder(); + } else { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + } + + /** + * + * + *
+     * Output only. If the last backup were successful, this field has the
+     * consistency date.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + lastSuccessfulBackupConsistencyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastSuccessfulBackupConsistencyTime(), getParentForChildren(), isClean()); + lastSuccessfulBackupConsistencyTime_ = null; + } + return lastSuccessfulBackupConsistencyTimeBuilder_; + } + + private com.google.rpc.Status lastBackupError_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + lastBackupErrorBuilder_; + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastBackupError field is set. + */ + public boolean hasLastBackupError() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupError. + */ + public com.google.rpc.Status getLastBackupError() { + if (lastBackupErrorBuilder_ == null) { + return lastBackupError_ == null + ? com.google.rpc.Status.getDefaultInstance() + : lastBackupError_; + } else { + return lastBackupErrorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastBackupError(com.google.rpc.Status value) { + if (lastBackupErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastBackupError_ = value; + } else { + lastBackupErrorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastBackupError(com.google.rpc.Status.Builder builderForValue) { + if (lastBackupErrorBuilder_ == null) { + lastBackupError_ = builderForValue.build(); + } else { + lastBackupErrorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastBackupError(com.google.rpc.Status value) { + if (lastBackupErrorBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && lastBackupError_ != null + && lastBackupError_ != com.google.rpc.Status.getDefaultInstance()) { + getLastBackupErrorBuilder().mergeFrom(value); + } else { + lastBackupError_ = value; + } + } else { + lastBackupErrorBuilder_.mergeFrom(value); + } + if (lastBackupError_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastBackupError() { + bitField0_ = (bitField0_ & ~0x00000010); + lastBackupError_ = null; + if (lastBackupErrorBuilder_ != null) { + lastBackupErrorBuilder_.dispose(); + lastBackupErrorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder getLastBackupErrorBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetLastBackupErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.StatusOrBuilder getLastBackupErrorOrBuilder() { + if (lastBackupErrorBuilder_ != null) { + return lastBackupErrorBuilder_.getMessageOrBuilder(); + } else { + return lastBackupError_ == null + ? com.google.rpc.Status.getDefaultInstance() + : lastBackupError_; + } + } + + /** + * + * + *
+     * Output only. If the last backup failed, this field has the error message.
+     * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetLastBackupErrorFieldBuilder() { + if (lastBackupErrorBuilder_ == null) { + lastBackupErrorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + getLastBackupError(), getParentForChildren(), isClean()); + lastBackupError_ = null; + } + return lastBackupErrorBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupConfigInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupConfigInfo) + private static final com.google.cloud.backupdr.v1beta.BackupConfigInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupConfigInfo(); + } + + public static com.google.cloud.backupdr.v1beta.BackupConfigInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupConfigInfo 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.backupdr.v1beta.BackupConfigInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigInfoOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigInfoOrBuilder.java new file mode 100644 index 000000000000..d52382de671d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigInfoOrBuilder.java @@ -0,0 +1,227 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupConfigInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupConfigInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configuration for a Google Cloud resource.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + * + * @return Whether the gcpBackupConfig field is set. + */ + boolean hasGcpBackupConfig(); + + /** + * + * + *
+   * Configuration for a Google Cloud resource.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + * + * @return The gcpBackupConfig. + */ + com.google.cloud.backupdr.v1beta.GcpBackupConfig getGcpBackupConfig(); + + /** + * + * + *
+   * Configuration for a Google Cloud resource.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpBackupConfig gcp_backup_config = 4; + */ + com.google.cloud.backupdr.v1beta.GcpBackupConfigOrBuilder getGcpBackupConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for an application backed up by a Backup Appliance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + * + * @return Whether the backupApplianceBackupConfig field is set. + */ + boolean hasBackupApplianceBackupConfig(); + + /** + * + * + *
+   * Configuration for an application backed up by a Backup Appliance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + * + * @return The backupApplianceBackupConfig. + */ + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfig getBackupApplianceBackupConfig(); + + /** + * + * + *
+   * Configuration for an application backed up by a Backup Appliance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupConfig backup_appliance_backup_config = 5; + * + */ + com.google.cloud.backupdr.v1beta.BackupApplianceBackupConfigOrBuilder + getBackupApplianceBackupConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The status of the last backup to this BackupVault
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + int getLastBackupStateValue(); + + /** + * + * + *
+   * Output only. The status of the last backup to this BackupVault
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState getLastBackupState(); + + /** + * + * + *
+   * Output only. If the last backup were successful, this field has the
+   * consistency date.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + boolean hasLastSuccessfulBackupConsistencyTime(); + + /** + * + * + *
+   * Output only. If the last backup were successful, this field has the
+   * consistency date.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime(); + + /** + * + * + *
+   * Output only. If the last backup were successful, this field has the
+   * consistency date.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupConsistencyTimeOrBuilder(); + + /** + * + * + *
+   * Output only. If the last backup failed, this field has the error message.
+   * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastBackupError field is set. + */ + boolean hasLastBackupError(); + + /** + * + * + *
+   * Output only. If the last backup failed, this field has the error message.
+   * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupError. + */ + com.google.rpc.Status getLastBackupError(); + + /** + * + * + *
+   * Output only. If the last backup failed, this field has the error message.
+   * 
+ * + * .google.rpc.Status last_backup_error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.StatusOrBuilder getLastBackupErrorOrBuilder(); + + com.google.cloud.backupdr.v1beta.BackupConfigInfo.BackupConfigCase getBackupConfigCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigState.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigState.java new file mode 100644 index 000000000000..3eb8bd0ee8d2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupConfigState.java @@ -0,0 +1,197 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Backup configuration state. Is the resource configured for backup?
+ * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupConfigState} + */ +@com.google.protobuf.Generated +public enum BackupConfigState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The possible states of backup configuration.
+   * Status not set.
+   * 
+ * + * BACKUP_CONFIG_STATE_UNSPECIFIED = 0; + */ + BACKUP_CONFIG_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The data source is actively protected (i.e. there is a
+   * BackupPlanAssociation or Appliance SLA pointing to it)
+   * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+   * The data source is no longer protected (but may have backups under it)
+   * 
+ * + * PASSIVE = 2; + */ + PASSIVE(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupConfigState"); + } + + /** + * + * + *
+   * The possible states of backup configuration.
+   * Status not set.
+   * 
+ * + * BACKUP_CONFIG_STATE_UNSPECIFIED = 0; + */ + public static final int BACKUP_CONFIG_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * The data source is actively protected (i.e. there is a
+   * BackupPlanAssociation or Appliance SLA pointing to it)
+   * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
+   * The data source is no longer protected (but may have backups under it)
+   * 
+ * + * PASSIVE = 2; + */ + public static final int PASSIVE_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 BackupConfigState 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 BackupConfigState forNumber(int value) { + switch (value) { + case 0: + return BACKUP_CONFIG_STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return PASSIVE; + 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 BackupConfigState findValueByNumber(int number) { + return BackupConfigState.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto.getDescriptor().getEnumTypes().get(0); + } + + private static final BackupConfigState[] VALUES = values(); + + public static BackupConfigState 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 BackupConfigState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.BackupConfigState) +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRProto.java new file mode 100644 index 000000000000..ad1d831de391 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDRProto.java @@ -0,0 +1,694 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class BackupDRProto extends com.google.protobuf.GeneratedFile { + private BackupDRProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupDRProto"); + } + + 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_backupdr_v1beta_NetworkConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ManagementURI_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ManagementURI_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedManagementURI_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedManagementURI_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedOAuth2ClientID_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedOAuth2ClientID_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ManagementServer_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ManagementServer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ManagementServer_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ManagementServer_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListManagementServersRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListManagementServersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListManagementServersResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListManagementServersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetManagementServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetManagementServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_CreateManagementServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_CreateManagementServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DeleteManagementServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DeleteManagementServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_InitializeServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_InitializeServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_InitializeServiceResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_InitializeServiceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_OperationMetadata_AdditionalInfoEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_OperationMetadata_AdditionalInfoEntry_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/backupdr/v1beta/backupdr." + + "proto\022\034google.cloud.backupdr.v1beta\032\034goo" + + "gle/api/annotations.proto\032\027google/api/cl" + + "ient.proto\032\037google/api/field_behavior.pr" + + "oto\032\033google/api/field_info.proto\032\031google" + + "/api/resource.proto\032>google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.pr" + + "oto\0327google/cloud/backupdr/v1beta/autoprotectionpolicy.proto\032>google/cloud/backu" + + "pdr/v1beta/autoprotectionpolicybinding.proto\032-google/cloud/backupdr/v1beta/backu" + + "pplan.proto\0328google/cloud/backupdr/v1beta/backupplanassociation.proto\032.google/cl" + + "oud/backupdr/v1beta/backupvault.proto\0327google/cloud/backupdr/v1beta/backupvault_" + + "cloudsql.proto\032:google/cloud/backupdr/v1beta/bindingmatchingresource.proto\0326goog" + + "le/cloud/backupdr/v1beta/datasourcereference.proto\032#google/longrunning/operation" + + "s.proto\032\033google/protobuf/empty.proto\032\037go" + + "ogle/protobuf/timestamp.proto\032\036google/protobuf/wrappers.proto\"\302\001\n\r" + + "NetworkConfig\022\024\n" + + "\007network\030\001 \001(\tB\003\340A\001\022R\n" + + "\014peering_mode\030\002 " + + "\001(\01627.google.cloud.backupdr.v1beta.NetworkConfig.PeeringModeB\003\340A\001\"G\n" + + "\013PeeringMode\022\034\n" + + "\030PEERING_MODE_UNSPECIFIED\020\000\022\032\n" + + "\026PRIVATE_SERVICE_ACCESS\020\001\"6\n\r" + + "ManagementURI\022\023\n" + + "\006web_ui\030\001 \001(\tB\003\340A\003\022\020\n" + + "\003api\030\002 \001(\tB\003\340A\003\"w\n" + + "#WorkforceIdentityBasedManagementURI\022\'\n" + + "\032first_party_management_uri\030\001 \001(\tB\003\340A\003\022\'\n" + + "\032third_party_management_uri\030\002 \001(\tB\003\340A\003\"|\n" + + "$WorkforceIdentityBasedOAuth2ClientID\022)\n" + + "\034first_party_oauth2_client_id\030\001 \001(\tB\003\340A\003\022)\n" + + "\034third_party_oauth2_client_id\030\002 \001(\tB\003\340A\003\"\355\n\n" + + "\020ManagementServer\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\003\340A\010\022\030\n" + + "\013description\030\t \001(\tB\003\340A\001\022O\n" + + "\006labels\030\004" + + " \003(\0132:.google.cloud.backupdr.v1beta.ManagementServer.LabelsEntryB\003\340A\001\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022N\n" + + "\004type\030\016 \001(\0162;.goog" + + "le.cloud.backupdr.v1beta.ManagementServer.InstanceTypeB\003\340A\001\022H\n" + + "\016management_uri\030\013 " + + "\001(\0132+.google.cloud.backupdr.v1beta.ManagementURIB\003\340A\003\022w\n" + + "\'workforce_identity_based_management_uri\030\020 \001(\0132A.google.cloud.ba" + + "ckupdr.v1beta.WorkforceIdentityBasedManagementURIB\003\340A\003\022P\n" + + "\005state\030\007 \001(\0162<.google.c" + + "loud.backupdr.v1beta.ManagementServer.InstanceStateB\003\340A\003\022B\n" + + "\010networks\030\010 \003(\0132+.goo" + + "gle.cloud.backupdr.v1beta.NetworkConfigB\003\340A\001\022\021\n" + + "\004etag\030\r" + + " \001(\tB\003\340A\001\022\035\n" + + "\020oauth2_client_id\030\017 \001(\tB\003\340A\003\022z\n" + + ")workforce_identity_based_oauth2_client_id\030\021 \001(\0132B.google.cloud" + + ".backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientIDB\003\340A\003\022\031\n" + + "\014ba_proxy_uri\030\022 \003(\tB\003\340A\003\0226\n\r" + + "satisfies_pzs\030\023" + + " \001(\0132\032.google.protobuf.BoolValueB\003\340A\003\022\032\n\r" + + "satisfies_pzi\030\024 \001(\010B\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"A\n" + + "\014InstanceType\022\035\n" + + "\031INSTANCE_TYPE_UNSPECIFIED\020\000\022\022\n" + + "\016BACKUP_RESTORE\020\001\"\217\001\n\r" + + "InstanceState\022\036\n" + + "\032INSTANCE_STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\t\n" + + "\005READY\020\002\022\014\n" + + "\010UPDATING\020\003\022\014\n" + + "\010DELETING\020\004\022\r\n" + + "\tREPAIRING\020\005\022\017\n" + + "\013MAINTENANCE\020\006\022\t\n" + + "\005ERROR\020\007:\241\001\352A\235\001\n" + + "(backupdr.googleapis.com/ManagementServer\022Lprojects/{project}/locations/{location}/" + + "managementServers/{managementserver}*\021managementServers2\020managementServer\"\337\001\n" + + "\034ListManagementServersRequest\022@\n" + + "\006parent\030\001 \001(" + + "\tB0\340A\002\372A*\022(backupdr.googleapis.com/ManagementServer\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\030\n" + + "\006filter\030\004 \001(\tB\003\340A\001H\000\210\001\001\022\032\n" + + "\010order_by\030\005 \001(\tB\003\340A\001H\001\210\001\001B\t\n" + + "\007_filterB\013\n" + + "\t_order_by\"\231\001\n" + + "\035ListManagementServersResponse\022J\n" + + "\022management_servers\030\001 \003(" + + "\0132..google.cloud.backupdr.v1beta.ManagementServer\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\\\n" + + "\032GetManagementServerRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + + "(backupdr.googleapis.com/ManagementServer\"\355\001\n" + + "\035CreateManagementServerRequest\022@\n" + + "\006parent\030\001 \001(\tB" + + "0\340A\002\372A*\022(backupdr.googleapis.com/ManagementServer\022!\n" + + "\024management_server_id\030\002 \001(\tB\003\340A\002\022N\n" + + "\021management_server\030\003 \001(\0132..google" + + ".cloud.backupdr.v1beta.ManagementServerB\003\340A\002\022\027\n\n" + + "request_id\030\004 \001(\tB\003\340A\001\"x\n" + + "\035DeleteManagementServerRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + + "(backupdr.googleapis.com/ManagementServer\022\027\n\n" + + "request_id\030\002 \001(\tB\003\340A\001\"\277\002\n" + + "\030InitializeServiceRequest\022{\n" + + "(cloud_sql_instance_initialization_config\030\004 \001(\0132B.google." + + "cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfigB\003\340A\001H\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022\032\n\r" + + "resource_type\030\002 \001(\tB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022!\n" + + "\024backup_plan_location\030\006 \001(\tB\003\340A\001\022\032\n\r" + + "validate_only\030\007 \001(\010B\003\340A\001B\027\n" + + "\025initialization_config\"P\n" + + "\031InitializeServiceResponse\022\031\n" + + "\021backup_vault_name\030\001 \001(\t\022\030\n" + + "\020backup_plan_name\030\002 \001(\t\"\232\003\n" + + "\021OperationMetadata\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023\n" + + "\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n" + + "\016status_message\030\005 \001(\tB\003\340A\003\022#\n" + + "\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n" + + "\013api_version\030\007 \001(\tB\003\340A\003\022a\n" + + "\017additional_info\030\010 \003(\0132" + + "C.google.cloud.backupdr.v1beta.OperationMetadata.AdditionalInfoEntryB\003\340A\003\0325\n" + + "\023AdditionalInfoEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\0012\311a\n" + + "\010BackupDR\022\334\001\n" + + "\025ListManagementServers\022:.google.cloud.backupdr.v1beta.L" + + "istManagementServersRequest\032;.google.cloud.backupdr.v1beta.ListManagementServers" + + "Response\"J\332A\006parent\202\323\344\223\002;\0229/v1beta/{pare" + + "nt=projects/*/locations/*}/managementServers\022\311\001\n" + + "\023GetManagementServer\0228.google.cloud.backupdr.v1beta.GetManagementServerR" + + "equest\032..google.cloud.backupdr.v1beta.Ma" + + "nagementServer\"H\332A\004name\202\323\344\223\002;\0229/v1beta/{" + + "name=projects/*/locations/*/managementServers/*}\022\243\002\n" + + "\026CreateManagementServer\022;.google.cloud.backupdr.v1beta.CreateManagem" + + "entServerRequest\032\035.google.longrunning.Operation\"\254\001\312A%\n" + + "\020ManagementServer\022\021OperationMetadata\332A-parent,management_server,ma" + + "nagement_server_id\202\323\344\223\002N\"9/v1beta/{paren" + + "t=projects/*/locations/*}/managementServers:\021management_server\022\353\001\n" + + "\026DeleteManagementServer\022;.google.cloud.backupdr.v1beta" + + ".DeleteManagementServerRequest\032\035.google.longrunning.Operation\"u\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\002" + + ";*9/v1beta/{name=projects/*/locations/*/managementServers/*}\022\200\002\n" + + "\021CreateBackupVault\0226.google.cloud.backupdr.v1beta.Create" + + "BackupVaultRequest\032\035.google.longrunning.Operation\"\223\001\312A \n" + + "\013BackupVault\022\021OperationMetadata\332A#parent,backup_vault,backup_vau" + + "lt_id\202\323\344\223\002D\"4/v1beta/{parent=projects/*/" + + "locations/*}/backupVaults:\014backup_vault\022\310\001\n" + + "\020ListBackupVaults\0225.google.cloud.backupdr.v1beta.ListBackupVaultsRequest\0326.go" + + "ogle.cloud.backupdr.v1beta.ListBackupVau" + + "ltsResponse\"E\332A\006parent\202\323\344\223\0026\0224/v1beta/{p" + + "arent=projects/*/locations/*}/backupVaults\022\351\001\n" + + "\027FetchUsableBackupVaults\022<.google.cloud.backupdr.v1beta.FetchUsableBackupV" + + "aultsRequest\032=.google.cloud.backupdr.v1b" + + "eta.FetchUsableBackupVaultsResponse\"Q\332A\006" + + "parent\202\323\344\223\002B\022@/v1beta/{parent=projects/*" + + "/locations/*}/backupVaults:fetchUsable\022\265\001\n" + + "\016GetBackupVault\0223.google.cloud.backupd" + + "r.v1beta.GetBackupVaultRequest\032).google." + + "cloud.backupdr.v1beta.BackupVault\"C\332A\004na" + + "me\202\323\344\223\0026\0224/v1beta/{name=projects/*/locations/*/backupVaults/*}\022\202\002\n" + + "\021UpdateBackupVault\0226.google.cloud.backupdr.v1beta.Upda" + + "teBackupVaultRequest\032\035.google.longrunning.Operation\"\225\001\312A \n" + + "\013BackupVault\022\021Operatio" + + "nMetadata\332A\030backup_vault,update_mask\202\323\344\223" + + "\002Q2A/v1beta/{backup_vault.name=projects/" + + "*/locations/*/backupVaults/*}:\014backup_vault\022\334\001\n" + + "\021DeleteBackupVault\0226.google.cloud" + + ".backupdr.v1beta.DeleteBackupVaultRequest\032\035.google.longrunning.Operation\"p\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332" + + "A\004name\202\323\344\223\0026*4/v1beta/{name=projects/*/locations/*/backupVaults/*}\022\323\001\n" + + "\017ListDataSources\0224.google.cloud.backupdr.v1beta.Li" + + "stDataSourcesRequest\0325.google.cloud.back" + + "updr.v1beta.ListDataSourcesResponse\"S\332A\006" + + "parent\202\323\344\223\002D\022B/v1beta/{parent=projects/*" + + "/locations/*/backupVaults/*}/dataSources\022\300\001\n\r" + + "GetDataSource\0222.google.cloud.backupdr.v1beta.GetDataSourceRequest\032(.google." + + "cloud.backupdr.v1beta.DataSource\"Q\332A\004nam" + + "e\202\323\344\223\002D\022B/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*}\022\212\002\n" + + "\020UpdateDataSource\0225.google.cloud.backupdr" + + ".v1beta.UpdateDataSourceRequest\032\035.google.longrunning.Operation\"\237\001\312A\037\n\n" + + "DataSource\022\021OperationMetadata\332A\027data_source,update" + + "_mask\202\323\344\223\002]2N/v1beta/{data_source.name=p" + + "rojects/*/locations/*/backupVaults/*/dataSources/*}:\013data_source\022\321\001\n" + + "\013ListBackups\0220.google.cloud.backupdr.v1beta.ListBack" + + "upsRequest\0321.google.cloud.backupdr.v1bet" + + "a.ListBackupsResponse\"]\332A\006parent\202\323\344\223\002N\022L" + + "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups\022\245\002\n" + + "\033FetchBackupsForResourceType\022@.google.cloud.backupdr.v1beta.FetchBackupsForResou" + + "rceTypeRequest\032A.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRespons" + + "e\"\200\001\332A\024parent,resource_type\202\323\344\223\002c\022a/v1be" + + "ta/{parent=projects/*/locations/*/backup" + + "Vaults/*/dataSources/*}/backups:fetchForResourceType\022\276\001\n" + + "\tGetBackup\022..google.cloud.backupdr.v1beta.GetBackupRequest\032$.goo" + + "gle.cloud.backupdr.v1beta.Backup\"[\332A\004nam" + + "e\202\323\344\223\002N\022L/v1beta/{name=projects/*/locati" + + "ons/*/backupVaults/*/dataSources/*/backups/*}\022\371\001\n" + + "\014UpdateBackup\0221.google.cloud.ba" + + "ckupdr.v1beta.UpdateBackupRequest\032\035.google.longrunning.Operation\"\226\001\312A\033\n" + + "\006Backup\022\021OperationMetadata\332A\022backup,update_mask\202\323" + + "\344\223\002]2S/v1beta/{backup.name=projects/*/lo" + + "cations/*/backupVaults/*/dataSources/*/backups/*}:\006backup\022\333\001\n" + + "\014DeleteBackup\0221.google.cloud.backupdr.v1beta.DeleteBackupRe" + + "quest\032\035.google.longrunning.Operation\"y\312A\033\n" + + "\006Backup\022\021OperationMetadata\332A\004name\202\323\344\223\002" + + "N*L/v1beta/{name=projects/*/locations/*/" + + "backupVaults/*/dataSources/*/backups/*}\022\370\001\n\r" + + "RestoreBackup\0222.google.cloud.backupd" + + "r.v1beta.RestoreBackupRequest\032\035.google.longrunning.Operation\"\223\001\312A*\n" + + "\025RestoreBackupResponse\022\021OperationMetadata\332A\004name\202\323\344\223\002" + + "Y\"T/v1beta/{name=projects/*/locations/*/" + + "backupVaults/*/dataSources/*/backups/*}:restore:\001*\022\371\001\n" + + "\020CreateBackupPlan\0225.google.cloud.backupdr.v1beta.CreateBackupPlanR" + + "equest\032\035.google.longrunning.Operation\"\216\001\312A\037\n\n" + + "BackupPlan\022\021OperationMetadata\332A!par" + + "ent,backup_plan,backup_plan_id\202\323\344\223\002B\"3/v" + + "1beta/{parent=projects/*/locations/*}/backupPlans:\013backup_plan\022\373\001\n" + + "\020UpdateBackupPlan\0225.google.cloud.backupdr.v1beta.Updat" + + "eBackupPlanRequest\032\035.google.longrunning.Operation\"\220\001\312A\037\n\n" + + "BackupPlan\022\021OperationMe" + + "tadata\332A\027backup_plan,update_mask\202\323\344\223\002N2?" + + "/v1beta/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\013backup_plan\022\261\001\n" + + "\r" + + "GetBackupPlan\0222.google.cloud.backupdr.v1beta.GetBackupPlanRequest\032(.google.clou" + + "d.backupdr.v1beta.BackupPlan\"B\332A\004name\202\323\344" + + "\223\0025\0223/v1beta/{name=projects/*/locations/*/backupPlans/*}\022\304\001\n" + + "\017ListBackupPlans\0224.google.cloud.backupdr.v1beta.ListBackupPl" + + "ansRequest\0325.google.cloud.backupdr.v1bet" + + "a.ListBackupPlansResponse\"D\332A\006parent\202\323\344\223" + + "\0025\0223/v1beta/{parent=projects/*/locations/*}/backupPlans\022\331\001\n" + + "\020DeleteBackupPlan\0225.google.cloud.backupdr.v1beta.DeleteBackup" + + "PlanRequest\032\035.google.longrunning.Operation\"o\312A*\n" + + "\025google.protobuf.Empty\022\021Operatio" + + "nMetadata\332A\004name\202\323\344\223\0025*3/v1beta/{name=projects/*/locations/*/backupPlans/*}\022\325\001\n" + + "\025GetBackupPlanRevision\022:.google.cloud.bac" + + "kupdr.v1beta.GetBackupPlanRevisionRequest\0320.google.cloud.backupdr.v1beta.BackupP" + + "lanRevision\"N\332A\004name\202\323\344\223\002A\022?/v1beta/{nam" + + "e=projects/*/locations/*/backupPlans/*/revisions/*}\022\350\001\n" + + "\027ListBackupPlanRevisions\022<.google.cloud.backupdr.v1beta.ListBacku" + + "pPlanRevisionsRequest\032=.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResp" + + "onse\"P\332A\006parent\202\323\344\223\002A\022?/v1beta/{parent=p" + + "rojects/*/locations/*/backupPlans/*}/revisions\022\311\002\n" + + "\033CreateBackupPlanAssociation\022@.google.cloud.backupdr.v1beta.CreateBack" + + "upPlanAssociationRequest\032\035.google.longrunning.Operation\"\310\001\312A*\n" + + "\025BackupPlanAssociation\022\021OperationMetadata\332A9parent,backup_" + + "plan_association,backup_plan_association" + + "_id\202\323\344\223\002Y\">/v1beta/{parent=projects/*/lo" + + "cations/*}/backupPlanAssociations:\027backup_plan_association\022\313\002\n" + + "\033UpdateBackupPlanAssociation\022@.google.cloud.backupdr.v1bet" + + "a.UpdateBackupPlanAssociationRequest\032\035.google.longrunning.Operation\"\312\001\312A*\n" + + "\025BackupPlanAssociation\022\021OperationMetadata\332A#ba" + + "ckup_plan_association,update_mask\202\323\344\223\002q2" + + "V/v1beta/{backup_plan_association.name=p" + + "rojects/*/locations/*/backupPlanAssociations/*}:\027backup_plan_association\022\335\001\n" + + "\030GetBackupPlanAssociation\022=.google.cloud.bac" + + "kupdr.v1beta.GetBackupPlanAssociationRequest\0323.google.cloud.backupdr.v1beta.Back" + + "upPlanAssociation\"M\332A\004name\202\323\344\223\002@\022>/v1bet" + + "a/{name=projects/*/locations/*/backupPlanAssociations/*}\022\360\001\n" + + "\032ListBackupPlanAssociations\022?.google.cloud.backupdr.v1beta.L" + + "istBackupPlanAssociationsRequest\032@.google.cloud.backupdr.v1beta.ListBackupPlanAs" + + "sociationsResponse\"O\332A\006parent\202\323\344\223\002@\022>/v1" + + "beta/{parent=projects/*/locations/*}/backupPlanAssociations\022\303\002\n" + + "*FetchBackupPlanAssociationsForResourceType\022O.google.clou" + + "d.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest\032P.google.clo" + + "ud.backupdr.v1beta.FetchBackupPlanAssoci" + + "ationsForResourceTypeResponse\"r\332A\024parent" + + ",resource_type\202\323\344\223\002U\022S/v1beta/{parent=pr" + + "ojects/*/locations/*}/backupPlanAssociations:fetchForResourceType\022\372\001\n" + + "\033DeleteBackupPlanAssociation\022@.google.cloud.backupd" + + "r.v1beta.DeleteBackupPlanAssociationRequest\032\035.google.longrunning.Operation\"z\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadat" + + "a\332A\004name\202\323\344\223\002@*>/v1beta/{name=projects/*" + + "/locations/*/backupPlanAssociations/*}\022\370\001\n\r" + + "TriggerBackup\0222.google.cloud.backupdr" + + ".v1beta.TriggerBackupRequest\032\035.google.longrunning.Operation\"\223\001\312A*\n" + + "\025BackupPlanAssociation\022\021OperationMetadata\332A\014name,rule_" + + "id\202\323\344\223\002Q\"L/v1beta/{name=projects/*/locat" + + "ions/*/backupPlanAssociations/*}:triggerBackup:\001*\022\325\001\n" + + "\026GetDataSourceReference\022;.google.cloud.backupdr.v1beta.GetDataSourc" + + "eReferenceRequest\0321.google.cloud.backupd" + + "r.v1beta.DataSourceReference\"K\332A\004name\202\323\344" + + "\223\002>\022.google.cloud.backupdr.v1beta.ListDataSou" + + "rceReferencesResponse\"M\332A\006parent\202\323\344\223\002>\022<" + + "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences\022\273\002\n" + + "(FetchDataSourceReferencesForResourceType\022M.google.cloud" + + ".backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest\032N.google.cloud." + + "backupdr.v1beta.FetchDataSourceReference" + + "sForResourceTypeResponse\"p\332A\024parent,reso" + + "urce_type\202\323\344\223\002S\022Q/v1beta/{parent=project" + + "s/*/locations/*}/dataSourceReferences:fetchForResourceType\022\346\001\n" + + "\021InitializeService\0226.google.cloud.backupdr.v1beta.Initiali" + + "zeServiceRequest\032\035.google.longrunning.Operation\"z\312A.\n" + + "\031InitializeServiceResponse\022" + + "\021OperationMetadata\202\323\344\223\002C\">/v1beta/{name=" + + "projects/*/locations/*/serviceConfig}:initialize:\001*\022\303\002\n" + + "\032CreateAutoProtectionPolicy\022?.google.cloud.backupdr.v1beta.Create" + + "AutoProtectionPolicyRequest\032\035.google.longrunning.Operation\"\304\001\312A)\n" + + "\024AutoProtectionPolicy\022\021OperationMetadata\332A7parent,auto_" + + "protection_policy,auto_protection_policy" + + "_id\202\323\344\223\002X\">/v1beta/{parent=projects/*/lo" + + "cations/*}/autoProtectionPolicies:\026auto_protection_policy\022\360\001\n" + + "\032ListAutoProtectionPolicies\022?.google.cloud.backupdr.v1beta." + + "ListAutoProtectionPoliciesRequest\032@.google.cloud.backupdr.v1beta.ListAutoProtect" + + "ionPoliciesResponse\"O\332A\006parent\202\323\344\223\002@\022>/v" + + "1beta/{parent=projects/*/locations/*}/autoProtectionPolicies\022\332\001\n" + + "\027GetAutoProtectionPolicy\022<.google.cloud.backupdr.v1beta." + + "GetAutoProtectionPolicyRequest\0322.google.cloud.backupdr.v1beta.AutoProtectionPoli" + + "cy\"M\332A\004name\202\323\344\223\002@\022>/v1beta/{name=project" + + "s/*/locations/*/autoProtectionPolicies/*}\022\305\002\n" + + "\032UpdateAutoProtectionPolicy\022?.google.cloud.backupdr.v1beta.UpdateAutoProtec" + + "tionPolicyRequest\032\035.google.longrunning.Operation\"\306\001\312A)\n" + + "\024AutoProtectionPolicy\022\021OperationMetadata\332A\"auto_protection_policy" + + ",update_mask\202\323\344\223\002o2U/v1beta/{auto_protec" + + "tion_policy.name=projects/*/locations/*/" + + "autoProtectionPolicies/*}:\026auto_protection_policy\022\370\001\n" + + "\032DeleteAutoProtectionPolicy\022?.google.cloud.backupdr.v1beta.DeleteAu" + + "toProtectionPolicyRequest\032\035.google.longrunning.Operation\"z\312A*\n" + + "\025google.protobuf.E" + + "mpty\022\021OperationMetadata\332A\004name\202\323\344\223\002@*>/v" + + "1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}\022\373\002\n" + + "!CreateAutoProtectionPolicyBinding\022F.google.cloud.backup" + + "dr.v1beta.CreateAutoProtectionPolicyBind" + + "ingRequest\032\035.google.longrunning.Operation\"\356\001\312A0\n" + + "\033AutoProtectionPolicyBinding\022\021OperationMetadata\332AGparent,auto_protection" + + "_policy_binding,auto_protection_policy_b" + + "inding_id\202\323\344\223\002k\"I/v1beta/{parent=project" + + "s/*/locations/*/autoProtectionPolicies/*" + + "}/bindings:\036auto_protection_policy_binding\022\372\001\n" + + "\036GetAutoProtectionPolicyBinding\022C.google.cloud.backupdr.v1beta.GetAutoProt" + + "ectionPolicyBindingRequest\0329.google.cloud.backupdr.v1beta.AutoProtectionPolicyBi" + + "nding\"X\332A\004name\202\323\344\223\002K\022I/v1beta/{name=proj" + + "ects/*/locations/*/autoProtectionPolicies/*/bindings/*}\022\215\002\n" + + " ListAutoProtectionPolicyBindings\022E.google.cloud.backupdr.v1b" + + "eta.ListAutoProtectionPolicyBindingsRequest\032F.google.cloud.backupdr.v1beta.ListA" + + "utoProtectionPolicyBindingsResponse\"Z\332A\006" + + "parent\202\323\344\223\002K\022I/v1beta/{parent=projects/*" + + "/locations/*/autoProtectionPolicies/*}/bindings\022\214\002\n" + + "!ListAppliedAutoProtectionPolicies\022F.google.cloud.backupdr.v1beta.Lis" + + "tAppliedAutoProtectionPoliciesRequest\032G.google.cloud.backupdr.v1beta.ListApplied" + + "AutoProtectionPoliciesResponse\"V\332A\006paren" + + "t\202\323\344\223\002G\022E/v1beta/{parent=projects/*/loca" + + "tions/*}/appliedAutoProtectionPolicies\022\272\002\n" + + ")InitiateDeleteAutoProtectionPolicyBinding\022N.google.cloud.backupdr.v1beta.Init", + "iateDeleteAutoProtectionPolicyBindingReq" + + "uest\032\035.google.longrunning.Operation\"\235\001\312A" + + "0\n\033AutoProtectionPolicyBinding\022\021Operatio" + + "nMetadata\332A\004name\202\323\344\223\002]\"X/v1beta/{name=pr" + + "ojects/*/locations/*/autoProtectionPolic" + + "ies/*/bindings/*}:initiateDelete:\001*\022\202\002\n\032" + + "GetBindingMatchingResource\022?.google.clou" + + "d.backupdr.v1beta.GetBindingMatchingReso" + + "urceRequest\0325.google.cloud.backupdr.v1be" + + "ta.BindingMatchingResource\"l\332A\004name\202\323\344\223\002" + + "_\022]/v1beta/{name=projects/*/locations/*/" + + "autoProtectionPolicies/*/bindings/*/matc" + + "hingResources/*}\022\225\002\n\034ListBindingMatching" + + "Resources\022A.google.cloud.backupdr.v1beta" + + ".ListBindingMatchingResourcesRequest\032B.g" + + "oogle.cloud.backupdr.v1beta.ListBindingM" + + "atchingResourcesResponse\"n\332A\006parent\202\323\344\223\002" + + "_\022]/v1beta/{parent=projects/*/locations/" + + "*/autoProtectionPolicies/*/bindings/*}/m" + + "atchingResources\032z\312A\027backupdr.googleapis" + + ".com\322A]https://www.googleapis.com/auth/c" + + "loud-backupdr,https://www.googleapis.com" + + "/auth/cloud-platformB\321\001\n com.google.clou" + + "d.backupdr.v1betaB\rBackupDRProtoP\001Z + * BackupDrPlanConfig has additional information about Google Cloud Backup and + * DR's Plan backup configuration. + * + * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupDrPlanConfig} + */ +@com.google.protobuf.Generated +public final class BackupDrPlanConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupDrPlanConfig) + BackupDrPlanConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupDrPlanConfig"); + } + + // Use BackupDrPlanConfig.newBuilder() to construct. + private BackupDrPlanConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupDrPlanConfig() { + backupDrPlanRules_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.class, + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.Builder.class); + } + + public static final int BACKUP_DR_PLAN_RULES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backupDrPlanRules_; + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + @java.lang.Override + public java.util.List + getBackupDrPlanRulesList() { + return backupDrPlanRules_; + } + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + @java.lang.Override + public java.util.List + getBackupDrPlanRulesOrBuilderList() { + return backupDrPlanRules_; + } + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + @java.lang.Override + public int getBackupDrPlanRulesCount() { + return backupDrPlanRules_.size(); + } + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanRule getBackupDrPlanRules(int index) { + return backupDrPlanRules_.get(index); + } + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanRuleOrBuilder getBackupDrPlanRulesOrBuilder( + int index) { + return backupDrPlanRules_.get(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 < backupDrPlanRules_.size(); i++) { + output.writeMessage(1, backupDrPlanRules_.get(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 < backupDrPlanRules_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, backupDrPlanRules_.get(i)); + } + 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.backupdr.v1beta.BackupDrPlanConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig other = + (com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) obj; + + if (!getBackupDrPlanRulesList().equals(other.getBackupDrPlanRulesList())) 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 (getBackupDrPlanRulesCount() > 0) { + hash = (37 * hash) + BACKUP_DR_PLAN_RULES_FIELD_NUMBER; + hash = (53 * hash) + getBackupDrPlanRulesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig 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.backupdr.v1beta.BackupDrPlanConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig 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.backupdr.v1beta.BackupDrPlanConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupDrPlanConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupDrPlanConfig has additional information about Google Cloud Backup and
+   * DR's Plan backup configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupDrPlanConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupDrPlanConfig) + com.google.cloud.backupdr.v1beta.BackupDrPlanConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.class, + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupDrPlanRulesBuilder_ == null) { + backupDrPlanRules_ = java.util.Collections.emptyList(); + } else { + backupDrPlanRules_ = null; + backupDrPlanRulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanConfig build() { + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanConfig buildPartial() { + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig result = + new com.google.cloud.backupdr.v1beta.BackupDrPlanConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.BackupDrPlanConfig result) { + if (backupDrPlanRulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backupDrPlanRules_ = java.util.Collections.unmodifiableList(backupDrPlanRules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backupDrPlanRules_ = backupDrPlanRules_; + } else { + result.backupDrPlanRules_ = backupDrPlanRulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupDrPlanConfig result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupDrPlanConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupDrPlanConfig other) { + if (other == com.google.cloud.backupdr.v1beta.BackupDrPlanConfig.getDefaultInstance()) + return this; + if (backupDrPlanRulesBuilder_ == null) { + if (!other.backupDrPlanRules_.isEmpty()) { + if (backupDrPlanRules_.isEmpty()) { + backupDrPlanRules_ = other.backupDrPlanRules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.addAll(other.backupDrPlanRules_); + } + onChanged(); + } + } else { + if (!other.backupDrPlanRules_.isEmpty()) { + if (backupDrPlanRulesBuilder_.isEmpty()) { + backupDrPlanRulesBuilder_.dispose(); + backupDrPlanRulesBuilder_ = null; + backupDrPlanRules_ = other.backupDrPlanRules_; + bitField0_ = (bitField0_ & ~0x00000001); + backupDrPlanRulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupDrPlanRulesFieldBuilder() + : null; + } else { + backupDrPlanRulesBuilder_.addAllMessages(other.backupDrPlanRules_); + } + } + } + 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.backupdr.v1beta.BackupDrPlanRule m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.parser(), + extensionRegistry); + if (backupDrPlanRulesBuilder_ == null) { + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.add(m); + } else { + backupDrPlanRulesBuilder_.addMessage(m); + } + 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.util.List backupDrPlanRules_ = + java.util.Collections.emptyList(); + + private void ensureBackupDrPlanRulesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backupDrPlanRules_ = + new java.util.ArrayList( + backupDrPlanRules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrPlanRule, + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder, + com.google.cloud.backupdr.v1beta.BackupDrPlanRuleOrBuilder> + backupDrPlanRulesBuilder_; + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public java.util.List + getBackupDrPlanRulesList() { + if (backupDrPlanRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupDrPlanRules_); + } else { + return backupDrPlanRulesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public int getBackupDrPlanRulesCount() { + if (backupDrPlanRulesBuilder_ == null) { + return backupDrPlanRules_.size(); + } else { + return backupDrPlanRulesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupDrPlanRule getBackupDrPlanRules(int index) { + if (backupDrPlanRulesBuilder_ == null) { + return backupDrPlanRules_.get(index); + } else { + return backupDrPlanRulesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder setBackupDrPlanRules( + int index, com.google.cloud.backupdr.v1beta.BackupDrPlanRule value) { + if (backupDrPlanRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.set(index, value); + onChanged(); + } else { + backupDrPlanRulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder setBackupDrPlanRules( + int index, com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder builderForValue) { + if (backupDrPlanRulesBuilder_ == null) { + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.set(index, builderForValue.build()); + onChanged(); + } else { + backupDrPlanRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder addBackupDrPlanRules(com.google.cloud.backupdr.v1beta.BackupDrPlanRule value) { + if (backupDrPlanRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.add(value); + onChanged(); + } else { + backupDrPlanRulesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder addBackupDrPlanRules( + int index, com.google.cloud.backupdr.v1beta.BackupDrPlanRule value) { + if (backupDrPlanRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.add(index, value); + onChanged(); + } else { + backupDrPlanRulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder addBackupDrPlanRules( + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder builderForValue) { + if (backupDrPlanRulesBuilder_ == null) { + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.add(builderForValue.build()); + onChanged(); + } else { + backupDrPlanRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder addBackupDrPlanRules( + int index, com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder builderForValue) { + if (backupDrPlanRulesBuilder_ == null) { + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.add(index, builderForValue.build()); + onChanged(); + } else { + backupDrPlanRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder addAllBackupDrPlanRules( + java.lang.Iterable values) { + if (backupDrPlanRulesBuilder_ == null) { + ensureBackupDrPlanRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupDrPlanRules_); + onChanged(); + } else { + backupDrPlanRulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder clearBackupDrPlanRules() { + if (backupDrPlanRulesBuilder_ == null) { + backupDrPlanRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupDrPlanRulesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public Builder removeBackupDrPlanRules(int index) { + if (backupDrPlanRulesBuilder_ == null) { + ensureBackupDrPlanRulesIsMutable(); + backupDrPlanRules_.remove(index); + onChanged(); + } else { + backupDrPlanRulesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder getBackupDrPlanRulesBuilder( + int index) { + return internalGetBackupDrPlanRulesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupDrPlanRuleOrBuilder getBackupDrPlanRulesOrBuilder( + int index) { + if (backupDrPlanRulesBuilder_ == null) { + return backupDrPlanRules_.get(index); + } else { + return backupDrPlanRulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public java.util.List + getBackupDrPlanRulesOrBuilderList() { + if (backupDrPlanRulesBuilder_ != null) { + return backupDrPlanRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupDrPlanRules_); + } + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder addBackupDrPlanRulesBuilder() { + return internalGetBackupDrPlanRulesFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupDrPlanRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder addBackupDrPlanRulesBuilder( + int index) { + return internalGetBackupDrPlanRulesFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.BackupDrPlanRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Backup rules of the backup plan resource.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + * + */ + public java.util.List + getBackupDrPlanRulesBuilderList() { + return internalGetBackupDrPlanRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrPlanRule, + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder, + com.google.cloud.backupdr.v1beta.BackupDrPlanRuleOrBuilder> + internalGetBackupDrPlanRulesFieldBuilder() { + if (backupDrPlanRulesBuilder_ == null) { + backupDrPlanRulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupDrPlanRule, + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder, + com.google.cloud.backupdr.v1beta.BackupDrPlanRuleOrBuilder>( + backupDrPlanRules_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + backupDrPlanRules_ = null; + } + return backupDrPlanRulesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupDrPlanConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupDrPlanConfig) + private static final com.google.cloud.backupdr.v1beta.BackupDrPlanConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupDrPlanConfig(); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupDrPlanConfig 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.backupdr.v1beta.BackupDrPlanConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanConfigOrBuilder.java new file mode 100644 index 000000000000..dda9c127a5b8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanConfigOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupDrPlanConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupDrPlanConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + java.util.List getBackupDrPlanRulesList(); + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + com.google.cloud.backupdr.v1beta.BackupDrPlanRule getBackupDrPlanRules(int index); + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + int getBackupDrPlanRulesCount(); + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + java.util.List + getBackupDrPlanRulesOrBuilderList(); + + /** + * + * + *
+   * Backup rules of the backup plan resource.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupDrPlanRule backup_dr_plan_rules = 1; + */ + com.google.cloud.backupdr.v1beta.BackupDrPlanRuleOrBuilder getBackupDrPlanRulesOrBuilder( + int index); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanRule.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanRule.java new file mode 100644 index 000000000000..f37f8b86b525 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanRule.java @@ -0,0 +1,931 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupDrPlanRule has rule specific information of the backup plan resource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupDrPlanRule} + */ +@com.google.protobuf.Generated +public final class BackupDrPlanRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupDrPlanRule) + BackupDrPlanRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupDrPlanRule"); + } + + // Use BackupDrPlanRule.newBuilder() to construct. + private BackupDrPlanRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupDrPlanRule() { + ruleId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.class, + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder.class); + } + + private int bitField0_; + public static final int RULE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleId_ = ""; + + /** + * + * + *
+   * Output only. Unique Id of the backup rule.
+   * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + @java.lang.Override + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + 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(); + ruleId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Unique Id of the backup rule.
+   * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_SUCCESSFUL_BACKUP_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp lastSuccessfulBackupTime_; + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup rule.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupTime field is set. + */ + @java.lang.Override + public boolean hasLastSuccessfulBackupTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup rule.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastSuccessfulBackupTime() { + return lastSuccessfulBackupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupTime_; + } + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup rule.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupTimeOrBuilder() { + return lastSuccessfulBackupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupTime_; + } + + 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.GeneratedMessage.isStringEmpty(ruleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ruleId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLastSuccessfulBackupTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ruleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ruleId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getLastSuccessfulBackupTime()); + } + 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.backupdr.v1beta.BackupDrPlanRule)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupDrPlanRule other = + (com.google.cloud.backupdr.v1beta.BackupDrPlanRule) obj; + + if (!getRuleId().equals(other.getRuleId())) return false; + if (hasLastSuccessfulBackupTime() != other.hasLastSuccessfulBackupTime()) return false; + if (hasLastSuccessfulBackupTime()) { + if (!getLastSuccessfulBackupTime().equals(other.getLastSuccessfulBackupTime())) 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) + RULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getRuleId().hashCode(); + if (hasLastSuccessfulBackupTime()) { + hash = (37 * hash) + LAST_SUCCESSFUL_BACKUP_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastSuccessfulBackupTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule 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.backupdr.v1beta.BackupDrPlanRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule 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.backupdr.v1beta.BackupDrPlanRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupDrPlanRule 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupDrPlanRule has rule specific information of the backup plan resource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupDrPlanRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupDrPlanRule) + com.google.cloud.backupdr.v1beta.BackupDrPlanRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.class, + com.google.cloud.backupdr.v1beta.BackupDrPlanRule.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupDrPlanRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLastSuccessfulBackupTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ruleId_ = ""; + lastSuccessfulBackupTime_ = null; + if (lastSuccessfulBackupTimeBuilder_ != null) { + lastSuccessfulBackupTimeBuilder_.dispose(); + lastSuccessfulBackupTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrPlanRule_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanRule getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupDrPlanRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanRule build() { + com.google.cloud.backupdr.v1beta.BackupDrPlanRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrPlanRule buildPartial() { + com.google.cloud.backupdr.v1beta.BackupDrPlanRule result = + new com.google.cloud.backupdr.v1beta.BackupDrPlanRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupDrPlanRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ruleId_ = ruleId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lastSuccessfulBackupTime_ = + lastSuccessfulBackupTimeBuilder_ == null + ? lastSuccessfulBackupTime_ + : lastSuccessfulBackupTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupDrPlanRule) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupDrPlanRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupDrPlanRule other) { + if (other == com.google.cloud.backupdr.v1beta.BackupDrPlanRule.getDefaultInstance()) + return this; + if (!other.getRuleId().isEmpty()) { + ruleId_ = other.ruleId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLastSuccessfulBackupTime()) { + mergeLastSuccessfulBackupTime(other.getLastSuccessfulBackupTime()); + } + 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: + { + ruleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetLastSuccessfulBackupTimeFieldBuilder().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 java.lang.Object ruleId_ = ""; + + /** + * + * + *
+     * Output only. Unique Id of the backup rule.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Unique Id of the backup rule.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Unique Id of the backup rule.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Unique Id of the backup rule.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRuleId() { + ruleId_ = getDefaultInstance().getRuleId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Unique Id of the backup rule.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastSuccessfulBackupTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastSuccessfulBackupTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupTime field is set. + */ + public boolean hasLastSuccessfulBackupTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupTime. + */ + public com.google.protobuf.Timestamp getLastSuccessfulBackupTime() { + if (lastSuccessfulBackupTimeBuilder_ == null) { + return lastSuccessfulBackupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupTime_; + } else { + return lastSuccessfulBackupTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastSuccessfulBackupTime(com.google.protobuf.Timestamp value) { + if (lastSuccessfulBackupTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastSuccessfulBackupTime_ = value; + } else { + lastSuccessfulBackupTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastSuccessfulBackupTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastSuccessfulBackupTimeBuilder_ == null) { + lastSuccessfulBackupTime_ = builderForValue.build(); + } else { + lastSuccessfulBackupTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastSuccessfulBackupTime(com.google.protobuf.Timestamp value) { + if (lastSuccessfulBackupTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && lastSuccessfulBackupTime_ != null + && lastSuccessfulBackupTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastSuccessfulBackupTimeBuilder().mergeFrom(value); + } else { + lastSuccessfulBackupTime_ = value; + } + } else { + lastSuccessfulBackupTimeBuilder_.mergeFrom(value); + } + if (lastSuccessfulBackupTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastSuccessfulBackupTime() { + bitField0_ = (bitField0_ & ~0x00000002); + lastSuccessfulBackupTime_ = null; + if (lastSuccessfulBackupTimeBuilder_ != null) { + lastSuccessfulBackupTimeBuilder_.dispose(); + lastSuccessfulBackupTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastSuccessfulBackupTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetLastSuccessfulBackupTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupTimeOrBuilder() { + if (lastSuccessfulBackupTimeBuilder_ != null) { + return lastSuccessfulBackupTimeBuilder_.getMessageOrBuilder(); + } else { + return lastSuccessfulBackupTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp of the latest successful backup created via this
+     * backup rule.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLastSuccessfulBackupTimeFieldBuilder() { + if (lastSuccessfulBackupTimeBuilder_ == null) { + lastSuccessfulBackupTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastSuccessfulBackupTime(), getParentForChildren(), isClean()); + lastSuccessfulBackupTime_ = null; + } + return lastSuccessfulBackupTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupDrPlanRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupDrPlanRule) + private static final com.google.cloud.backupdr.v1beta.BackupDrPlanRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupDrPlanRule(); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrPlanRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupDrPlanRule 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.backupdr.v1beta.BackupDrPlanRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanRuleOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanRuleOrBuilder.java new file mode 100644 index 000000000000..237aeeccf03c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrPlanRuleOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupDrPlanRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupDrPlanRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Unique Id of the backup rule.
+   * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + java.lang.String getRuleId(); + + /** + * + * + *
+   * Output only. Unique Id of the backup rule.
+   * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + com.google.protobuf.ByteString getRuleIdBytes(); + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup rule.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupTime field is set. + */ + boolean hasLastSuccessfulBackupTime(); + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup rule.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupTime. + */ + com.google.protobuf.Timestamp getLastSuccessfulBackupTime(); + + /** + * + * + *
+   * Output only. Timestamp of the latest successful backup created via this
+   * backup rule.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupTimeOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrTemplateConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrTemplateConfig.java new file mode 100644 index 000000000000..69273620dc3e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrTemplateConfig.java @@ -0,0 +1,816 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Provides additional information about Google Cloud Backup and DR's Template
+ * backup configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupDrTemplateConfig} + */ +@com.google.protobuf.Generated +public final class BackupDrTemplateConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupDrTemplateConfig) + BackupDrTemplateConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupDrTemplateConfig"); + } + + // Use BackupDrTemplateConfig.newBuilder() to construct. + private BackupDrTemplateConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupDrTemplateConfig() { + firstPartyManagementUri_ = ""; + thirdPartyManagementUri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrTemplateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrTemplateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.class, + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.Builder.class); + } + + public static final int FIRST_PARTY_MANAGEMENT_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object firstPartyManagementUri_ = ""; + + /** + * + * + *
+   * Output only. The URI of the BackupDr template resource for the first party
+   * identity users.
+   * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyManagementUri. + */ + @java.lang.Override + public java.lang.String getFirstPartyManagementUri() { + java.lang.Object ref = firstPartyManagementUri_; + 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(); + firstPartyManagementUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The URI of the BackupDr template resource for the first party
+   * identity users.
+   * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyManagementUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirstPartyManagementUriBytes() { + java.lang.Object ref = firstPartyManagementUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firstPartyManagementUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THIRD_PARTY_MANAGEMENT_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object thirdPartyManagementUri_ = ""; + + /** + * + * + *
+   * Output only. The URI of the BackupDr template resource for the third party
+   * identity users.
+   * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyManagementUri. + */ + @java.lang.Override + public java.lang.String getThirdPartyManagementUri() { + java.lang.Object ref = thirdPartyManagementUri_; + 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(); + thirdPartyManagementUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The URI of the BackupDr template resource for the third party
+   * identity users.
+   * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyManagementUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getThirdPartyManagementUriBytes() { + java.lang.Object ref = thirdPartyManagementUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + thirdPartyManagementUri_ = 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.GeneratedMessage.isStringEmpty(firstPartyManagementUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, firstPartyManagementUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thirdPartyManagementUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, thirdPartyManagementUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(firstPartyManagementUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, firstPartyManagementUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thirdPartyManagementUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, thirdPartyManagementUri_); + } + 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.backupdr.v1beta.BackupDrTemplateConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig other = + (com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) obj; + + if (!getFirstPartyManagementUri().equals(other.getFirstPartyManagementUri())) return false; + if (!getThirdPartyManagementUri().equals(other.getThirdPartyManagementUri())) 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) + FIRST_PARTY_MANAGEMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getFirstPartyManagementUri().hashCode(); + hash = (37 * hash) + THIRD_PARTY_MANAGEMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyManagementUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig 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.backupdr.v1beta.BackupDrTemplateConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig 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.backupdr.v1beta.BackupDrTemplateConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupDrTemplateConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Provides additional information about Google Cloud Backup and DR's Template
+   * backup configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupDrTemplateConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupDrTemplateConfig) + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrTemplateConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrTemplateConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.class, + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + firstPartyManagementUri_ = ""; + thirdPartyManagementUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupDrTemplateConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig build() { + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig buildPartial() { + com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig result = + new com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.firstPartyManagementUri_ = firstPartyManagementUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.thirdPartyManagementUri_ = thirdPartyManagementUri_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig other) { + if (other == com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig.getDefaultInstance()) + return this; + if (!other.getFirstPartyManagementUri().isEmpty()) { + firstPartyManagementUri_ = other.firstPartyManagementUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getThirdPartyManagementUri().isEmpty()) { + thirdPartyManagementUri_ = other.thirdPartyManagementUri_; + bitField0_ |= 0x00000002; + 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: + { + firstPartyManagementUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + thirdPartyManagementUri_ = input.readStringRequireUtf8(); + 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 java.lang.Object firstPartyManagementUri_ = ""; + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the first party
+     * identity users.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyManagementUri. + */ + public java.lang.String getFirstPartyManagementUri() { + java.lang.Object ref = firstPartyManagementUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firstPartyManagementUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the first party
+     * identity users.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyManagementUri. + */ + public com.google.protobuf.ByteString getFirstPartyManagementUriBytes() { + java.lang.Object ref = firstPartyManagementUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firstPartyManagementUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the first party
+     * identity users.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The firstPartyManagementUri to set. + * @return This builder for chaining. + */ + public Builder setFirstPartyManagementUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + firstPartyManagementUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the first party
+     * identity users.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFirstPartyManagementUri() { + firstPartyManagementUri_ = getDefaultInstance().getFirstPartyManagementUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the first party
+     * identity users.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for firstPartyManagementUri to set. + * @return This builder for chaining. + */ + public Builder setFirstPartyManagementUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + firstPartyManagementUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object thirdPartyManagementUri_ = ""; + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the third party
+     * identity users.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyManagementUri. + */ + public java.lang.String getThirdPartyManagementUri() { + java.lang.Object ref = thirdPartyManagementUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + thirdPartyManagementUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the third party
+     * identity users.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyManagementUri. + */ + public com.google.protobuf.ByteString getThirdPartyManagementUriBytes() { + java.lang.Object ref = thirdPartyManagementUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + thirdPartyManagementUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the third party
+     * identity users.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The thirdPartyManagementUri to set. + * @return This builder for chaining. + */ + public Builder setThirdPartyManagementUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + thirdPartyManagementUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the third party
+     * identity users.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearThirdPartyManagementUri() { + thirdPartyManagementUri_ = getDefaultInstance().getThirdPartyManagementUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The URI of the BackupDr template resource for the third party
+     * identity users.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for thirdPartyManagementUri to set. + * @return This builder for chaining. + */ + public Builder setThirdPartyManagementUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + thirdPartyManagementUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupDrTemplateConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupDrTemplateConfig) + private static final com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig(); + } + + public static com.google.cloud.backupdr.v1beta.BackupDrTemplateConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupDrTemplateConfig 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.backupdr.v1beta.BackupDrTemplateConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrTemplateConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrTemplateConfigOrBuilder.java new file mode 100644 index 000000000000..d540f08321e2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupDrTemplateConfigOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupDrTemplateConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupDrTemplateConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The URI of the BackupDr template resource for the first party
+   * identity users.
+   * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyManagementUri. + */ + java.lang.String getFirstPartyManagementUri(); + + /** + * + * + *
+   * Output only. The URI of the BackupDr template resource for the first party
+   * identity users.
+   * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyManagementUri. + */ + com.google.protobuf.ByteString getFirstPartyManagementUriBytes(); + + /** + * + * + *
+   * Output only. The URI of the BackupDr template resource for the third party
+   * identity users.
+   * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyManagementUri. + */ + java.lang.String getThirdPartyManagementUri(); + + /** + * + * + *
+   * Output only. The URI of the BackupDr template resource for the third party
+   * identity users.
+   * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyManagementUri. + */ + com.google.protobuf.ByteString getThirdPartyManagementUriBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupGcpResource.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupGcpResource.java new file mode 100644 index 000000000000..89e8241bb523 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupGcpResource.java @@ -0,0 +1,981 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Minimum details to identify a Google Cloud resource for a backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupGcpResource} + */ +@com.google.protobuf.Generated +public final class BackupGcpResource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupGcpResource) + BackupGcpResourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupGcpResource"); + } + + // Use BackupGcpResource.newBuilder() to construct. + private BackupGcpResource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupGcpResource() { + gcpResourcename_ = ""; + location_ = ""; + type_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupGcpResource.class, + com.google.cloud.backupdr.v1beta.BackupGcpResource.Builder.class); + } + + public static final int GCP_RESOURCENAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcpResourcename_ = ""; + + /** + * + * + *
+   * Name of the Google Cloud resource.
+   * 
+ * + * string gcp_resourcename = 1; + * + * @return The gcpResourcename. + */ + @java.lang.Override + public java.lang.String getGcpResourcename() { + java.lang.Object ref = gcpResourcename_; + 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(); + gcpResourcename_ = s; + return s; + } + } + + /** + * + * + *
+   * Name of the Google Cloud resource.
+   * 
+ * + * string gcp_resourcename = 1; + * + * @return The bytes for gcpResourcename. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcpResourcenameBytes() { + java.lang.Object ref = gcpResourcename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpResourcename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * Type of the resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * Type of the resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = 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.GeneratedMessage.isStringEmpty(gcpResourcename_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, gcpResourcename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpResourcename_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, gcpResourcename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, type_); + } + 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.backupdr.v1beta.BackupGcpResource)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupGcpResource other = + (com.google.cloud.backupdr.v1beta.BackupGcpResource) obj; + + if (!getGcpResourcename().equals(other.getGcpResourcename())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getType().equals(other.getType())) 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) + GCP_RESOURCENAME_FIELD_NUMBER; + hash = (53 * hash) + getGcpResourcename().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource 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.backupdr.v1beta.BackupGcpResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource 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.backupdr.v1beta.BackupGcpResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupGcpResource 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Minimum details to identify a Google Cloud resource for a backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupGcpResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupGcpResource) + com.google.cloud.backupdr.v1beta.BackupGcpResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupGcpResource.class, + com.google.cloud.backupdr.v1beta.BackupGcpResource.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupGcpResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + gcpResourcename_ = ""; + location_ = ""; + type_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupGcpResource getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupGcpResource build() { + com.google.cloud.backupdr.v1beta.BackupGcpResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupGcpResource buildPartial() { + com.google.cloud.backupdr.v1beta.BackupGcpResource result = + new com.google.cloud.backupdr.v1beta.BackupGcpResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupGcpResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.gcpResourcename_ = gcpResourcename_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupGcpResource) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupGcpResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupGcpResource other) { + if (other == com.google.cloud.backupdr.v1beta.BackupGcpResource.getDefaultInstance()) + return this; + if (!other.getGcpResourcename().isEmpty()) { + gcpResourcename_ = other.gcpResourcename_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + 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: + { + gcpResourcename_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + type_ = 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 gcpResourcename_ = ""; + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @return The gcpResourcename. + */ + public java.lang.String getGcpResourcename() { + java.lang.Object ref = gcpResourcename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpResourcename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @return The bytes for gcpResourcename. + */ + public com.google.protobuf.ByteString getGcpResourcenameBytes() { + java.lang.Object ref = gcpResourcename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpResourcename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @param value The gcpResourcename to set. + * @return This builder for chaining. + */ + public Builder setGcpResourcename(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcpResourcename_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @return This builder for chaining. + */ + public Builder clearGcpResourcename() { + gcpResourcename_ = getDefaultInstance().getGcpResourcename(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @param value The bytes for gcpResourcename to set. + * @return This builder for chaining. + */ + public Builder setGcpResourcenameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcpResourcename_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupGcpResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupGcpResource) + private static final com.google.cloud.backupdr.v1beta.BackupGcpResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupGcpResource(); + } + + public static com.google.cloud.backupdr.v1beta.BackupGcpResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupGcpResource 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.backupdr.v1beta.BackupGcpResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupGcpResourceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupGcpResourceOrBuilder.java new file mode 100644 index 000000000000..9b45215565c5 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupGcpResourceOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupGcpResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupGcpResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Google Cloud resource.
+   * 
+ * + * string gcp_resourcename = 1; + * + * @return The gcpResourcename. + */ + java.lang.String getGcpResourcename(); + + /** + * + * + *
+   * Name of the Google Cloud resource.
+   * 
+ * + * string gcp_resourcename = 1; + * + * @return The bytes for gcpResourcename. + */ + com.google.protobuf.ByteString getGcpResourcenameBytes(); + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Type of the resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * Type of the resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLocation.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLocation.java new file mode 100644 index 000000000000..3ee7eb309508 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLocation.java @@ -0,0 +1,963 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupLocation represents a cloud location where a backup can be stored.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupLocation} + */ +@com.google.protobuf.Generated +public final class BackupLocation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupLocation) + BackupLocationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupLocation"); + } + + // Use BackupLocation.newBuilder() to construct. + private BackupLocation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupLocation() { + type_ = 0; + locationId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupLocation.class, + com.google.cloud.backupdr.v1beta.BackupLocation.Builder.class); + } + + /** + * + * + *
+   * The type of the location.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupLocation.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Location type is unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Location type is zonal.
+     * 
+ * + * ZONAL = 1; + */ + ZONAL(1), + /** + * + * + *
+     * Location type is regional.
+     * 
+ * + * REGIONAL = 2; + */ + REGIONAL(2), + /** + * + * + *
+     * Location type is multi regional.
+     * 
+ * + * MULTI_REGIONAL = 3; + */ + MULTI_REGIONAL(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+     * Location type is unspecified.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Location type is zonal.
+     * 
+ * + * ZONAL = 1; + */ + public static final int ZONAL_VALUE = 1; + + /** + * + * + *
+     * Location type is regional.
+     * 
+ * + * REGIONAL = 2; + */ + public static final int REGIONAL_VALUE = 2; + + /** + * + * + *
+     * Location type is multi regional.
+     * 
+ * + * MULTI_REGIONAL = 3; + */ + public static final int MULTI_REGIONAL_VALUE = 3; + + 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 ZONAL; + case 2: + return REGIONAL; + case 3: + return MULTI_REGIONAL; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupLocation.getDescriptor().getEnumTypes().get(0); + } + + 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.backupdr.v1beta.BackupLocation.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+   * Output only. The type of the location.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Output only. The type of the location.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLocation.Type getType() { + com.google.cloud.backupdr.v1beta.BackupLocation.Type result = + com.google.cloud.backupdr.v1beta.BackupLocation.Type.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupLocation.Type.UNRECOGNIZED + : result; + } + + public static final int LOCATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object locationId_ = ""; + + /** + * + * + *
+   * Output only. The id of the cloud location. Example: "us-central1"
+   * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The locationId. + */ + @java.lang.Override + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + 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(); + locationId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The id of the cloud location. Example: "us-central1"
+   * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for locationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = 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 (type_ + != com.google.cloud.backupdr.v1beta.BackupLocation.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(locationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, locationId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.backupdr.v1beta.BackupLocation.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(locationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, locationId_); + } + 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.backupdr.v1beta.BackupLocation)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupLocation other = + (com.google.cloud.backupdr.v1beta.BackupLocation) obj; + + if (type_ != other.type_) return false; + if (!getLocationId().equals(other.getLocationId())) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLocationId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation 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.backupdr.v1beta.BackupLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation 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.backupdr.v1beta.BackupLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupLocation 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupLocation represents a cloud location where a backup can be stored.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupLocation) + com.google.cloud.backupdr.v1beta.BackupLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupLocation.class, + com.google.cloud.backupdr.v1beta.BackupLocation.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupLocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + locationId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_BackupLocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLocation getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLocation build() { + com.google.cloud.backupdr.v1beta.BackupLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLocation buildPartial() { + com.google.cloud.backupdr.v1beta.BackupLocation result = + new com.google.cloud.backupdr.v1beta.BackupLocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupLocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.locationId_ = locationId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupLocation) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupLocation other) { + if (other == com.google.cloud.backupdr.v1beta.BackupLocation.getDefaultInstance()) + return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getLocationId().isEmpty()) { + locationId_ = other.locationId_; + bitField0_ |= 0x00000002; + 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 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + locationId_ = input.readStringRequireUtf8(); + 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 int type_ = 0; + + /** + * + * + *
+     * Output only. The type of the location.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Output only. The type of the location.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the location.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLocation.Type getType() { + com.google.cloud.backupdr.v1beta.BackupLocation.Type result = + com.google.cloud.backupdr.v1beta.BackupLocation.Type.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupLocation.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The type of the location.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.backupdr.v1beta.BackupLocation.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the location.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object locationId_ = ""; + + /** + * + * + *
+     * Output only. The id of the cloud location. Example: "us-central1"
+     * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The locationId. + */ + public java.lang.String getLocationId() { + java.lang.Object ref = locationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The id of the cloud location. Example: "us-central1"
+     * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for locationId. + */ + public com.google.protobuf.ByteString getLocationIdBytes() { + java.lang.Object ref = locationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + locationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The id of the cloud location. Example: "us-central1"
+     * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The id of the cloud location. Example: "us-central1"
+     * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLocationId() { + locationId_ = getDefaultInstance().getLocationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The id of the cloud location. Example: "us-central1"
+     * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for locationId to set. + * @return This builder for chaining. + */ + public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupLocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupLocation) + private static final com.google.cloud.backupdr.v1beta.BackupLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupLocation(); + } + + public static com.google.cloud.backupdr.v1beta.BackupLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupLocation 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.backupdr.v1beta.BackupLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLocationOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLocationOrBuilder.java new file mode 100644 index 000000000000..61759e3c2de1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLocationOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The type of the location.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Output only. The type of the location.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupLocation.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.backupdr.v1beta.BackupLocation.Type getType(); + + /** + * + * + *
+   * Output only. The id of the cloud location. Example: "us-central1"
+   * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The locationId. + */ + java.lang.String getLocationId(); + + /** + * + * + *
+   * Output only. The id of the cloud location. Example: "us-central1"
+   * 
+ * + * string location_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for locationId. + */ + com.google.protobuf.ByteString getLocationIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLock.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLock.java new file mode 100644 index 000000000000..0e3356b391be --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLock.java @@ -0,0 +1,1500 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupLock represents a single lock on a Backup resource.  An unexpired
+ * lock on a Backup prevents the Backup from being deleted.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupLock} + */ +@com.google.protobuf.Generated +public final class BackupLock extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupLock) + BackupLockOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupLock"); + } + + // Use BackupLock.newBuilder() to construct. + private BackupLock(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupLock() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupLock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupLock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupLock.class, + com.google.cloud.backupdr.v1beta.BackupLock.Builder.class); + } + + private int bitField0_; + private int clientLockInfoCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object clientLockInfo_; + + public enum ClientLockInfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BACKUP_APPLIANCE_LOCK_INFO(3), + SERVICE_LOCK_INFO(4), + CLIENTLOCKINFO_NOT_SET(0); + private final int value; + + private ClientLockInfoCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ClientLockInfoCase valueOf(int value) { + return forNumber(value); + } + + public static ClientLockInfoCase forNumber(int value) { + switch (value) { + case 3: + return BACKUP_APPLIANCE_LOCK_INFO; + case 4: + return SERVICE_LOCK_INFO; + case 0: + return CLIENTLOCKINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ClientLockInfoCase getClientLockInfoCase() { + return ClientLockInfoCase.forNumber(clientLockInfoCase_); + } + + public static final int BACKUP_APPLIANCE_LOCK_INFO_FIELD_NUMBER = 3; + + /** + * + * + *
+   * If the client is a backup and recovery appliance, this
+   * contains metadata about why the lock exists.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + * + * @return Whether the backupApplianceLockInfo field is set. + */ + @java.lang.Override + public boolean hasBackupApplianceLockInfo() { + return clientLockInfoCase_ == 3; + } + + /** + * + * + *
+   * If the client is a backup and recovery appliance, this
+   * contains metadata about why the lock exists.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + * + * @return The backupApplianceLockInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo getBackupApplianceLockInfo() { + if (clientLockInfoCase_ == 3) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) clientLockInfo_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance(); + } + + /** + * + * + *
+   * If the client is a backup and recovery appliance, this
+   * contains metadata about why the lock exists.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceLockInfoOrBuilder + getBackupApplianceLockInfoOrBuilder() { + if (clientLockInfoCase_ == 3) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) clientLockInfo_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance(); + } + + public static final int SERVICE_LOCK_INFO_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Output only. Contains metadata about the lock exist for Google Cloud
+   * native backups.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serviceLockInfo field is set. + */ + @java.lang.Override + public boolean hasServiceLockInfo() { + return clientLockInfoCase_ == 4; + } + + /** + * + * + *
+   * Output only. Contains metadata about the lock exist for Google Cloud
+   * native backups.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceLockInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceLockInfo getServiceLockInfo() { + if (clientLockInfoCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ServiceLockInfo) clientLockInfo_; + } + return com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Contains metadata about the lock exist for Google Cloud
+   * native backups.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceLockInfoOrBuilder getServiceLockInfoOrBuilder() { + if (clientLockInfoCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ServiceLockInfo) clientLockInfo_; + } + return com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance(); + } + + public static final int LOCK_UNTIL_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp lockUntilTime_; + + /** + * + * + *
+   * Required. The time after which this lock is not considered valid and will
+   * no longer protect the Backup from deletion.
+   * 
+ * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the lockUntilTime field is set. + */ + @java.lang.Override + public boolean hasLockUntilTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time after which this lock is not considered valid and will
+   * no longer protect the Backup from deletion.
+   * 
+ * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The lockUntilTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLockUntilTime() { + return lockUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lockUntilTime_; + } + + /** + * + * + *
+   * Required. The time after which this lock is not considered valid and will
+   * no longer protect the Backup from deletion.
+   * 
+ * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLockUntilTimeOrBuilder() { + return lockUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lockUntilTime_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getLockUntilTime()); + } + if (clientLockInfoCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) clientLockInfo_); + } + if (clientLockInfoCase_ == 4) { + output.writeMessage(4, (com.google.cloud.backupdr.v1beta.ServiceLockInfo) clientLockInfo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLockUntilTime()); + } + if (clientLockInfoCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) clientLockInfo_); + } + if (clientLockInfoCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.backupdr.v1beta.ServiceLockInfo) clientLockInfo_); + } + 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.backupdr.v1beta.BackupLock)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupLock other = + (com.google.cloud.backupdr.v1beta.BackupLock) obj; + + if (hasLockUntilTime() != other.hasLockUntilTime()) return false; + if (hasLockUntilTime()) { + if (!getLockUntilTime().equals(other.getLockUntilTime())) return false; + } + if (!getClientLockInfoCase().equals(other.getClientLockInfoCase())) return false; + switch (clientLockInfoCase_) { + case 3: + if (!getBackupApplianceLockInfo().equals(other.getBackupApplianceLockInfo())) return false; + break; + case 4: + if (!getServiceLockInfo().equals(other.getServiceLockInfo())) return false; + break; + case 0: + default: + } + 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 (hasLockUntilTime()) { + hash = (37 * hash) + LOCK_UNTIL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLockUntilTime().hashCode(); + } + switch (clientLockInfoCase_) { + case 3: + hash = (37 * hash) + BACKUP_APPLIANCE_LOCK_INFO_FIELD_NUMBER; + hash = (53 * hash) + getBackupApplianceLockInfo().hashCode(); + break; + case 4: + hash = (37 * hash) + SERVICE_LOCK_INFO_FIELD_NUMBER; + hash = (53 * hash) + getServiceLockInfo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupLock parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock 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.backupdr.v1beta.BackupLock parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock 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.backupdr.v1beta.BackupLock parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupLock 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupLock represents a single lock on a Backup resource.  An unexpired
+   * lock on a Backup prevents the Backup from being deleted.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupLock} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupLock) + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupLock_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupLock_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupLock.class, + com.google.cloud.backupdr.v1beta.BackupLock.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupLock.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLockUntilTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupApplianceLockInfoBuilder_ != null) { + backupApplianceLockInfoBuilder_.clear(); + } + if (serviceLockInfoBuilder_ != null) { + serviceLockInfoBuilder_.clear(); + } + lockUntilTime_ = null; + if (lockUntilTimeBuilder_ != null) { + lockUntilTimeBuilder_.dispose(); + lockUntilTimeBuilder_ = null; + } + clientLockInfoCase_ = 0; + clientLockInfo_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupLock_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLock getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupLock.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLock build() { + com.google.cloud.backupdr.v1beta.BackupLock result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupLock buildPartial() { + com.google.cloud.backupdr.v1beta.BackupLock result = + new com.google.cloud.backupdr.v1beta.BackupLock(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupLock result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lockUntilTime_ = + lockUntilTimeBuilder_ == null ? lockUntilTime_ : lockUntilTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.BackupLock result) { + result.clientLockInfoCase_ = clientLockInfoCase_; + result.clientLockInfo_ = this.clientLockInfo_; + if (clientLockInfoCase_ == 3 && backupApplianceLockInfoBuilder_ != null) { + result.clientLockInfo_ = backupApplianceLockInfoBuilder_.build(); + } + if (clientLockInfoCase_ == 4 && serviceLockInfoBuilder_ != null) { + result.clientLockInfo_ = serviceLockInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupLock) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupLock) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupLock other) { + if (other == com.google.cloud.backupdr.v1beta.BackupLock.getDefaultInstance()) return this; + if (other.hasLockUntilTime()) { + mergeLockUntilTime(other.getLockUntilTime()); + } + switch (other.getClientLockInfoCase()) { + case BACKUP_APPLIANCE_LOCK_INFO: + { + mergeBackupApplianceLockInfo(other.getBackupApplianceLockInfo()); + break; + } + case SERVICE_LOCK_INFO: + { + mergeServiceLockInfo(other.getServiceLockInfo()); + break; + } + case CLIENTLOCKINFO_NOT_SET: + { + break; + } + } + 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( + internalGetLockUntilTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 26: + { + input.readMessage( + internalGetBackupApplianceLockInfoFieldBuilder().getBuilder(), + extensionRegistry); + clientLockInfoCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetServiceLockInfoFieldBuilder().getBuilder(), extensionRegistry); + clientLockInfoCase_ = 4; + break; + } // case 34 + 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 clientLockInfoCase_ = 0; + private java.lang.Object clientLockInfo_; + + public ClientLockInfoCase getClientLockInfoCase() { + return ClientLockInfoCase.forNumber(clientLockInfoCase_); + } + + public Builder clearClientLockInfo() { + clientLockInfoCase_ = 0; + clientLockInfo_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo, + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfoOrBuilder> + backupApplianceLockInfoBuilder_; + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + * + * @return Whether the backupApplianceLockInfo field is set. + */ + @java.lang.Override + public boolean hasBackupApplianceLockInfo() { + return clientLockInfoCase_ == 3; + } + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + * + * @return The backupApplianceLockInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo getBackupApplianceLockInfo() { + if (backupApplianceLockInfoBuilder_ == null) { + if (clientLockInfoCase_ == 3) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) clientLockInfo_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance(); + } else { + if (clientLockInfoCase_ == 3) { + return backupApplianceLockInfoBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + public Builder setBackupApplianceLockInfo( + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo value) { + if (backupApplianceLockInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientLockInfo_ = value; + onChanged(); + } else { + backupApplianceLockInfoBuilder_.setMessage(value); + } + clientLockInfoCase_ = 3; + return this; + } + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + public Builder setBackupApplianceLockInfo( + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.Builder builderForValue) { + if (backupApplianceLockInfoBuilder_ == null) { + clientLockInfo_ = builderForValue.build(); + onChanged(); + } else { + backupApplianceLockInfoBuilder_.setMessage(builderForValue.build()); + } + clientLockInfoCase_ = 3; + return this; + } + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + public Builder mergeBackupApplianceLockInfo( + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo value) { + if (backupApplianceLockInfoBuilder_ == null) { + if (clientLockInfoCase_ == 3 + && clientLockInfo_ + != com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance()) { + clientLockInfo_ = + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.newBuilder( + (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) clientLockInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + clientLockInfo_ = value; + } + onChanged(); + } else { + if (clientLockInfoCase_ == 3) { + backupApplianceLockInfoBuilder_.mergeFrom(value); + } else { + backupApplianceLockInfoBuilder_.setMessage(value); + } + } + clientLockInfoCase_ = 3; + return this; + } + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + public Builder clearBackupApplianceLockInfo() { + if (backupApplianceLockInfoBuilder_ == null) { + if (clientLockInfoCase_ == 3) { + clientLockInfoCase_ = 0; + clientLockInfo_ = null; + onChanged(); + } + } else { + if (clientLockInfoCase_ == 3) { + clientLockInfoCase_ = 0; + clientLockInfo_ = null; + } + backupApplianceLockInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + public com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.Builder + getBackupApplianceLockInfoBuilder() { + return internalGetBackupApplianceLockInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupApplianceLockInfoOrBuilder + getBackupApplianceLockInfoOrBuilder() { + if ((clientLockInfoCase_ == 3) && (backupApplianceLockInfoBuilder_ != null)) { + return backupApplianceLockInfoBuilder_.getMessageOrBuilder(); + } else { + if (clientLockInfoCase_ == 3) { + return (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) clientLockInfo_; + } + return com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * If the client is a backup and recovery appliance, this
+     * contains metadata about why the lock exists.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo, + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfoOrBuilder> + internalGetBackupApplianceLockInfoFieldBuilder() { + if (backupApplianceLockInfoBuilder_ == null) { + if (!(clientLockInfoCase_ == 3)) { + clientLockInfo_ = + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.getDefaultInstance(); + } + backupApplianceLockInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo, + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo.Builder, + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfoOrBuilder>( + (com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo) clientLockInfo_, + getParentForChildren(), + isClean()); + clientLockInfo_ = null; + } + clientLockInfoCase_ = 3; + onChanged(); + return backupApplianceLockInfoBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceLockInfo, + com.google.cloud.backupdr.v1beta.ServiceLockInfo.Builder, + com.google.cloud.backupdr.v1beta.ServiceLockInfoOrBuilder> + serviceLockInfoBuilder_; + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serviceLockInfo field is set. + */ + @java.lang.Override + public boolean hasServiceLockInfo() { + return clientLockInfoCase_ == 4; + } + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceLockInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceLockInfo getServiceLockInfo() { + if (serviceLockInfoBuilder_ == null) { + if (clientLockInfoCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ServiceLockInfo) clientLockInfo_; + } + return com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance(); + } else { + if (clientLockInfoCase_ == 4) { + return serviceLockInfoBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServiceLockInfo(com.google.cloud.backupdr.v1beta.ServiceLockInfo value) { + if (serviceLockInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clientLockInfo_ = value; + onChanged(); + } else { + serviceLockInfoBuilder_.setMessage(value); + } + clientLockInfoCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServiceLockInfo( + com.google.cloud.backupdr.v1beta.ServiceLockInfo.Builder builderForValue) { + if (serviceLockInfoBuilder_ == null) { + clientLockInfo_ = builderForValue.build(); + onChanged(); + } else { + serviceLockInfoBuilder_.setMessage(builderForValue.build()); + } + clientLockInfoCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeServiceLockInfo(com.google.cloud.backupdr.v1beta.ServiceLockInfo value) { + if (serviceLockInfoBuilder_ == null) { + if (clientLockInfoCase_ == 4 + && clientLockInfo_ + != com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance()) { + clientLockInfo_ = + com.google.cloud.backupdr.v1beta.ServiceLockInfo.newBuilder( + (com.google.cloud.backupdr.v1beta.ServiceLockInfo) clientLockInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + clientLockInfo_ = value; + } + onChanged(); + } else { + if (clientLockInfoCase_ == 4) { + serviceLockInfoBuilder_.mergeFrom(value); + } else { + serviceLockInfoBuilder_.setMessage(value); + } + } + clientLockInfoCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearServiceLockInfo() { + if (serviceLockInfoBuilder_ == null) { + if (clientLockInfoCase_ == 4) { + clientLockInfoCase_ = 0; + clientLockInfo_ = null; + onChanged(); + } + } else { + if (clientLockInfoCase_ == 4) { + clientLockInfoCase_ = 0; + clientLockInfo_ = null; + } + serviceLockInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.ServiceLockInfo.Builder getServiceLockInfoBuilder() { + return internalGetServiceLockInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceLockInfoOrBuilder getServiceLockInfoOrBuilder() { + if ((clientLockInfoCase_ == 4) && (serviceLockInfoBuilder_ != null)) { + return serviceLockInfoBuilder_.getMessageOrBuilder(); + } else { + if (clientLockInfoCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ServiceLockInfo) clientLockInfo_; + } + return com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Contains metadata about the lock exist for Google Cloud
+     * native backups.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceLockInfo, + com.google.cloud.backupdr.v1beta.ServiceLockInfo.Builder, + com.google.cloud.backupdr.v1beta.ServiceLockInfoOrBuilder> + internalGetServiceLockInfoFieldBuilder() { + if (serviceLockInfoBuilder_ == null) { + if (!(clientLockInfoCase_ == 4)) { + clientLockInfo_ = com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance(); + } + serviceLockInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceLockInfo, + com.google.cloud.backupdr.v1beta.ServiceLockInfo.Builder, + com.google.cloud.backupdr.v1beta.ServiceLockInfoOrBuilder>( + (com.google.cloud.backupdr.v1beta.ServiceLockInfo) clientLockInfo_, + getParentForChildren(), + isClean()); + clientLockInfo_ = null; + } + clientLockInfoCase_ = 4; + onChanged(); + return serviceLockInfoBuilder_; + } + + private com.google.protobuf.Timestamp lockUntilTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lockUntilTimeBuilder_; + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the lockUntilTime field is set. + */ + public boolean hasLockUntilTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The lockUntilTime. + */ + public com.google.protobuf.Timestamp getLockUntilTime() { + if (lockUntilTimeBuilder_ == null) { + return lockUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lockUntilTime_; + } else { + return lockUntilTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLockUntilTime(com.google.protobuf.Timestamp value) { + if (lockUntilTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lockUntilTime_ = value; + } else { + lockUntilTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLockUntilTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lockUntilTimeBuilder_ == null) { + lockUntilTime_ = builderForValue.build(); + } else { + lockUntilTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLockUntilTime(com.google.protobuf.Timestamp value) { + if (lockUntilTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && lockUntilTime_ != null + && lockUntilTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLockUntilTimeBuilder().mergeFrom(value); + } else { + lockUntilTime_ = value; + } + } else { + lockUntilTimeBuilder_.mergeFrom(value); + } + if (lockUntilTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLockUntilTime() { + bitField0_ = (bitField0_ & ~0x00000004); + lockUntilTime_ = null; + if (lockUntilTimeBuilder_ != null) { + lockUntilTimeBuilder_.dispose(); + lockUntilTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getLockUntilTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLockUntilTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLockUntilTimeOrBuilder() { + if (lockUntilTimeBuilder_ != null) { + return lockUntilTimeBuilder_.getMessageOrBuilder(); + } else { + return lockUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lockUntilTime_; + } + } + + /** + * + * + *
+     * Required. The time after which this lock is not considered valid and will
+     * no longer protect the Backup from deletion.
+     * 
+ * + * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLockUntilTimeFieldBuilder() { + if (lockUntilTimeBuilder_ == null) { + lockUntilTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLockUntilTime(), getParentForChildren(), isClean()); + lockUntilTime_ = null; + } + return lockUntilTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupLock) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupLock) + private static final com.google.cloud.backupdr.v1beta.BackupLock DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupLock(); + } + + public static com.google.cloud.backupdr.v1beta.BackupLock getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupLock 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.backupdr.v1beta.BackupLock getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLockOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLockOrBuilder.java new file mode 100644 index 000000000000..e34f3a684d76 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupLockOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupLockOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupLock) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If the client is a backup and recovery appliance, this
+   * contains metadata about why the lock exists.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + * + * @return Whether the backupApplianceLockInfo field is set. + */ + boolean hasBackupApplianceLockInfo(); + + /** + * + * + *
+   * If the client is a backup and recovery appliance, this
+   * contains metadata about why the lock exists.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + * + * @return The backupApplianceLockInfo. + */ + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfo getBackupApplianceLockInfo(); + + /** + * + * + *
+   * If the client is a backup and recovery appliance, this
+   * contains metadata about why the lock exists.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupApplianceLockInfo backup_appliance_lock_info = 3; + * + */ + com.google.cloud.backupdr.v1beta.BackupApplianceLockInfoOrBuilder + getBackupApplianceLockInfoOrBuilder(); + + /** + * + * + *
+   * Output only. Contains metadata about the lock exist for Google Cloud
+   * native backups.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the serviceLockInfo field is set. + */ + boolean hasServiceLockInfo(); + + /** + * + * + *
+   * Output only. Contains metadata about the lock exist for Google Cloud
+   * native backups.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceLockInfo. + */ + com.google.cloud.backupdr.v1beta.ServiceLockInfo getServiceLockInfo(); + + /** + * + * + *
+   * Output only. Contains metadata about the lock exist for Google Cloud
+   * native backups.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ServiceLockInfo service_lock_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.ServiceLockInfoOrBuilder getServiceLockInfoOrBuilder(); + + /** + * + * + *
+   * Required. The time after which this lock is not considered valid and will
+   * no longer protect the Backup from deletion.
+   * 
+ * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the lockUntilTime field is set. + */ + boolean hasLockUntilTime(); + + /** + * + * + *
+   * Required. The time after which this lock is not considered valid and will
+   * no longer protect the Backup from deletion.
+   * 
+ * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The lockUntilTime. + */ + com.google.protobuf.Timestamp getLockUntilTime(); + + /** + * + * + *
+   * Required. The time after which this lock is not considered valid and will
+   * no longer protect the Backup from deletion.
+   * 
+ * + * .google.protobuf.Timestamp lock_until_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getLockUntilTimeOrBuilder(); + + com.google.cloud.backupdr.v1beta.BackupLock.ClientLockInfoCase getClientLockInfoCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupName.java new file mode 100644 index 000000000000..f23098c0c9e2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupName.java @@ -0,0 +1,301 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class BackupName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUPVAULT_DATASOURCE_BACKUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String backupvault; + private final String datasource; + private final String backup; + + @Deprecated + protected BackupName() { + project = null; + location = null; + backupvault = null; + datasource = null; + backup = null; + } + + private BackupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + backupvault = Preconditions.checkNotNull(builder.getBackupvault()); + datasource = Preconditions.checkNotNull(builder.getDatasource()); + backup = Preconditions.checkNotNull(builder.getBackup()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupvault() { + return backupvault; + } + + public String getDatasource() { + return datasource; + } + + 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 datasource, String backup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupvault(backupvault) + .setDatasource(datasource) + .setBackup(backup) + .build(); + } + + public static String format( + String project, String location, String backupvault, String datasource, String backup) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupvault(backupvault) + .setDatasource(datasource) + .setBackup(backup) + .build() + .toString(); + } + + public static @Nullable BackupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUPVAULT_DATASOURCE_BACKUP.validatedMatch( + formattedString, "BackupName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("backupvault"), + matchMap.get("datasource"), + 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<@Nullable BackupName> 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_BACKUPVAULT_DATASOURCE_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("backupvault", backupvault); + } + if (datasource != null) { + fieldMapBuilder.put("datasource", datasource); + } + 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_BACKUPVAULT_DATASOURCE_BACKUP.instantiate( + "project", + project, + "location", + location, + "backupvault", + backupvault, + "datasource", + datasource, + "backup", + backup); + } + + @Override + public boolean equals(@Nullable 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.datasource, that.datasource) + && 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(datasource); + h *= 1000003; + h ^= Objects.hashCode(backup); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}. + */ + public static class Builder { + private String project; + private String location; + private String backupvault; + private String datasource; + private String backup; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupvault() { + return backupvault; + } + + public String getDatasource() { + return datasource; + } + + 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 setDatasource(String datasource) { + this.datasource = datasource; + 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.datasource = backupName.datasource; + this.backup = backupName.backup; + } + + public BackupName build() { + return new BackupName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupOrBuilder.java new file mode 100644 index 000000000000..547d39db5ae4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupOrBuilder.java @@ -0,0 +1,1137 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.Backup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Compute Engine specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the computeInstanceBackupProperties field is set. + */ + boolean hasComputeInstanceBackupProperties(); + + /** + * + * + *
+   * Output only. Compute Engine specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The computeInstanceBackupProperties. + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + getComputeInstanceBackupProperties(); + + /** + * + * + *
+   * Output only. Compute Engine specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties compute_instance_backup_properties = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPropertiesOrBuilder + getComputeInstanceBackupPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. Cloud SQL specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceBackupProperties field is set. + */ + boolean hasCloudSqlInstanceBackupProperties(); + + /** + * + * + *
+   * Output only. Cloud SQL specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceBackupProperties. + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + getCloudSqlInstanceBackupProperties(); + + /** + * + * + *
+   * Output only. Cloud SQL specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPropertiesOrBuilder + getCloudSqlInstanceBackupPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. Backup Appliance specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupApplianceBackupProperties field is set. + */ + boolean hasBackupApplianceBackupProperties(); + + /** + * + * + *
+   * Output only. Backup Appliance specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupApplianceBackupProperties. + */ + com.google.cloud.backupdr.v1beta.BackupApplianceBackupProperties + getBackupApplianceBackupProperties(); + + /** + * + * + *
+   * Output only. Backup Appliance specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupApplianceBackupProperties backup_appliance_backup_properties = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupApplianceBackupPropertiesOrBuilder + getBackupApplianceBackupPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. AlloyDB specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbBackupProperties field is set. + */ + boolean hasAlloyDbBackupProperties(); + + /** + * + * + *
+   * Output only. AlloyDB specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbBackupProperties. + */ + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties getAlloyDbBackupProperties(); + + /** + * + * + *
+   * Output only. AlloyDB specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.AlloyDbClusterBackupPropertiesOrBuilder + getAlloyDbBackupPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. Disk specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the diskBackupProperties field is set. + */ + boolean hasDiskBackupProperties(); + + /** + * + * + *
+   * Output only. Disk specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The diskBackupProperties. + */ + com.google.cloud.backupdr.v1beta.DiskBackupProperties getDiskBackupProperties(); + + /** + * + * + *
+   * Output only. Disk specific backup properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupProperties disk_backup_properties = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.DiskBackupPropertiesOrBuilder getDiskBackupPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. Configuration for a Google Cloud resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcpBackupPlanInfo field is set. + */ + boolean hasGcpBackupPlanInfo(); + + /** + * + * + *
+   * Output only. Configuration for a Google Cloud resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcpBackupPlanInfo. + */ + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo getGcpBackupPlanInfo(); + + /** + * + * + *
+   * Output only. Configuration for a Google Cloud resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfo gcp_backup_plan_info = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.Backup.GCPBackupPlanInfoOrBuilder + getGcpBackupPlanInfoOrBuilder(); + + /** + * + * + *
+   * Output only. Unique identifier of the GCP resource that is being backed
+   * up.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gcpResource field is set. + */ + boolean hasGcpResource(); + + /** + * + * + *
+   * Output only. Unique identifier of the GCP resource that is being backed
+   * up.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gcpResource. + */ + com.google.cloud.backupdr.v1beta.BackupGcpResource getGcpResource(); + + /** + * + * + *
+   * Output only. Unique identifier of the GCP resource that is being backed
+   * up.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupGcpResource gcp_resource = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupGcpResourceOrBuilder getGcpResourceOrBuilder(); + + /** + * + * + *
+   * Output only. Identifier. Name of the backup to create. It must have the
+   * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+   * `{backup}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the datasource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Identifier. Name of the backup to create. It must have the
+   * format`"projects/<project>/locations/<location>/backupVaults/<backupvault>/dataSources/{datasource}/backups/{backup}"`.
+   * `{backup}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the datasource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The description of the Backup instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the description field is set. + */ + boolean hasDescription(); + + /** + * + * + *
+   * Output only. The description of the Backup instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Output only. The description of the Backup instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The backup can not be deleted before this time.
+   * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enforcedRetentionEndTime field is set. + */ + boolean hasEnforcedRetentionEndTime(); + + /** + * + * + *
+   * Optional. The backup can not be deleted before this time.
+   * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enforcedRetentionEndTime. + */ + com.google.protobuf.Timestamp getEnforcedRetentionEndTime(); + + /** + * + * + *
+   * Optional. The backup can not be deleted before this time.
+   * 
+ * + * + * optional .google.protobuf.Timestamp enforced_retention_end_time = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getEnforcedRetentionEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Setting for how the enforced retention end time is inherited.
+   * This value is copied from this backup's BackupVault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupRetentionInheritance field is set. + */ + boolean hasBackupRetentionInheritance(); + + /** + * + * + *
+   * Output only. Setting for how the enforced retention end time is inherited.
+   * This value is copied from this backup's BackupVault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backupRetentionInheritance. + */ + int getBackupRetentionInheritanceValue(); + + /** + * + * + *
+   * Output only. Setting for how the enforced retention end time is inherited.
+   * This value is copied from this backup's BackupVault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupRetentionInheritance. + */ + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance + getBackupRetentionInheritance(); + + /** + * + * + *
+   * Optional. When this backup is automatically expired.
+   * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + + /** + * + * + *
+   * Optional. When this backup is automatically expired.
+   * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + + /** + * + * + *
+   * Optional. When this backup is automatically expired.
+   * 
+ * + * + * optional .google.protobuf.Timestamp expire_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The point in time when this backup was captured from the
+   * source.
+   * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the consistencyTime field is set. + */ + boolean hasConsistencyTime(); + + /** + * + * + *
+   * Output only. The point in time when this backup was captured from the
+   * source.
+   * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The consistencyTime. + */ + com.google.protobuf.Timestamp getConsistencyTime(); + + /** + * + * + *
+   * Output only. The point in time when this backup was captured from the
+   * source.
+   * 
+ * + * + * optional .google.protobuf.Timestamp consistency_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getConsistencyTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Server specified ETag to prevent updates from overwriting each
+   * other.
+   * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the etag field is set. + */ + boolean hasEtag(); + + /** + * + * + *
+   * Optional. Server specified ETag to prevent updates from overwriting each
+   * other.
+   * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. Server specified ETag to prevent updates from overwriting each
+   * other.
+   * 
+ * + * optional string etag = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. The Backup resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The Backup resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.Backup.State getState(); + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getServiceLocksList(); + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupLock getServiceLocks(int index); + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getServiceLocksCount(); + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getServiceLocksOrBuilderList(); + + /** + * + * + *
+   * Output only. The list of BackupLocks taken by the service to prevent the
+   * deletion of the backup.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock service_locks = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder getServiceLocksOrBuilder(int index); + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getBackupApplianceLocksList(); + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.BackupLock getBackupApplianceLocks(int index); + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getBackupApplianceLocksCount(); + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getBackupApplianceLocksOrBuilderList(); + + /** + * + * + *
+   * Optional. The list of BackupLocks taken by the accessor Backup Appliance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupLock backup_appliance_locks = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.BackupLockOrBuilder getBackupApplianceLocksOrBuilder(int index); + + /** + * + * + *
+   * Output only. Type of the backup, unspecified, scheduled or ondemand.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backupType. + */ + int getBackupTypeValue(); + + /** + * + * + *
+   * Output only. Type of the backup, unspecified, scheduled or ondemand.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup.BackupType backup_type = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupType. + */ + com.google.cloud.backupdr.v1beta.Backup.BackupType getBackupType(); + + /** + * + * + *
+   * Output only. source resource size in bytes at the time of the backup.
+   * 
+ * + * int64 resource_size_bytes = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resourceSizeBytes. + */ + long getResourceSizeBytes(); + + /** + * + * + *
+   * Optional. Output only. Reserved for future use.
+   * 
+ * + * + * optional bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the satisfiesPzs field is set. + */ + boolean hasSatisfiesPzs(); + + /** + * + * + *
+   * Optional. Output only. Reserved for future use.
+   * 
+ * + * + * optional bool satisfies_pzs = 24 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The satisfiesPzs. + */ + boolean getSatisfiesPzs(); + + /** + * + * + *
+   * Optional. Output only. Reserved for future use.
+   * 
+ * + * + * optional bool satisfies_pzi = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the satisfiesPzi field is set. + */ + boolean hasSatisfiesPzi(); + + /** + * + * + *
+   * Optional. Output only. Reserved for future use.
+   * 
+ * + * + * optional bool satisfies_pzi = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The satisfiesPzi. + */ + boolean getSatisfiesPzi(); + + /** + * + * + *
+   * Optional. Output only. The list of KMS key versions used to encrypt the
+   * backup.
+   * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the kmsKeyVersions. + */ + java.util.List getKmsKeyVersionsList(); + + /** + * + * + *
+   * Optional. Output only. The list of KMS key versions used to encrypt the
+   * backup.
+   * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of kmsKeyVersions. + */ + int getKmsKeyVersionsCount(); + + /** + * + * + *
+   * Optional. Output only. The list of KMS key versions used to encrypt the
+   * backup.
+   * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The kmsKeyVersions at the given index. + */ + java.lang.String getKmsKeyVersions(int index); + + /** + * + * + *
+   * Optional. Output only. The list of KMS key versions used to encrypt the
+   * backup.
+   * 
+ * + * + * repeated string kms_key_versions = 33 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the kmsKeyVersions at the given index. + */ + com.google.protobuf.ByteString getKmsKeyVersionsBytes(int index); + + com.google.cloud.backupdr.v1beta.Backup.BackupPropertiesCase getBackupPropertiesCase(); + + com.google.cloud.backupdr.v1beta.Backup.PlanInfoCase getPlanInfoCase(); + + com.google.cloud.backupdr.v1beta.Backup.SourceResourceCase getSourceResourceCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlan.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlan.java new file mode 100644 index 000000000000..24b81b0a0a65 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlan.java @@ -0,0 +1,5429 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A `BackupPlan` specifies some common fields, such as `description` as well
+ * as one or more `BackupRule` messages. Each `BackupRule` has a retention
+ * policy and defines a schedule by which the system is to perform backup
+ * workloads.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupPlan} + */ +@com.google.protobuf.Generated +public final class BackupPlan extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupPlan) + BackupPlanOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupPlan"); + } + + // Use BackupPlan.newBuilder() to construct. + private BackupPlan(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupPlan() { + name_ = ""; + description_ = ""; + backupRules_ = java.util.Collections.emptyList(); + state_ = 0; + resourceType_ = ""; + etag_ = ""; + backupVault_ = ""; + backupVaultServiceAccount_ = ""; + supportedResourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + revisionId_ = ""; + revisionName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlan_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupPlan.class, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder.class); + } + + /** + * + * + *
+   * `State` enumerates the possible states for a `BackupPlan`.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupPlan.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The resource is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The resource has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The resource is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * The resource has been created but is not usable.
+     * 
+ * + * INACTIVE = 4; + */ + INACTIVE(4), + /** + * + * + *
+     * The resource is being updated.
+     * 
+ * + * UPDATING = 5; + */ + UPDATING(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The resource is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The resource has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The resource is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + /** + * + * + *
+     * The resource has been created but is not usable.
+     * 
+ * + * INACTIVE = 4; + */ + public static final int INACTIVE_VALUE = 4; + + /** + * + * + *
+     * The resource 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 ACTIVE; + case 3: + return DELETING; + case 4: + return INACTIVE; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlan.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.backupdr.v1beta.BackupPlan.State) + } + + private int bitField0_; + private int resourcePropertiesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object resourceProperties_; + + public enum ResourcePropertiesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DISK_BACKUP_PLAN_PROPERTIES(19), + COMPUTE_INSTANCE_BACKUP_PLAN_PROPERTIES(20), + RESOURCEPROPERTIES_NOT_SET(0); + private final int value; + + private ResourcePropertiesCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourcePropertiesCase valueOf(int value) { + return forNumber(value); + } + + public static ResourcePropertiesCase forNumber(int value) { + switch (value) { + case 19: + return DISK_BACKUP_PLAN_PROPERTIES; + case 20: + return COMPUTE_INSTANCE_BACKUP_PLAN_PROPERTIES; + case 0: + return RESOURCEPROPERTIES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourcePropertiesCase getResourcePropertiesCase() { + return ResourcePropertiesCase.forNumber(resourcePropertiesCase_); + } + + public static final int DISK_BACKUP_PLAN_PROPERTIES_FIELD_NUMBER = 19; + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of disk-based
+   * resources, such as Compute Engine Persistent Disks. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskBackupPlanProperties field is set. + */ + @java.lang.Override + public boolean hasDiskBackupPlanProperties() { + return resourcePropertiesCase_ == 19; + } + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of disk-based
+   * resources, such as Compute Engine Persistent Disks. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskBackupPlanProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties getDiskBackupPlanProperties() { + if (resourcePropertiesCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of disk-based
+   * resources, such as Compute Engine Persistent Disks. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPlanPropertiesOrBuilder + getDiskBackupPlanPropertiesOrBuilder() { + if (resourcePropertiesCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance(); + } + + public static final int COMPUTE_INSTANCE_BACKUP_PLAN_PROPERTIES_FIELD_NUMBER = 20; + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of compute
+   * instance based resources, such as Compute Engine Instances. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the computeInstanceBackupPlanProperties field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceBackupPlanProperties() { + return resourcePropertiesCase_ == 20; + } + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of compute
+   * instance based resources, such as Compute Engine Instances. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The computeInstanceBackupPlanProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + getComputeInstanceBackupPlanProperties() { + if (resourcePropertiesCase_ == 20) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of compute
+   * instance based resources, such as Compute Engine Instances. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanPropertiesOrBuilder + getComputeInstanceBackupPlanPropertiesOrBuilder() { + if (resourcePropertiesCase_ == 20) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Identifier. The resource name of the `BackupPlan`.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Identifier. The resource name of the `BackupPlan`.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the `BackupPlan` resource.
+   *
+   * The description allows for additional details about `BackupPlan` and its
+   * use cases to be provided. An example description is the following:  "This
+   * is a backup plan that performs a daily backup at 6pm and retains data for 3
+   * months". The description must be at most 2048 characters.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The description of the `BackupPlan` resource.
+   *
+   * The description allows for additional details about `BackupPlan` and its
+   * use cases to be provided. An example description is the following:  "This
+   * is a backup plan that performs a daily backup at 6pm and retains data for 3
+   * months". The description must be at most 2048 characters.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlan_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(); + } + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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 CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. When the `BackupPlan` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. When the `BackupPlan` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.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. When the `BackupPlan` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.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 UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. When the `BackupPlan` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. When the `BackupPlan` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. When the `BackupPlan` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int BACKUP_RULES_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List backupRules_; + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getBackupRulesList() { + return backupRules_; + } + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getBackupRulesOrBuilderList() { + return backupRules_; + } + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getBackupRulesCount() { + return backupRules_.size(); + } + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupRule getBackupRules(int index) { + return backupRules_.get(index); + } + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupRuleOrBuilder getBackupRulesOrBuilder(int index) { + return backupRules_.get(index); + } + + public static final int MAX_CUSTOM_ON_DEMAND_RETENTION_DAYS_FIELD_NUMBER = 18; + private int maxCustomOnDemandRetentionDays_ = 0; + + /** + * + * + *
+   * Optional. Optional field to configure the maximum number of days for which
+   * a backup can be retained. This field is only applicable for on-demand
+   * backups taken with custom retention value.
+   * 
+ * + * int32 max_custom_on_demand_retention_days = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maxCustomOnDemandRetentionDays. + */ + @java.lang.Override + public int getMaxCustomOnDemandRetentionDays() { + return maxCustomOnDemandRetentionDays_; + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The `State` for the `BackupPlan`.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.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 `State` for the `BackupPlan`.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan.State getState() { + com.google.cloud.backupdr.v1beta.BackupPlan.State result = + com.google.cloud.backupdr.v1beta.BackupPlan.State.forNumber(state_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupPlan.State.UNRECOGNIZED : result; + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + + /** + * + * + *
+   * Required. The resource type to which the `BackupPlan` will be applied.
+   * Examples include, "compute.googleapis.com/Instance",
+   * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+   * "compute.googleapis.com/Disk".
+   * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource type to which the `BackupPlan` will be applied.
+   * Examples include, "compute.googleapis.com/Instance",
+   * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+   * "compute.googleapis.com/Disk".
+   * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. `etag` is returned from the service in the response. As a user of
+   * the service, you may provide an etag value in this field to prevent stale
+   * resources.
+   * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. `etag` is returned from the service in the response. As a user of
+   * the service, you may provide an etag value in this field to prevent stale
+   * resources.
+   * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_VAULT_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupVault_ = ""; + + /** + * + * + *
+   * Required. Resource name of backup vault which will be used as storage
+   * location for backups. Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupvault}
+   * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.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; + } + } + + /** + * + * + *
+   * Required. Resource name of backup vault which will be used as storage
+   * location for backups. Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupvault}
+   * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.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 BACKUP_VAULT_SERVICE_ACCOUNT_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupVaultServiceAccount_ = ""; + + /** + * + * + *
+   * Output only. The Google Cloud service account to be used by the BackupVault
+   * for taking backups. Specify the email address of the Backup Vault Service
+   * Account.
+   * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupVaultServiceAccount. + */ + @java.lang.Override + public java.lang.String getBackupVaultServiceAccount() { + java.lang.Object ref = backupVaultServiceAccount_; + 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(); + backupVaultServiceAccount_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google Cloud service account to be used by the BackupVault
+   * for taking backups. Specify the email address of the Backup Vault Service
+   * Account.
+   * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupVaultServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupVaultServiceAccountBytes() { + java.lang.Object ref = backupVaultServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupVaultServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOG_RETENTION_DAYS_FIELD_NUMBER = 12; + private long logRetentionDays_ = 0L; + + /** + * + * + *
+   * Optional. Applicable only for Cloud SQL resource_type.
+   *
+   * Configures how long logs will be stored. It is defined in “days”. This
+   * value should be greater than or equal to minimum enforced log retention
+   * duration of the backup vault.
+   * 
+ * + * int64 log_retention_days = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The logRetentionDays. + */ + @java.lang.Override + public long getLogRetentionDays() { + return logRetentionDays_; + } + + public static final int SUPPORTED_RESOURCE_TYPES_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList supportedResourceTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. All resource types to which backupPlan can be applied.
+   * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedResourceTypes. + */ + public com.google.protobuf.ProtocolStringList getSupportedResourceTypesList() { + return supportedResourceTypes_; + } + + /** + * + * + *
+   * Output only. All resource types to which backupPlan can be applied.
+   * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedResourceTypes. + */ + public int getSupportedResourceTypesCount() { + return supportedResourceTypes_.size(); + } + + /** + * + * + *
+   * Output only. All resource types to which backupPlan can be applied.
+   * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedResourceTypes at the given index. + */ + public java.lang.String getSupportedResourceTypes(int index) { + return supportedResourceTypes_.get(index); + } + + /** + * + * + *
+   * Output only. All resource types to which backupPlan can be applied.
+   * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedResourceTypes at the given index. + */ + public com.google.protobuf.ByteString getSupportedResourceTypesBytes(int index) { + return supportedResourceTypes_.getByteString(index); + } + + public static final int REVISION_ID_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object revisionId_ = ""; + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + 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(); + revisionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVISION_NAME_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object revisionName_ = ""; + + /** + * + * + *
+   * Output only. The resource id of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+   * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionName. + */ + @java.lang.Override + public java.lang.String getRevisionName() { + java.lang.Object ref = revisionName_; + 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(); + revisionName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource id of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+   * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRevisionNameBytes() { + java.lang.Object ref = revisionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionName_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + for (int i = 0; i < backupRules_.size(); i++) { + output.writeMessage(6, backupRules_.get(i)); + } + if (state_ != com.google.cloud.backupdr.v1beta.BackupPlan.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, resourceType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVault_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, backupVault_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVaultServiceAccount_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, backupVaultServiceAccount_); + } + if (logRetentionDays_ != 0L) { + output.writeInt64(12, logRetentionDays_); + } + for (int i = 0; i < supportedResourceTypes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 13, supportedResourceTypes_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, revisionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, revisionName_); + } + if (maxCustomOnDemandRetentionDays_ != 0) { + output.writeInt32(18, maxCustomOnDemandRetentionDays_); + } + if (resourcePropertiesCase_ == 19) { + output.writeMessage( + 19, (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) resourceProperties_); + } + if (resourcePropertiesCase_ == 20) { + output.writeMessage( + 20, + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + resourceProperties_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, 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(3, labels__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + for (int i = 0; i < backupRules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, backupRules_.get(i)); + } + if (state_ != com.google.cloud.backupdr.v1beta.BackupPlan.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, resourceType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVault_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, backupVault_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVaultServiceAccount_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(11, backupVaultServiceAccount_); + } + if (logRetentionDays_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(12, logRetentionDays_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedResourceTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(supportedResourceTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getSupportedResourceTypesList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, revisionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(15, revisionName_); + } + if (maxCustomOnDemandRetentionDays_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 18, maxCustomOnDemandRetentionDays_); + } + if (resourcePropertiesCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) resourceProperties_); + } + if (resourcePropertiesCase_ == 20) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + resourceProperties_); + } + 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.backupdr.v1beta.BackupPlan)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupPlan other = + (com.google.cloud.backupdr.v1beta.BackupPlan) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getBackupRulesList().equals(other.getBackupRulesList())) return false; + if (getMaxCustomOnDemandRetentionDays() != other.getMaxCustomOnDemandRetentionDays()) + return false; + if (state_ != other.state_) return false; + if (!getResourceType().equals(other.getResourceType())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getBackupVault().equals(other.getBackupVault())) return false; + if (!getBackupVaultServiceAccount().equals(other.getBackupVaultServiceAccount())) return false; + if (getLogRetentionDays() != other.getLogRetentionDays()) return false; + if (!getSupportedResourceTypesList().equals(other.getSupportedResourceTypesList())) + return false; + if (!getRevisionId().equals(other.getRevisionId())) return false; + if (!getRevisionName().equals(other.getRevisionName())) return false; + if (!getResourcePropertiesCase().equals(other.getResourcePropertiesCase())) return false; + switch (resourcePropertiesCase_) { + case 19: + if (!getDiskBackupPlanProperties().equals(other.getDiskBackupPlanProperties())) + return false; + break; + case 20: + if (!getComputeInstanceBackupPlanProperties() + .equals(other.getComputeInstanceBackupPlanProperties())) return false; + break; + case 0: + default: + } + 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getBackupRulesCount() > 0) { + hash = (37 * hash) + BACKUP_RULES_FIELD_NUMBER; + hash = (53 * hash) + getBackupRulesList().hashCode(); + } + hash = (37 * hash) + MAX_CUSTOM_ON_DEMAND_RETENTION_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getMaxCustomOnDemandRetentionDays(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + BACKUP_VAULT_FIELD_NUMBER; + hash = (53 * hash) + getBackupVault().hashCode(); + hash = (37 * hash) + BACKUP_VAULT_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getBackupVaultServiceAccount().hashCode(); + hash = (37 * hash) + LOG_RETENTION_DAYS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLogRetentionDays()); + if (getSupportedResourceTypesCount() > 0) { + hash = (37 * hash) + SUPPORTED_RESOURCE_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getSupportedResourceTypesList().hashCode(); + } + hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + hash = (37 * hash) + REVISION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRevisionName().hashCode(); + switch (resourcePropertiesCase_) { + case 19: + hash = (37 * hash) + DISK_BACKUP_PLAN_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getDiskBackupPlanProperties().hashCode(); + break; + case 20: + hash = (37 * hash) + COMPUTE_INSTANCE_BACKUP_PLAN_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getComputeInstanceBackupPlanProperties().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan 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.backupdr.v1beta.BackupPlan parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan 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.backupdr.v1beta.BackupPlan parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupPlan 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A `BackupPlan` specifies some common fields, such as `description` as well
+   * as one or more `BackupRule` messages. Each `BackupRule` has a retention
+   * policy and defines a schedule by which the system is to perform backup
+   * workloads.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupPlan} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupPlan) + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlan_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupPlan.class, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupPlan.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetBackupRulesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (diskBackupPlanPropertiesBuilder_ != null) { + diskBackupPlanPropertiesBuilder_.clear(); + } + if (computeInstanceBackupPlanPropertiesBuilder_ != null) { + computeInstanceBackupPlanPropertiesBuilder_.clear(); + } + name_ = ""; + description_ = ""; + internalGetMutableLabels().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + if (backupRulesBuilder_ == null) { + backupRules_ = java.util.Collections.emptyList(); + } else { + backupRules_ = null; + backupRulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + maxCustomOnDemandRetentionDays_ = 0; + state_ = 0; + resourceType_ = ""; + etag_ = ""; + backupVault_ = ""; + backupVaultServiceAccount_ = ""; + logRetentionDays_ = 0L; + supportedResourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + revisionId_ = ""; + revisionName_ = ""; + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlan_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan build() { + com.google.cloud.backupdr.v1beta.BackupPlan result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan buildPartial() { + com.google.cloud.backupdr.v1beta.BackupPlan result = + new com.google.cloud.backupdr.v1beta.BackupPlan(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.backupdr.v1beta.BackupPlan result) { + if (backupRulesBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + backupRules_ = java.util.Collections.unmodifiableList(backupRules_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.backupRules_ = backupRules_; + } else { + result.backupRules_ = backupRulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupPlan result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.maxCustomOnDemandRetentionDays_ = maxCustomOnDemandRetentionDays_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.backupVault_ = backupVault_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.backupVaultServiceAccount_ = backupVaultServiceAccount_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.logRetentionDays_ = logRetentionDays_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + supportedResourceTypes_.makeImmutable(); + result.supportedResourceTypes_ = supportedResourceTypes_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.revisionId_ = revisionId_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.revisionName_ = revisionName_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.BackupPlan result) { + result.resourcePropertiesCase_ = resourcePropertiesCase_; + result.resourceProperties_ = this.resourceProperties_; + if (resourcePropertiesCase_ == 19 && diskBackupPlanPropertiesBuilder_ != null) { + result.resourceProperties_ = diskBackupPlanPropertiesBuilder_.build(); + } + if (resourcePropertiesCase_ == 20 && computeInstanceBackupPlanPropertiesBuilder_ != null) { + result.resourceProperties_ = computeInstanceBackupPlanPropertiesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupPlan) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupPlan) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupPlan other) { + if (other == com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (backupRulesBuilder_ == null) { + if (!other.backupRules_.isEmpty()) { + if (backupRules_.isEmpty()) { + backupRules_ = other.backupRules_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureBackupRulesIsMutable(); + backupRules_.addAll(other.backupRules_); + } + onChanged(); + } + } else { + if (!other.backupRules_.isEmpty()) { + if (backupRulesBuilder_.isEmpty()) { + backupRulesBuilder_.dispose(); + backupRulesBuilder_ = null; + backupRules_ = other.backupRules_; + bitField0_ = (bitField0_ & ~0x00000080); + backupRulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupRulesFieldBuilder() + : null; + } else { + backupRulesBuilder_.addAllMessages(other.backupRules_); + } + } + } + if (other.getMaxCustomOnDemandRetentionDays() != 0) { + setMaxCustomOnDemandRetentionDays(other.getMaxCustomOnDemandRetentionDays()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getBackupVault().isEmpty()) { + backupVault_ = other.backupVault_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getBackupVaultServiceAccount().isEmpty()) { + backupVaultServiceAccount_ = other.backupVaultServiceAccount_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getLogRetentionDays() != 0L) { + setLogRetentionDays(other.getLogRetentionDays()); + } + if (!other.supportedResourceTypes_.isEmpty()) { + if (supportedResourceTypes_.isEmpty()) { + supportedResourceTypes_ = other.supportedResourceTypes_; + bitField0_ |= 0x00008000; + } else { + ensureSupportedResourceTypesIsMutable(); + supportedResourceTypes_.addAll(other.supportedResourceTypes_); + } + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (!other.getRevisionName().isEmpty()) { + revisionName_ = other.revisionName_; + bitField0_ |= 0x00020000; + onChanged(); + } + switch (other.getResourcePropertiesCase()) { + case DISK_BACKUP_PLAN_PROPERTIES: + { + mergeDiskBackupPlanProperties(other.getDiskBackupPlanProperties()); + break; + } + case COMPUTE_INSTANCE_BACKUP_PLAN_PROPERTIES: + { + mergeComputeInstanceBackupPlanProperties( + other.getComputeInstanceBackupPlanProperties()); + break; + } + case RESOURCEPROPERTIES_NOT_SET: + { + break; + } + } + 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_ |= 0x00000004; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: + { + com.google.cloud.backupdr.v1beta.BackupRule m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupRule.parser(), extensionRegistry); + if (backupRulesBuilder_ == null) { + ensureBackupRulesIsMutable(); + backupRules_.add(m); + } else { + backupRulesBuilder_.addMessage(m); + } + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 56 + case 66: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 66 + case 74: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 74 + case 82: + { + backupVault_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 82 + case 90: + { + backupVaultServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 90 + case 96: + { + logRetentionDays_ = input.readInt64(); + bitField0_ |= 0x00004000; + break; + } // case 96 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSupportedResourceTypesIsMutable(); + supportedResourceTypes_.add(s); + break; + } // case 106 + case 114: + { + revisionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 114 + case 122: + { + revisionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 122 + case 144: + { + maxCustomOnDemandRetentionDays_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 144 + case 154: + { + input.readMessage( + internalGetDiskBackupPlanPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + resourcePropertiesCase_ = 19; + break; + } // case 154 + case 162: + { + input.readMessage( + internalGetComputeInstanceBackupPlanPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + resourcePropertiesCase_ = 20; + break; + } // case 162 + 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 resourcePropertiesCase_ = 0; + private java.lang.Object resourceProperties_; + + public ResourcePropertiesCase getResourcePropertiesCase() { + return ResourcePropertiesCase.forNumber(resourcePropertiesCase_); + } + + public Builder clearResourceProperties() { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties, + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskBackupPlanPropertiesOrBuilder> + diskBackupPlanPropertiesBuilder_; + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskBackupPlanProperties field is set. + */ + @java.lang.Override + public boolean hasDiskBackupPlanProperties() { + return resourcePropertiesCase_ == 19; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskBackupPlanProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties getDiskBackupPlanProperties() { + if (diskBackupPlanPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance(); + } else { + if (resourcePropertiesCase_ == 19) { + return diskBackupPlanPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDiskBackupPlanProperties( + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties value) { + if (diskBackupPlanPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceProperties_ = value; + onChanged(); + } else { + diskBackupPlanPropertiesBuilder_.setMessage(value); + } + resourcePropertiesCase_ = 19; + return this; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDiskBackupPlanProperties( + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.Builder builderForValue) { + if (diskBackupPlanPropertiesBuilder_ == null) { + resourceProperties_ = builderForValue.build(); + onChanged(); + } else { + diskBackupPlanPropertiesBuilder_.setMessage(builderForValue.build()); + } + resourcePropertiesCase_ = 19; + return this; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDiskBackupPlanProperties( + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties value) { + if (diskBackupPlanPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 19 + && resourceProperties_ + != com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance()) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) + resourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceProperties_ = value; + } + onChanged(); + } else { + if (resourcePropertiesCase_ == 19) { + diskBackupPlanPropertiesBuilder_.mergeFrom(value); + } else { + diskBackupPlanPropertiesBuilder_.setMessage(value); + } + } + resourcePropertiesCase_ = 19; + return this; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDiskBackupPlanProperties() { + if (diskBackupPlanPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 19) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + } + } else { + if (resourcePropertiesCase_ == 19) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + } + diskBackupPlanPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.Builder + getDiskBackupPlanPropertiesBuilder() { + return internalGetDiskBackupPlanPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPlanPropertiesOrBuilder + getDiskBackupPlanPropertiesOrBuilder() { + if ((resourcePropertiesCase_ == 19) && (diskBackupPlanPropertiesBuilder_ != null)) { + return diskBackupPlanPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (resourcePropertiesCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of disk-based
+     * resources, such as Compute Engine Persistent Disks. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties, + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskBackupPlanPropertiesOrBuilder> + internalGetDiskBackupPlanPropertiesFieldBuilder() { + if (diskBackupPlanPropertiesBuilder_ == null) { + if (!(resourcePropertiesCase_ == 19)) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance(); + } + diskBackupPlanPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties, + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskBackupPlanPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) resourceProperties_, + getParentForChildren(), + isClean()); + resourceProperties_ = null; + } + resourcePropertiesCase_ = 19; + onChanged(); + return diskBackupPlanPropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanPropertiesOrBuilder> + computeInstanceBackupPlanPropertiesBuilder_; + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the computeInstanceBackupPlanProperties field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceBackupPlanProperties() { + return resourcePropertiesCase_ == 20; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The computeInstanceBackupPlanProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + getComputeInstanceBackupPlanProperties() { + if (computeInstanceBackupPlanPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 20) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance(); + } else { + if (resourcePropertiesCase_ == 20) { + return computeInstanceBackupPlanPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setComputeInstanceBackupPlanProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties value) { + if (computeInstanceBackupPlanPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceProperties_ = value; + onChanged(); + } else { + computeInstanceBackupPlanPropertiesBuilder_.setMessage(value); + } + resourcePropertiesCase_ = 20; + return this; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setComputeInstanceBackupPlanProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.Builder + builderForValue) { + if (computeInstanceBackupPlanPropertiesBuilder_ == null) { + resourceProperties_ = builderForValue.build(); + onChanged(); + } else { + computeInstanceBackupPlanPropertiesBuilder_.setMessage(builderForValue.build()); + } + resourcePropertiesCase_ = 20; + return this; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeComputeInstanceBackupPlanProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties value) { + if (computeInstanceBackupPlanPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 20 + && resourceProperties_ + != com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance()) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + resourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceProperties_ = value; + } + onChanged(); + } else { + if (resourcePropertiesCase_ == 20) { + computeInstanceBackupPlanPropertiesBuilder_.mergeFrom(value); + } else { + computeInstanceBackupPlanPropertiesBuilder_.setMessage(value); + } + } + resourcePropertiesCase_ = 20; + return this; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearComputeInstanceBackupPlanProperties() { + if (computeInstanceBackupPlanPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 20) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + } + } else { + if (resourcePropertiesCase_ == 20) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + } + computeInstanceBackupPlanPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.Builder + getComputeInstanceBackupPlanPropertiesBuilder() { + return internalGetComputeInstanceBackupPlanPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanPropertiesOrBuilder + getComputeInstanceBackupPlanPropertiesOrBuilder() { + if ((resourcePropertiesCase_ == 20) + && (computeInstanceBackupPlanPropertiesBuilder_ != null)) { + return computeInstanceBackupPlanPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (resourcePropertiesCase_ == 20) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Defines optional properties specific to backups of compute
+     * instance based resources, such as Compute Engine Instances. This includes
+     * settings like whether to perform a guest flush.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanPropertiesOrBuilder> + internalGetComputeInstanceBackupPlanPropertiesFieldBuilder() { + if (computeInstanceBackupPlanPropertiesBuilder_ == null) { + if (!(resourcePropertiesCase_ == 20)) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance(); + } + computeInstanceBackupPlanPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + resourceProperties_, + getParentForChildren(), + isClean()); + resourceProperties_ = null; + } + resourcePropertiesCase_ = 20; + onChanged(); + return computeInstanceBackupPlanPropertiesBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlan`.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlan`.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlan`.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlan`.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlan`.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the `BackupPlan` resource.
+     *
+     * The description allows for additional details about `BackupPlan` and its
+     * use cases to be provided. An example description is the following:  "This
+     * is a backup plan that performs a daily backup at 6pm and retains data for 3
+     * months". The description must be at most 2048 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The description of the `BackupPlan` resource.
+     *
+     * The description allows for additional details about `BackupPlan` and its
+     * use cases to be provided. An example description is the following:  "This
+     * is a backup plan that performs a daily backup at 6pm and retains data for 3
+     * months". The description must be at most 2048 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The description of the `BackupPlan` resource.
+     *
+     * The description allows for additional details about `BackupPlan` and its
+     * use cases to be provided. An example description is the following:  "This
+     * is a backup plan that performs a daily backup at 6pm and retains data for 3
+     * months". The description must be at most 2048 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. The description of the `BackupPlan` resource.
+     *
+     * The description allows for additional details about `BackupPlan` and its
+     * use cases to be provided. An example description is the following:  "This
+     * is a backup plan that performs a daily backup at 6pm and retains data for 3
+     * months". The description must be at most 2048 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the `BackupPlan` resource.
+     *
+     * The description allows for additional details about `BackupPlan` and its
+     * use cases to be provided. An example description is the following:  "This
+     * is a backup plan that performs a daily backup at 6pm and retains data for 3
+     * months". The description must be at most 2048 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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(); + } + + /** + * + * + *
+     * Optional. This collection of key/value pairs allows for custom labels to be
+     * supplied by the user.  Example, {"tag": "Weekly"}.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+     * Optional. This collection of key/value pairs allows for custom labels to be
+     * supplied by the user.  Example, {"tag": "Weekly"}.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. This collection of key/value pairs allows for custom labels to be
+     * supplied by the user.  Example, {"tag": "Weekly"}.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. This collection of key/value pairs allows for custom labels to be
+     * supplied by the user.  Example, {"tag": "Weekly"}.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. This collection of key/value pairs allows for custom labels to be
+     * supplied by the user.  Example, {"tag": "Weekly"}.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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(); + } + + /** + * + * + *
+     * Optional. This collection of key/value pairs allows for custom labels to be
+     * supplied by the user.  Example, {"tag": "Weekly"}.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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; + } + + /** + * + * + *
+     * Optional. This collection of key/value pairs allows for custom labels to be
+     * supplied by the user.  Example, {"tag": "Weekly"}.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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. When the `BackupPlan` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. When the `BackupPlan` was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.util.List backupRules_ = + java.util.Collections.emptyList(); + + private void ensureBackupRulesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + backupRules_ = + new java.util.ArrayList(backupRules_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupRule, + com.google.cloud.backupdr.v1beta.BackupRule.Builder, + com.google.cloud.backupdr.v1beta.BackupRuleOrBuilder> + backupRulesBuilder_; + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getBackupRulesList() { + if (backupRulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupRules_); + } else { + return backupRulesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getBackupRulesCount() { + if (backupRulesBuilder_ == null) { + return backupRules_.size(); + } else { + return backupRulesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupRule getBackupRules(int index) { + if (backupRulesBuilder_ == null) { + return backupRules_.get(index); + } else { + return backupRulesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBackupRules(int index, com.google.cloud.backupdr.v1beta.BackupRule value) { + if (backupRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupRulesIsMutable(); + backupRules_.set(index, value); + onChanged(); + } else { + backupRulesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBackupRules( + int index, com.google.cloud.backupdr.v1beta.BackupRule.Builder builderForValue) { + if (backupRulesBuilder_ == null) { + ensureBackupRulesIsMutable(); + backupRules_.set(index, builderForValue.build()); + onChanged(); + } else { + backupRulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBackupRules(com.google.cloud.backupdr.v1beta.BackupRule value) { + if (backupRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupRulesIsMutable(); + backupRules_.add(value); + onChanged(); + } else { + backupRulesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBackupRules(int index, com.google.cloud.backupdr.v1beta.BackupRule value) { + if (backupRulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupRulesIsMutable(); + backupRules_.add(index, value); + onChanged(); + } else { + backupRulesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBackupRules( + com.google.cloud.backupdr.v1beta.BackupRule.Builder builderForValue) { + if (backupRulesBuilder_ == null) { + ensureBackupRulesIsMutable(); + backupRules_.add(builderForValue.build()); + onChanged(); + } else { + backupRulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBackupRules( + int index, com.google.cloud.backupdr.v1beta.BackupRule.Builder builderForValue) { + if (backupRulesBuilder_ == null) { + ensureBackupRulesIsMutable(); + backupRules_.add(index, builderForValue.build()); + onChanged(); + } else { + backupRulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllBackupRules( + java.lang.Iterable values) { + if (backupRulesBuilder_ == null) { + ensureBackupRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupRules_); + onChanged(); + } else { + backupRulesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBackupRules() { + if (backupRulesBuilder_ == null) { + backupRules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + backupRulesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeBackupRules(int index) { + if (backupRulesBuilder_ == null) { + ensureBackupRulesIsMutable(); + backupRules_.remove(index); + onChanged(); + } else { + backupRulesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupRule.Builder getBackupRulesBuilder(int index) { + return internalGetBackupRulesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupRuleOrBuilder getBackupRulesOrBuilder(int index) { + if (backupRulesBuilder_ == null) { + return backupRules_.get(index); + } else { + return backupRulesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBackupRulesOrBuilderList() { + if (backupRulesBuilder_ != null) { + return backupRulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupRules_); + } + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupRule.Builder addBackupRulesBuilder() { + return internalGetBackupRulesFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupRule.Builder addBackupRulesBuilder(int index) { + return internalGetBackupRulesFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.BackupRule.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The backup rules for this `BackupPlan`.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getBackupRulesBuilderList() { + return internalGetBackupRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupRule, + com.google.cloud.backupdr.v1beta.BackupRule.Builder, + com.google.cloud.backupdr.v1beta.BackupRuleOrBuilder> + internalGetBackupRulesFieldBuilder() { + if (backupRulesBuilder_ == null) { + backupRulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupRule, + com.google.cloud.backupdr.v1beta.BackupRule.Builder, + com.google.cloud.backupdr.v1beta.BackupRuleOrBuilder>( + backupRules_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + backupRules_ = null; + } + return backupRulesBuilder_; + } + + private int maxCustomOnDemandRetentionDays_; + + /** + * + * + *
+     * Optional. Optional field to configure the maximum number of days for which
+     * a backup can be retained. This field is only applicable for on-demand
+     * backups taken with custom retention value.
+     * 
+ * + * + * int32 max_custom_on_demand_retention_days = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maxCustomOnDemandRetentionDays. + */ + @java.lang.Override + public int getMaxCustomOnDemandRetentionDays() { + return maxCustomOnDemandRetentionDays_; + } + + /** + * + * + *
+     * Optional. Optional field to configure the maximum number of days for which
+     * a backup can be retained. This field is only applicable for on-demand
+     * backups taken with custom retention value.
+     * 
+ * + * + * int32 max_custom_on_demand_retention_days = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The maxCustomOnDemandRetentionDays to set. + * @return This builder for chaining. + */ + public Builder setMaxCustomOnDemandRetentionDays(int value) { + + maxCustomOnDemandRetentionDays_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Optional field to configure the maximum number of days for which
+     * a backup can be retained. This field is only applicable for on-demand
+     * backups taken with custom retention value.
+     * 
+ * + * + * int32 max_custom_on_demand_retention_days = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMaxCustomOnDemandRetentionDays() { + bitField0_ = (bitField0_ & ~0x00000100); + maxCustomOnDemandRetentionDays_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The `State` for the `BackupPlan`.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.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 `State` for the `BackupPlan`.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.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 `State` for the `BackupPlan`.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan.State getState() { + com.google.cloud.backupdr.v1beta.BackupPlan.State result = + com.google.cloud.backupdr.v1beta.BackupPlan.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The `State` for the `BackupPlan`.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.BackupPlan.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The `State` for the `BackupPlan`.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resourceType_ = ""; + + /** + * + * + *
+     * Required. The resource type to which the `BackupPlan` will be applied.
+     * Examples include, "compute.googleapis.com/Instance",
+     * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+     * "compute.googleapis.com/Disk".
+     * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource type to which the `BackupPlan` will be applied.
+     * Examples include, "compute.googleapis.com/Instance",
+     * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+     * "compute.googleapis.com/Disk".
+     * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource type to which the `BackupPlan` will be applied.
+     * Examples include, "compute.googleapis.com/Instance",
+     * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+     * "compute.googleapis.com/Disk".
+     * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource type to which the `BackupPlan` will be applied.
+     * Examples include, "compute.googleapis.com/Instance",
+     * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+     * "compute.googleapis.com/Disk".
+     * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource type to which the `BackupPlan` will be applied.
+     * Examples include, "compute.googleapis.com/Instance",
+     * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+     * "compute.googleapis.com/Disk".
+     * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. `etag` is returned from the service in the response. As a user of
+     * the service, you may provide an etag value in this field to prevent stale
+     * resources.
+     * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. `etag` is returned from the service in the response. As a user of
+     * the service, you may provide an etag value in this field to prevent stale
+     * resources.
+     * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. `etag` is returned from the service in the response. As a user of
+     * the service, you may provide an etag value in this field to prevent stale
+     * resources.
+     * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. `etag` is returned from the service in the response. As a user of
+     * the service, you may provide an etag value in this field to prevent stale
+     * resources.
+     * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. `etag` is returned from the service in the response. As a user of
+     * the service, you may provide an etag value in this field to prevent stale
+     * resources.
+     * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object backupVault_ = ""; + + /** + * + * + *
+     * Required. Resource name of backup vault which will be used as storage
+     * location for backups. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}
+     * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.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; + } + } + + /** + * + * + *
+     * Required. Resource name of backup vault which will be used as storage
+     * location for backups. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}
+     * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.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; + } + } + + /** + * + * + *
+     * Required. Resource name of backup vault which will be used as storage
+     * location for backups. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}
+     * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.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_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Resource name of backup vault which will be used as storage
+     * location for backups. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}
+     * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBackupVault() { + backupVault_ = getDefaultInstance().getBackupVault(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Resource name of backup vault which will be used as storage
+     * location for backups. Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}
+     * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.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_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object backupVaultServiceAccount_ = ""; + + /** + * + * + *
+     * Output only. The Google Cloud service account to be used by the BackupVault
+     * for taking backups. Specify the email address of the Backup Vault Service
+     * Account.
+     * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupVaultServiceAccount. + */ + public java.lang.String getBackupVaultServiceAccount() { + java.lang.Object ref = backupVaultServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupVaultServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google Cloud service account to be used by the BackupVault
+     * for taking backups. Specify the email address of the Backup Vault Service
+     * Account.
+     * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupVaultServiceAccount. + */ + public com.google.protobuf.ByteString getBackupVaultServiceAccountBytes() { + java.lang.Object ref = backupVaultServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupVaultServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google Cloud service account to be used by the BackupVault
+     * for taking backups. Specify the email address of the Backup Vault Service
+     * Account.
+     * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backupVaultServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setBackupVaultServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupVaultServiceAccount_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google Cloud service account to be used by the BackupVault
+     * for taking backups. Specify the email address of the Backup Vault Service
+     * Account.
+     * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupVaultServiceAccount() { + backupVaultServiceAccount_ = getDefaultInstance().getBackupVaultServiceAccount(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google Cloud service account to be used by the BackupVault
+     * for taking backups. Specify the email address of the Backup Vault Service
+     * Account.
+     * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for backupVaultServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setBackupVaultServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupVaultServiceAccount_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private long logRetentionDays_; + + /** + * + * + *
+     * Optional. Applicable only for Cloud SQL resource_type.
+     *
+     * Configures how long logs will be stored. It is defined in “days”. This
+     * value should be greater than or equal to minimum enforced log retention
+     * duration of the backup vault.
+     * 
+ * + * int64 log_retention_days = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The logRetentionDays. + */ + @java.lang.Override + public long getLogRetentionDays() { + return logRetentionDays_; + } + + /** + * + * + *
+     * Optional. Applicable only for Cloud SQL resource_type.
+     *
+     * Configures how long logs will be stored. It is defined in “days”. This
+     * value should be greater than or equal to minimum enforced log retention
+     * duration of the backup vault.
+     * 
+ * + * int64 log_retention_days = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The logRetentionDays to set. + * @return This builder for chaining. + */ + public Builder setLogRetentionDays(long value) { + + logRetentionDays_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Applicable only for Cloud SQL resource_type.
+     *
+     * Configures how long logs will be stored. It is defined in “days”. This
+     * value should be greater than or equal to minimum enforced log retention
+     * duration of the backup vault.
+     * 
+ * + * int64 log_retention_days = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLogRetentionDays() { + bitField0_ = (bitField0_ & ~0x00004000); + logRetentionDays_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList supportedResourceTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSupportedResourceTypesIsMutable() { + if (!supportedResourceTypes_.isModifiable()) { + supportedResourceTypes_ = + new com.google.protobuf.LazyStringArrayList(supportedResourceTypes_); + } + bitField0_ |= 0x00008000; + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedResourceTypes. + */ + public com.google.protobuf.ProtocolStringList getSupportedResourceTypesList() { + supportedResourceTypes_.makeImmutable(); + return supportedResourceTypes_; + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedResourceTypes. + */ + public int getSupportedResourceTypesCount() { + return supportedResourceTypes_.size(); + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedResourceTypes at the given index. + */ + public java.lang.String getSupportedResourceTypes(int index) { + return supportedResourceTypes_.get(index); + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedResourceTypes at the given index. + */ + public com.google.protobuf.ByteString getSupportedResourceTypesBytes(int index) { + return supportedResourceTypes_.getByteString(index); + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The supportedResourceTypes to set. + * @return This builder for chaining. + */ + public Builder setSupportedResourceTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedResourceTypesIsMutable(); + supportedResourceTypes_.set(index, value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The supportedResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedResourceTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedResourceTypesIsMutable(); + supportedResourceTypes_.add(value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The supportedResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedResourceTypes(java.lang.Iterable values) { + ensureSupportedResourceTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedResourceTypes_); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSupportedResourceTypes() { + supportedResourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. All resource types to which backupPlan can be applied.
+     * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the supportedResourceTypes to add. + * @return This builder for chaining. + */ + public Builder addSupportedResourceTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSupportedResourceTypesIsMutable(); + supportedResourceTypes_.add(value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private java.lang.Object revisionId_ = ""; + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + revisionId_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + revisionId_ = getDefaultInstance().getRevisionId(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + revisionId_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private java.lang.Object revisionName_ = ""; + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionName. + */ + public java.lang.String getRevisionName() { + java.lang.Object ref = revisionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionName. + */ + public com.google.protobuf.ByteString getRevisionNameBytes() { + java.lang.Object ref = revisionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The revisionName to set. + * @return This builder for chaining. + */ + public Builder setRevisionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + revisionName_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRevisionName() { + revisionName_ = getDefaultInstance().getRevisionName(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for revisionName to set. + * @return This builder for chaining. + */ + public Builder setRevisionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + revisionName_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupPlan) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupPlan) + private static final com.google.cloud.backupdr.v1beta.BackupPlan DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupPlan(); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlan getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupPlan 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.backupdr.v1beta.BackupPlan getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociation.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociation.java new file mode 100644 index 000000000000..f8e413dd1d4f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociation.java @@ -0,0 +1,4602 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A BackupPlanAssociation represents a single BackupPlanAssociation which
+ * contains details like workload, backup plan etc
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupPlanAssociation} + */ +@com.google.protobuf.Generated +public final class BackupPlanAssociation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupPlanAssociation) + BackupPlanAssociationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupPlanAssociation"); + } + + // Use BackupPlanAssociation.newBuilder() to construct. + private BackupPlanAssociation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupPlanAssociation() { + name_ = ""; + resourceType_ = ""; + resource_ = ""; + backupPlan_ = ""; + state_ = 0; + rulesConfigInfo_ = java.util.Collections.emptyList(); + dataSource_ = ""; + backupPlanRevisionId_ = ""; + backupPlanRevisionName_ = ""; + autoProtectionPolicyBinding_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanAssociation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanAssociation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.class, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder.class); + } + + /** + * + * + *
+   * Enum for State of BackupPlan Association
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupPlanAssociation.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The resource is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The resource has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The resource is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * The resource has been created but is not usable.
+     * 
+ * + * INACTIVE = 4; + */ + INACTIVE(4), + /** + * + * + *
+     * The resource is being updated.
+     * 
+ * + * UPDATING = 5; + */ + UPDATING(5), + /** + * + * + *
+     * The resource has been created but backups are paused.
+     * 
+ * + * PAUSED = 6; + */ + PAUSED(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The resource is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The resource has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The resource is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + /** + * + * + *
+     * The resource has been created but is not usable.
+     * 
+ * + * INACTIVE = 4; + */ + public static final int INACTIVE_VALUE = 4; + + /** + * + * + *
+     * The resource is being updated.
+     * 
+ * + * UPDATING = 5; + */ + public static final int UPDATING_VALUE = 5; + + /** + * + * + *
+     * The resource has been created but backups are paused.
+     * 
+ * + * PAUSED = 6; + */ + public static final int PAUSED_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 ACTIVE; + case 3: + return DELETING; + case 4: + return INACTIVE; + case 5: + return UPDATING; + case 6: + return PAUSED; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociation.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.backupdr.v1beta.BackupPlanAssociation.State) + } + + private int bitField0_; + private int resourcePropertiesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object resourceProperties_; + + public enum ResourcePropertiesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_SQL_INSTANCE_BACKUP_PLAN_ASSOCIATION_PROPERTIES(10), + ALLOYDB_CLUSTER_BACKUP_PLAN_ASSOCIATION_PROPERTIES(15), + RESOURCEPROPERTIES_NOT_SET(0); + private final int value; + + private ResourcePropertiesCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourcePropertiesCase valueOf(int value) { + return forNumber(value); + } + + public static ResourcePropertiesCase forNumber(int value) { + switch (value) { + case 10: + return CLOUD_SQL_INSTANCE_BACKUP_PLAN_ASSOCIATION_PROPERTIES; + case 15: + return ALLOYDB_CLUSTER_BACKUP_PLAN_ASSOCIATION_PROPERTIES; + case 0: + return RESOURCEPROPERTIES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourcePropertiesCase getResourcePropertiesCase() { + return ResourcePropertiesCase.forNumber(resourcePropertiesCase_); + } + + public static final int CLOUD_SQL_INSTANCE_BACKUP_PLAN_ASSOCIATION_PROPERTIES_FIELD_NUMBER = 10; + + /** + * + * + *
+   * Output only. Cloud SQL instance's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceBackupPlanAssociationProperties field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceBackupPlanAssociationProperties() { + return resourcePropertiesCase_ == 10; + } + + /** + * + * + *
+   * Output only. Cloud SQL instance's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceBackupPlanAssociationProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + getCloudSqlInstanceBackupPlanAssociationProperties() { + if (resourcePropertiesCase_ == 10) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Cloud SQL instance's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder + getCloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder() { + if (resourcePropertiesCase_ == 10) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance(); + } + + public static final int ALLOYDB_CLUSTER_BACKUP_PLAN_ASSOCIATION_PROPERTIES_FIELD_NUMBER = 15; + + /** + * + * + *
+   * Output only. AlloyDB cluster's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloydbClusterBackupPlanAssociationProperties field is set. + */ + @java.lang.Override + public boolean hasAlloydbClusterBackupPlanAssociationProperties() { + return resourcePropertiesCase_ == 15; + } + + /** + * + * + *
+   * Output only. AlloyDB cluster's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloydbClusterBackupPlanAssociationProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + getAlloydbClusterBackupPlanAssociationProperties() { + if (resourcePropertiesCase_ == 15) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. AlloyDB cluster's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder + getAlloydbClusterBackupPlanAssociationPropertiesOrBuilder() { + if (resourcePropertiesCase_ == 15) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Identifier. The resource name of BackupPlanAssociation in
+   * below format Format :
+   * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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; + } + } + + /** + * + * + *
+   * Output only. Identifier. The resource name of BackupPlanAssociation in
+   * below format Format :
+   * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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 RESOURCE_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + + /** + * + * + *
+   * Required. Immutable. Resource type of workload on which backupplan is
+   * applied
+   * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. Resource type of workload on which backupplan is
+   * applied
+   * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + + /** + * + * + *
+   * Required. Immutable. Resource name of workload on which the backup plan is
+   * applied.
+   *
+   * The format can either be the resource name (e.g.,
+   * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+   * full resource URI (e.g.,
+   * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+   * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + 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(); + resource_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. Resource name of workload on which the backup plan is
+   * applied.
+   *
+   * The format can either be the resource name (e.g.,
+   * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+   * full resource URI (e.g.,
+   * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+   * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlan_ = ""; + + /** + * + * + *
+   * Required. Resource name of backup plan which needs to be applied on
+   * workload. Format:
+   * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+   * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlan. + */ + @java.lang.Override + public java.lang.String getBackupPlan() { + java.lang.Object ref = backupPlan_; + 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(); + backupPlan_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Resource name of backup plan which needs to be applied on
+   * workload. Format:
+   * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+   * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlan. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanBytes() { + java.lang.Object ref = backupPlan_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlan_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The BackupPlanAssociation resource state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.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 BackupPlanAssociation resource state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State getState() { + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State result = + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State.UNRECOGNIZED + : result; + } + + public static final int RULES_CONFIG_INFO_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List rulesConfigInfo_; + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getRulesConfigInfoList() { + return rulesConfigInfo_; + } + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getRulesConfigInfoOrBuilderList() { + return rulesConfigInfo_; + } + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getRulesConfigInfoCount() { + return rulesConfigInfo_.size(); + } + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RuleConfigInfo getRulesConfigInfo(int index) { + return rulesConfigInfo_.get(index); + } + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RuleConfigInfoOrBuilder getRulesConfigInfoOrBuilder( + int index) { + return rulesConfigInfo_.get(index); + } + + public static final int DATA_SOURCE_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSource_ = ""; + + /** + * + * + *
+   * Output only. Resource name of data source which will be used as storage
+   * location for backups taken. Format :
+   * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+   * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSource. + */ + @java.lang.Override + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + 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(); + dataSource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Resource name of data source which will be used as storage
+   * location for backups taken. Format :
+   * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+   * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dataSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_REVISION_ID_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanRevisionId_ = ""; + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupPlanRevisionId. + */ + @java.lang.Override + public java.lang.String getBackupPlanRevisionId() { + java.lang.Object ref = backupPlanRevisionId_; + 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(); + backupPlanRevisionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for backupPlanRevisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanRevisionIdBytes() { + java.lang.Object ref = backupPlanRevisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_REVISION_NAME_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanRevisionName_ = ""; + + /** + * + * + *
+   * Output only. The resource id of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+   * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupPlanRevisionName. + */ + @java.lang.Override + public java.lang.String getBackupPlanRevisionName() { + java.lang.Object ref = backupPlanRevisionName_; + 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(); + backupPlanRevisionName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource id of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+   * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupPlanRevisionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanRevisionNameBytes() { + java.lang.Object ref = backupPlanRevisionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTO_PROTECTION_POLICY_BINDING_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private volatile java.lang.Object autoProtectionPolicyBinding_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+   * manages this association, if any.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + @java.lang.Override + public java.lang.String getAutoProtectionPolicyBinding() { + java.lang.Object ref = autoProtectionPolicyBinding_; + 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(); + autoProtectionPolicyBinding_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+   * manages this association, if any.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyBinding_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, resource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlan_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, backupPlan_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + if (state_ + != com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, state_); + } + for (int i = 0; i < rulesConfigInfo_.size(); i++) { + output.writeMessage(8, rulesConfigInfo_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, dataSource_); + } + if (resourcePropertiesCase_ == 10) { + output.writeMessage( + 10, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + resourceProperties_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, backupPlanRevisionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, backupPlanRevisionName_); + } + if (resourcePropertiesCase_ == 15) { + output.writeMessage( + 15, + (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + resourceProperties_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyBinding_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 16, autoProtectionPolicyBinding_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, resource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlan_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, backupPlan_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (state_ + != com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + for (int i = 0; i < rulesConfigInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, rulesConfigInfo_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, dataSource_); + } + if (resourcePropertiesCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + resourceProperties_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, backupPlanRevisionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, backupPlanRevisionName_); + } + if (resourcePropertiesCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, + (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + resourceProperties_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyBinding_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(16, autoProtectionPolicyBinding_); + } + 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.backupdr.v1beta.BackupPlanAssociation)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupPlanAssociation other = + (com.google.cloud.backupdr.v1beta.BackupPlanAssociation) obj; + + if (!getName().equals(other.getName())) return false; + if (!getResourceType().equals(other.getResourceType())) return false; + if (!getResource().equals(other.getResource())) return false; + if (!getBackupPlan().equals(other.getBackupPlan())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (state_ != other.state_) return false; + if (!getRulesConfigInfoList().equals(other.getRulesConfigInfoList())) return false; + if (!getDataSource().equals(other.getDataSource())) return false; + if (!getBackupPlanRevisionId().equals(other.getBackupPlanRevisionId())) return false; + if (!getBackupPlanRevisionName().equals(other.getBackupPlanRevisionName())) return false; + if (!getAutoProtectionPolicyBinding().equals(other.getAutoProtectionPolicyBinding())) + return false; + if (!getResourcePropertiesCase().equals(other.getResourcePropertiesCase())) return false; + switch (resourcePropertiesCase_) { + case 10: + if (!getCloudSqlInstanceBackupPlanAssociationProperties() + .equals(other.getCloudSqlInstanceBackupPlanAssociationProperties())) return false; + break; + case 15: + if (!getAlloydbClusterBackupPlanAssociationProperties() + .equals(other.getAlloydbClusterBackupPlanAssociationProperties())) return false; + break; + case 0: + default: + } + 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) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlan().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getRulesConfigInfoCount() > 0) { + hash = (37 * hash) + RULES_CONFIG_INFO_FIELD_NUMBER; + hash = (53 * hash) + getRulesConfigInfoList().hashCode(); + } + hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRevisionId().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_REVISION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRevisionName().hashCode(); + hash = (37 * hash) + AUTO_PROTECTION_POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicyBinding().hashCode(); + switch (resourcePropertiesCase_) { + case 10: + hash = (37 * hash) + CLOUD_SQL_INSTANCE_BACKUP_PLAN_ASSOCIATION_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstanceBackupPlanAssociationProperties().hashCode(); + break; + case 15: + hash = (37 * hash) + ALLOYDB_CLUSTER_BACKUP_PLAN_ASSOCIATION_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getAlloydbClusterBackupPlanAssociationProperties().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation 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.backupdr.v1beta.BackupPlanAssociation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation 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.backupdr.v1beta.BackupPlanAssociation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupPlanAssociation 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A BackupPlanAssociation represents a single BackupPlanAssociation which
+   * contains details like workload, backup plan etc
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupPlanAssociation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupPlanAssociation) + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanAssociation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanAssociation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.class, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupPlanAssociation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetRulesConfigInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ != null) { + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.clear(); + } + if (alloydbClusterBackupPlanAssociationPropertiesBuilder_ != null) { + alloydbClusterBackupPlanAssociationPropertiesBuilder_.clear(); + } + name_ = ""; + resourceType_ = ""; + resource_ = ""; + backupPlan_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + state_ = 0; + if (rulesConfigInfoBuilder_ == null) { + rulesConfigInfo_ = java.util.Collections.emptyList(); + } else { + rulesConfigInfo_ = null; + rulesConfigInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + dataSource_ = ""; + backupPlanRevisionId_ = ""; + backupPlanRevisionName_ = ""; + autoProtectionPolicyBinding_ = ""; + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanAssociation_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation build() { + com.google.cloud.backupdr.v1beta.BackupPlanAssociation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation buildPartial() { + com.google.cloud.backupdr.v1beta.BackupPlanAssociation result = + new com.google.cloud.backupdr.v1beta.BackupPlanAssociation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation result) { + if (rulesConfigInfoBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + rulesConfigInfo_ = java.util.Collections.unmodifiableList(rulesConfigInfo_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.rulesConfigInfo_ = rulesConfigInfo_; + } else { + result.rulesConfigInfo_ = rulesConfigInfoBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupPlanAssociation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.resource_ = resource_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.backupPlan_ = backupPlan_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.dataSource_ = dataSource_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.backupPlanRevisionId_ = backupPlanRevisionId_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.backupPlanRevisionName_ = backupPlanRevisionName_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.autoProtectionPolicyBinding_ = autoProtectionPolicyBinding_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.BackupPlanAssociation result) { + result.resourcePropertiesCase_ = resourcePropertiesCase_; + result.resourceProperties_ = this.resourceProperties_; + if (resourcePropertiesCase_ == 10 + && cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ != null) { + result.resourceProperties_ = + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.build(); + } + if (resourcePropertiesCase_ == 15 + && alloydbClusterBackupPlanAssociationPropertiesBuilder_ != null) { + result.resourceProperties_ = alloydbClusterBackupPlanAssociationPropertiesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupPlanAssociation) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupPlanAssociation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupPlanAssociation other) { + if (other == com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getBackupPlan().isEmpty()) { + backupPlan_ = other.backupPlan_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (rulesConfigInfoBuilder_ == null) { + if (!other.rulesConfigInfo_.isEmpty()) { + if (rulesConfigInfo_.isEmpty()) { + rulesConfigInfo_ = other.rulesConfigInfo_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.addAll(other.rulesConfigInfo_); + } + onChanged(); + } + } else { + if (!other.rulesConfigInfo_.isEmpty()) { + if (rulesConfigInfoBuilder_.isEmpty()) { + rulesConfigInfoBuilder_.dispose(); + rulesConfigInfoBuilder_ = null; + rulesConfigInfo_ = other.rulesConfigInfo_; + bitField0_ = (bitField0_ & ~0x00000200); + rulesConfigInfoBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRulesConfigInfoFieldBuilder() + : null; + } else { + rulesConfigInfoBuilder_.addAllMessages(other.rulesConfigInfo_); + } + } + } + if (!other.getDataSource().isEmpty()) { + dataSource_ = other.dataSource_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getBackupPlanRevisionId().isEmpty()) { + backupPlanRevisionId_ = other.backupPlanRevisionId_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getBackupPlanRevisionName().isEmpty()) { + backupPlanRevisionName_ = other.backupPlanRevisionName_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getAutoProtectionPolicyBinding().isEmpty()) { + autoProtectionPolicyBinding_ = other.autoProtectionPolicyBinding_; + bitField0_ |= 0x00002000; + onChanged(); + } + switch (other.getResourcePropertiesCase()) { + case CLOUD_SQL_INSTANCE_BACKUP_PLAN_ASSOCIATION_PROPERTIES: + { + mergeCloudSqlInstanceBackupPlanAssociationProperties( + other.getCloudSqlInstanceBackupPlanAssociationProperties()); + break; + } + case ALLOYDB_CLUSTER_BACKUP_PLAN_ASSOCIATION_PROPERTIES: + { + mergeAlloydbClusterBackupPlanAssociationProperties( + other.getAlloydbClusterBackupPlanAssociationProperties()); + break; + } + case RESOURCEPROPERTIES_NOT_SET: + { + break; + } + } + 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_ |= 0x00000004; + break; + } // case 10 + case 18: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + backupPlan_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 56 + case 66: + { + com.google.cloud.backupdr.v1beta.RuleConfigInfo m = + input.readMessage( + com.google.cloud.backupdr.v1beta.RuleConfigInfo.parser(), + extensionRegistry); + if (rulesConfigInfoBuilder_ == null) { + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.add(m); + } else { + rulesConfigInfoBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + dataSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetCloudSqlInstanceBackupPlanAssociationPropertiesFieldBuilder() + .getBuilder(), + extensionRegistry); + resourcePropertiesCase_ = 10; + break; + } // case 82 + case 90: + { + backupPlanRevisionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 90 + case 98: + { + backupPlanRevisionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 98 + case 122: + { + input.readMessage( + internalGetAlloydbClusterBackupPlanAssociationPropertiesFieldBuilder() + .getBuilder(), + extensionRegistry); + resourcePropertiesCase_ = 15; + break; + } // case 122 + case 130: + { + autoProtectionPolicyBinding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 130 + 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 resourcePropertiesCase_ = 0; + private java.lang.Object resourceProperties_; + + public ResourcePropertiesCase getResourcePropertiesCase() { + return ResourcePropertiesCase.forNumber(resourcePropertiesCase_); + } + + public Builder clearResourceProperties() { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .Builder, + com.google.cloud.backupdr.v1beta + .CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder> + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_; + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceBackupPlanAssociationProperties field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceBackupPlanAssociationProperties() { + return resourcePropertiesCase_ == 10; + } + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceBackupPlanAssociationProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + getCloudSqlInstanceBackupPlanAssociationProperties() { + if (cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 10) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance(); + } else { + if (resourcePropertiesCase_ == 10) { + return cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudSqlInstanceBackupPlanAssociationProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties value) { + if (cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceProperties_ = value; + onChanged(); + } else { + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.setMessage(value); + } + resourcePropertiesCase_ = 10; + return this; + } + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudSqlInstanceBackupPlanAssociationProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.Builder + builderForValue) { + if (cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ == null) { + resourceProperties_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.setMessage(builderForValue.build()); + } + resourcePropertiesCase_ = 10; + return this; + } + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCloudSqlInstanceBackupPlanAssociationProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties value) { + if (cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 10 + && resourceProperties_ + != com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance()) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .newBuilder( + (com.google.cloud.backupdr.v1beta + .CloudSqlInstanceBackupPlanAssociationProperties) + resourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceProperties_ = value; + } + onChanged(); + } else { + if (resourcePropertiesCase_ == 10) { + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.mergeFrom(value); + } else { + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.setMessage(value); + } + } + resourcePropertiesCase_ = 10; + return this; + } + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCloudSqlInstanceBackupPlanAssociationProperties() { + if (cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 10) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + } + } else { + if (resourcePropertiesCase_ == 10) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + } + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.Builder + getCloudSqlInstanceBackupPlanAssociationPropertiesBuilder() { + return internalGetCloudSqlInstanceBackupPlanAssociationPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder + getCloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder() { + if ((resourcePropertiesCase_ == 10) + && (cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ != null)) { + return cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (resourcePropertiesCase_ == 10) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Cloud SQL instance's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .Builder, + com.google.cloud.backupdr.v1beta + .CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder> + internalGetCloudSqlInstanceBackupPlanAssociationPropertiesFieldBuilder() { + if (cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ == null) { + if (!(resourcePropertiesCase_ == 10)) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance(); + } + cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .Builder, + com.google.cloud.backupdr.v1beta + .CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + resourceProperties_, + getParentForChildren(), + isClean()); + resourceProperties_ = null; + } + resourcePropertiesCase_ = 10; + onChanged(); + return cloudSqlInstanceBackupPlanAssociationPropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder> + alloydbClusterBackupPlanAssociationPropertiesBuilder_; + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloydbClusterBackupPlanAssociationProperties field is set. + */ + @java.lang.Override + public boolean hasAlloydbClusterBackupPlanAssociationProperties() { + return resourcePropertiesCase_ == 15; + } + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloydbClusterBackupPlanAssociationProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + getAlloydbClusterBackupPlanAssociationProperties() { + if (alloydbClusterBackupPlanAssociationPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 15) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance(); + } else { + if (resourcePropertiesCase_ == 15) { + return alloydbClusterBackupPlanAssociationPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAlloydbClusterBackupPlanAssociationProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties value) { + if (alloydbClusterBackupPlanAssociationPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceProperties_ = value; + onChanged(); + } else { + alloydbClusterBackupPlanAssociationPropertiesBuilder_.setMessage(value); + } + resourcePropertiesCase_ = 15; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAlloydbClusterBackupPlanAssociationProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.Builder + builderForValue) { + if (alloydbClusterBackupPlanAssociationPropertiesBuilder_ == null) { + resourceProperties_ = builderForValue.build(); + onChanged(); + } else { + alloydbClusterBackupPlanAssociationPropertiesBuilder_.setMessage(builderForValue.build()); + } + resourcePropertiesCase_ = 15; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAlloydbClusterBackupPlanAssociationProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties value) { + if (alloydbClusterBackupPlanAssociationPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 15 + && resourceProperties_ + != com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance()) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .newBuilder( + (com.google.cloud.backupdr.v1beta + .AlloyDBClusterBackupPlanAssociationProperties) + resourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceProperties_ = value; + } + onChanged(); + } else { + if (resourcePropertiesCase_ == 15) { + alloydbClusterBackupPlanAssociationPropertiesBuilder_.mergeFrom(value); + } else { + alloydbClusterBackupPlanAssociationPropertiesBuilder_.setMessage(value); + } + } + resourcePropertiesCase_ = 15; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAlloydbClusterBackupPlanAssociationProperties() { + if (alloydbClusterBackupPlanAssociationPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 15) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + } + } else { + if (resourcePropertiesCase_ == 15) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + } + alloydbClusterBackupPlanAssociationPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.Builder + getAlloydbClusterBackupPlanAssociationPropertiesBuilder() { + return internalGetAlloydbClusterBackupPlanAssociationPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder + getAlloydbClusterBackupPlanAssociationPropertiesOrBuilder() { + if ((resourcePropertiesCase_ == 15) + && (alloydbClusterBackupPlanAssociationPropertiesBuilder_ != null)) { + return alloydbClusterBackupPlanAssociationPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (resourcePropertiesCase_ == 15) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. AlloyDB cluster's backup plan association properties.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder> + internalGetAlloydbClusterBackupPlanAssociationPropertiesFieldBuilder() { + if (alloydbClusterBackupPlanAssociationPropertiesBuilder_ == null) { + if (!(resourcePropertiesCase_ == 15)) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .getDefaultInstance(); + } + alloydbClusterBackupPlanAssociationPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + .Builder, + com.google.cloud.backupdr.v1beta + .AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties) + resourceProperties_, + getParentForChildren(), + isClean()); + resourceProperties_ = null; + } + resourcePropertiesCase_ = 15; + onChanged(); + return alloydbClusterBackupPlanAssociationPropertiesBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. Identifier. The resource name of BackupPlanAssociation in
+     * below format Format :
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of BackupPlanAssociation in
+     * below format Format :
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of BackupPlanAssociation in
+     * below format Format :
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of BackupPlanAssociation in
+     * below format Format :
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of BackupPlanAssociation in
+     * below format Format :
+     * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object resourceType_ = ""; + + /** + * + * + *
+     * Required. Immutable. Resource type of workload on which backupplan is
+     * applied
+     * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. Resource type of workload on which backupplan is
+     * applied
+     * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. Resource type of workload on which backupplan is
+     * applied
+     * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Resource type of workload on which backupplan is
+     * applied
+     * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Resource type of workload on which backupplan is
+     * applied
+     * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object resource_ = ""; + + /** + * + * + *
+     * Required. Immutable. Resource name of workload on which the backup plan is
+     * applied.
+     *
+     * The format can either be the resource name (e.g.,
+     * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+     * full resource URI (e.g.,
+     * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+     * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. Resource name of workload on which the backup plan is
+     * applied.
+     *
+     * The format can either be the resource name (e.g.,
+     * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+     * full resource URI (e.g.,
+     * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+     * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. Resource name of workload on which the backup plan is
+     * applied.
+     *
+     * The format can either be the resource name (e.g.,
+     * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+     * full resource URI (e.g.,
+     * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+     * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Resource name of workload on which the backup plan is
+     * applied.
+     *
+     * The format can either be the resource name (e.g.,
+     * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+     * full resource URI (e.g.,
+     * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+     * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Resource name of workload on which the backup plan is
+     * applied.
+     *
+     * The format can either be the resource name (e.g.,
+     * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+     * full resource URI (e.g.,
+     * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+     * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object backupPlan_ = ""; + + /** + * + * + *
+     * Required. Resource name of backup plan which needs to be applied on
+     * workload. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlan. + */ + public java.lang.String getBackupPlan() { + java.lang.Object ref = backupPlan_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlan_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Resource name of backup plan which needs to be applied on
+     * workload. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlan. + */ + public com.google.protobuf.ByteString getBackupPlanBytes() { + java.lang.Object ref = backupPlan_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlan_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Resource name of backup plan which needs to be applied on
+     * workload. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The backupPlan to set. + * @return This builder for chaining. + */ + public Builder setBackupPlan(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlan_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Resource name of backup plan which needs to be applied on
+     * workload. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBackupPlan() { + backupPlan_ = getDefaultInstance().getBackupPlan(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Resource name of backup plan which needs to be applied on
+     * workload. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for backupPlan to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlan_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The BackupPlanAssociation resource state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.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 BackupPlanAssociation resource state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.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_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociation resource state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State getState() { + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State result = + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociation resource state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociation resource state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private java.util.List rulesConfigInfo_ = + java.util.Collections.emptyList(); + + private void ensureRulesConfigInfoIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + rulesConfigInfo_ = + new java.util.ArrayList( + rulesConfigInfo_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.RuleConfigInfo, + com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.RuleConfigInfoOrBuilder> + rulesConfigInfoBuilder_; + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRulesConfigInfoList() { + if (rulesConfigInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(rulesConfigInfo_); + } else { + return rulesConfigInfoBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getRulesConfigInfoCount() { + if (rulesConfigInfoBuilder_ == null) { + return rulesConfigInfo_.size(); + } else { + return rulesConfigInfoBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.RuleConfigInfo getRulesConfigInfo(int index) { + if (rulesConfigInfoBuilder_ == null) { + return rulesConfigInfo_.get(index); + } else { + return rulesConfigInfoBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRulesConfigInfo( + int index, com.google.cloud.backupdr.v1beta.RuleConfigInfo value) { + if (rulesConfigInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.set(index, value); + onChanged(); + } else { + rulesConfigInfoBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRulesConfigInfo( + int index, com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder builderForValue) { + if (rulesConfigInfoBuilder_ == null) { + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesConfigInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRulesConfigInfo(com.google.cloud.backupdr.v1beta.RuleConfigInfo value) { + if (rulesConfigInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.add(value); + onChanged(); + } else { + rulesConfigInfoBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRulesConfigInfo( + int index, com.google.cloud.backupdr.v1beta.RuleConfigInfo value) { + if (rulesConfigInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.add(index, value); + onChanged(); + } else { + rulesConfigInfoBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRulesConfigInfo( + com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder builderForValue) { + if (rulesConfigInfoBuilder_ == null) { + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.add(builderForValue.build()); + onChanged(); + } else { + rulesConfigInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRulesConfigInfo( + int index, com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder builderForValue) { + if (rulesConfigInfoBuilder_ == null) { + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesConfigInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllRulesConfigInfo( + java.lang.Iterable values) { + if (rulesConfigInfoBuilder_ == null) { + ensureRulesConfigInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rulesConfigInfo_); + onChanged(); + } else { + rulesConfigInfoBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRulesConfigInfo() { + if (rulesConfigInfoBuilder_ == null) { + rulesConfigInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + rulesConfigInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeRulesConfigInfo(int index) { + if (rulesConfigInfoBuilder_ == null) { + ensureRulesConfigInfoIsMutable(); + rulesConfigInfo_.remove(index); + onChanged(); + } else { + rulesConfigInfoBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder getRulesConfigInfoBuilder( + int index) { + return internalGetRulesConfigInfoFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.RuleConfigInfoOrBuilder getRulesConfigInfoOrBuilder( + int index) { + if (rulesConfigInfoBuilder_ == null) { + return rulesConfigInfo_.get(index); + } else { + return rulesConfigInfoBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRulesConfigInfoOrBuilderList() { + if (rulesConfigInfoBuilder_ != null) { + return rulesConfigInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rulesConfigInfo_); + } + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder addRulesConfigInfoBuilder() { + return internalGetRulesConfigInfoFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.RuleConfigInfo.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder addRulesConfigInfoBuilder( + int index) { + return internalGetRulesConfigInfoFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.RuleConfigInfo.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The config info related to backup rules.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRulesConfigInfoBuilderList() { + return internalGetRulesConfigInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.RuleConfigInfo, + com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.RuleConfigInfoOrBuilder> + internalGetRulesConfigInfoFieldBuilder() { + if (rulesConfigInfoBuilder_ == null) { + rulesConfigInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.RuleConfigInfo, + com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.RuleConfigInfoOrBuilder>( + rulesConfigInfo_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + rulesConfigInfo_ = null; + } + return rulesConfigInfoBuilder_; + } + + private java.lang.Object dataSource_ = ""; + + /** + * + * + *
+     * Output only. Resource name of data source which will be used as storage
+     * location for backups taken. Format :
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+     * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSource. + */ + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Resource name of data source which will be used as storage
+     * location for backups taken. Format :
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+     * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dataSource. + */ + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Resource name of data source which will be used as storage
+     * location for backups taken. Format :
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+     * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Resource name of data source which will be used as storage
+     * location for backups taken. Format :
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+     * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDataSource() { + dataSource_ = getDefaultInstance().getDataSource(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Resource name of data source which will be used as storage
+     * location for backups taken. Format :
+     * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+     * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSource_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object backupPlanRevisionId_ = ""; + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupPlanRevisionId. + */ + public java.lang.String getBackupPlanRevisionId() { + java.lang.Object ref = backupPlanRevisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanRevisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupPlanRevisionId. + */ + public com.google.protobuf.ByteString getBackupPlanRevisionIdBytes() { + java.lang.Object ref = backupPlanRevisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backupPlanRevisionId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanRevisionId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanRevisionId() { + backupPlanRevisionId_ = getDefaultInstance().getBackupPlanRevisionId(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for backupPlanRevisionId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanRevisionId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object backupPlanRevisionName_ = ""; + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupPlanRevisionName. + */ + public java.lang.String getBackupPlanRevisionName() { + java.lang.Object ref = backupPlanRevisionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanRevisionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupPlanRevisionName. + */ + public com.google.protobuf.ByteString getBackupPlanRevisionNameBytes() { + java.lang.Object ref = backupPlanRevisionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backupPlanRevisionName to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanRevisionName_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanRevisionName() { + backupPlanRevisionName_ = getDefaultInstance().getBackupPlanRevisionName(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource id of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+     * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for backupPlanRevisionName to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanRevisionName_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object autoProtectionPolicyBinding_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this association, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + public java.lang.String getAutoProtectionPolicyBinding() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + autoProtectionPolicyBinding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this association, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + public com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this association, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The autoProtectionPolicyBinding to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyBinding(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionPolicyBinding_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this association, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAutoProtectionPolicyBinding() { + autoProtectionPolicyBinding_ = getDefaultInstance().getAutoProtectionPolicyBinding(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this association, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for autoProtectionPolicyBinding to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyBindingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + autoProtectionPolicyBinding_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupPlanAssociation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupPlanAssociation) + private static final com.google.cloud.backupdr.v1beta.BackupPlanAssociation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupPlanAssociation(); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanAssociation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupPlanAssociation 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.backupdr.v1beta.BackupPlanAssociation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationName.java new file mode 100644 index 000000000000..db25a8d39124 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationName.java @@ -0,0 +1,236 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class BackupPlanAssociationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUP_PLAN_ASSOCIATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String backupPlanAssociation; + + @Deprecated + protected BackupPlanAssociationName() { + project = null; + location = null; + backupPlanAssociation = null; + } + + private BackupPlanAssociationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + backupPlanAssociation = Preconditions.checkNotNull(builder.getBackupPlanAssociation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupPlanAssociation() { + return backupPlanAssociation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BackupPlanAssociationName of( + String project, String location, String backupPlanAssociation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupPlanAssociation(backupPlanAssociation) + .build(); + } + + public static String format(String project, String location, String backupPlanAssociation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupPlanAssociation(backupPlanAssociation) + .build() + .toString(); + } + + public static @Nullable BackupPlanAssociationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUP_PLAN_ASSOCIATION.validatedMatch( + formattedString, + "BackupPlanAssociationName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("backup_plan_association")); + } + + 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<@Nullable BackupPlanAssociationName> values) { + List list = new ArrayList<>(values.size()); + for (BackupPlanAssociationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BACKUP_PLAN_ASSOCIATION.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 (backupPlanAssociation != null) { + fieldMapBuilder.put("backup_plan_association", backupPlanAssociation); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BACKUP_PLAN_ASSOCIATION.instantiate( + "project", project, "location", location, "backup_plan_association", backupPlanAssociation); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BackupPlanAssociationName that = ((BackupPlanAssociationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.backupPlanAssociation, that.backupPlanAssociation); + } + 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(backupPlanAssociation); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}. + */ + public static class Builder { + private String project; + private String location; + private String backupPlanAssociation; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupPlanAssociation() { + return backupPlanAssociation; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBackupPlanAssociation(String backupPlanAssociation) { + this.backupPlanAssociation = backupPlanAssociation; + return this; + } + + private Builder(BackupPlanAssociationName backupPlanAssociationName) { + this.project = backupPlanAssociationName.project; + this.location = backupPlanAssociationName.location; + this.backupPlanAssociation = backupPlanAssociationName.backupPlanAssociation; + } + + public BackupPlanAssociationName build() { + return new BackupPlanAssociationName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationOrBuilder.java new file mode 100644 index 000000000000..5124a0b276ec --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationOrBuilder.java @@ -0,0 +1,569 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupPlanAssociationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupPlanAssociation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Cloud SQL instance's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceBackupPlanAssociationProperties field is set. + */ + boolean hasCloudSqlInstanceBackupPlanAssociationProperties(); + + /** + * + * + *
+   * Output only. Cloud SQL instance's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceBackupPlanAssociationProperties. + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + getCloudSqlInstanceBackupPlanAssociationProperties(); + + /** + * + * + *
+   * Output only. Cloud SQL instance's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties cloud_sql_instance_backup_plan_association_properties = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder + getCloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. AlloyDB cluster's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloydbClusterBackupPlanAssociationProperties field is set. + */ + boolean hasAlloydbClusterBackupPlanAssociationProperties(); + + /** + * + * + *
+   * Output only. AlloyDB cluster's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloydbClusterBackupPlanAssociationProperties. + */ + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties + getAlloydbClusterBackupPlanAssociationProperties(); + + /** + * + * + *
+   * Output only. AlloyDB cluster's backup plan association properties.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationProperties alloydb_cluster_backup_plan_association_properties = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.AlloyDBClusterBackupPlanAssociationPropertiesOrBuilder + getAlloydbClusterBackupPlanAssociationPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. Identifier. The resource name of BackupPlanAssociation in
+   * below format Format :
+   * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Identifier. The resource name of BackupPlanAssociation in
+   * below format Format :
+   * projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Immutable. Resource type of workload on which backupplan is
+   * applied
+   * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + + /** + * + * + *
+   * Required. Immutable. Resource type of workload on which backupplan is
+   * applied
+   * 
+ * + * + * string resource_type = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+   * Required. Immutable. Resource name of workload on which the backup plan is
+   * applied.
+   *
+   * The format can either be the resource name (e.g.,
+   * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+   * full resource URI (e.g.,
+   * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+   * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + java.lang.String getResource(); + + /** + * + * + *
+   * Required. Immutable. Resource name of workload on which the backup plan is
+   * applied.
+   *
+   * The format can either be the resource name (e.g.,
+   * "projects/my-project/zones/us-central1-a/instances/my-instance") or the
+   * full resource URI (e.g.,
+   * "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance").
+   * 
+ * + * + * string resource = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * Required. Resource name of backup plan which needs to be applied on
+   * workload. Format:
+   * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+   * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlan. + */ + java.lang.String getBackupPlan(); + + /** + * + * + *
+   * Required. Resource name of backup plan which needs to be applied on
+   * workload. Format:
+   * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+   * 
+ * + * + * string backup_plan = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlan. + */ + com.google.protobuf.ByteString getBackupPlanBytes(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The BackupPlanAssociation resource state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The BackupPlanAssociation resource state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.State getState(); + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getRulesConfigInfoList(); + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.RuleConfigInfo getRulesConfigInfo(int index); + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getRulesConfigInfoCount(); + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getRulesConfigInfoOrBuilderList(); + + /** + * + * + *
+   * Output only. The config info related to backup rules.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.RuleConfigInfo rules_config_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.RuleConfigInfoOrBuilder getRulesConfigInfoOrBuilder(int index); + + /** + * + * + *
+   * Output only. Resource name of data source which will be used as storage
+   * location for backups taken. Format :
+   * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+   * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSource. + */ + java.lang.String getDataSource(); + + /** + * + * + *
+   * Output only. Resource name of data source which will be used as storage
+   * location for backups taken. Format :
+   * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
+   * 
+ * + * string data_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dataSource. + */ + com.google.protobuf.ByteString getDataSourceBytes(); + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupPlanRevisionId. + */ + java.lang.String getBackupPlanRevisionId(); + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string backup_plan_revision_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for backupPlanRevisionId. + */ + com.google.protobuf.ByteString getBackupPlanRevisionIdBytes(); + + /** + * + * + *
+   * Output only. The resource id of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+   * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupPlanRevisionName. + */ + java.lang.String getBackupPlanRevisionName(); + + /** + * + * + *
+   * Output only. The resource id of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+   * 
+ * + * string backup_plan_revision_name = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupPlanRevisionName. + */ + com.google.protobuf.ByteString getBackupPlanRevisionNameBytes(); + + /** + * + * + *
+   * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+   * manages this association, if any.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + java.lang.String getAutoProtectionPolicyBinding(); + + /** + * + * + *
+   * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+   * manages this association, if any.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes(); + + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.ResourcePropertiesCase + getResourcePropertiesCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationProto.java new file mode 100644 index 000000000000..2825d70d4941 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanAssociationProto.java @@ -0,0 +1,361 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class BackupPlanAssociationProto extends com.google.protobuf.GeneratedFile { + private BackupPlanAssociationProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupPlanAssociationProto"); + } + + 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_backupdr_v1beta_BackupPlanAssociation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupPlanAssociation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_RuleConfigInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_RuleConfigInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanAssociationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanAssociationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetBackupPlanAssociationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetBackupPlanAssociationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanAssociationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanAssociationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanAssociationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanAssociationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_LabelsEntry_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" + + "8google/cloud/backupdr/v1beta/backupplanassociation.proto\022\034google.cloud.backupd" + + "r.v1beta\032\037google/api/field_behavior.prot" + + "o\032\033google/api/field_info.proto\032\031google/a" + + "pi/resource.proto\0326google/cloud/backupdr/v1beta/backupvault_alloydb.proto\0327googl" + + "e/cloud/backupdr/v1beta/backupvault_cloudsql.proto\032 google/protobuf/field_mask.p" + + "roto\032\037google/protobuf/timestamp.proto\032\027google/rpc/status.proto\"\352\t\n" + + "\025BackupPlanAssociation\022\223\001\n" + + "5cloud_sql_instance_backup_plan_association_properties\030\n" + + " \001(\0132M.google.cloud.backupdr.v1beta.CloudSqlInstance" + + "BackupPlanAssociationPropertiesB\003\340A\003H\000\022\216\001\n" + + "2alloydb_cluster_backup_plan_association_properties\030\017" + + " \001(\0132K.google.cloud.backu" + + "pdr.v1beta.AlloyDBClusterBackupPlanAssociationPropertiesB\003\340A\003H\000\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\003\022\035\n\r" + + "resource_type\030\002 \001(\tB\006\340A\005\340A\002\022\030\n" + + "\010resource\030\003 \001(\tB\006\340A\005\340A\002\022?\n" + + "\013backup_plan\030\004 \001(\tB*\340A\002\372A$\n" + + "\"backupdr.googleapis.com/BackupPlan\0224\n" + + "\013create_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022M\n" + + "\005state\030\007" + + " \001(\01629.google.cloud.backupdr.v1beta.BackupPlanAssociation.StateB\003\340A\003\022L\n" + + "\021rules_config_info\030\010" + + " \003(\0132,.google.cloud.backupdr.v1beta.RuleConfigInfoB\003\340A\003\022\030\n" + + "\013data_source\030\t \001(\tB\003\340A\003\022$\n" + + "\027backup_plan_revision_id\030\013 \001(\tB\003\340A\003\022&\n" + + "\031backup_plan_revision_name\030\014 \001(\tB\003\340A\003\022c\n" + + "\036auto_protection_policy_binding\030\020 \001(\tB;\340A\003\372A5\n" + + "3backupdr.googleapis.com/AutoProtectionPolicyBinding\"n\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010DELETING\020\003\022\014\n" + + "\010INACTIVE\020\004\022\014\n" + + "\010UPDATING\020\005\022\n\n" + + "\006PAUSED\020\006:\274\001\352A\270\001\n" + + "-backupdr.googleapis.com/BackupPlanAssociation\022Xprojects/{project}/locations/{locat" + + "ion}/backupPlanAssociations/{backup_plan" + + "_association}*\026backupPlanAssociations2\025backupPlanAssociationB\025\n" + + "\023resource_properties\"\215\003\n" + + "\016RuleConfigInfo\022\024\n" + + "\007rule_id\030\001 \001(\tB\003\340A\003\022\\\n" + + "\021last_backup_state\030\003 \001(\0162<.google" + + ".cloud.backupdr.v1beta.RuleConfigInfo.LastBackupStateB\003\340A\003\0222\n" + + "\021last_backup_error\030\004 \001(\0132\022.google.rpc.StatusB\003\340A\003\022P\n" + + "\'last_successful_backup_consistency_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"\200\001\n" + + "\017LastBackupState\022!\n" + + "\035LAST_BACKUP_STATE_UNSPECIFIED\020\000\022\030\n" + + "\024FIRST_BACKUP_PENDING\020\001\022\025\n" + + "\021PERMISSION_DENIED\020\002\022\r\n" + + "\tSUCCEEDED\020\003\022\n\n" + + "\006FAILED\020\004\"\220\002\n" + + "\"CreateBackupPlanAssociationRequest\022E\n" + + "\006parent\030\001 \001(" + + "\tB5\340A\002\372A/\022-backupdr.googleapis.com/BackupPlanAssociation\022\'\n" + + "\032backup_plan_association_id\030\002 \001(\tB\003\340A\002\022Y\n" + + "\027backup_plan_association\030\003 \001(\01323.google.clo" + + "ud.backupdr.v1beta.BackupPlanAssociationB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\260\001\n" + + "!ListBackupPlanAssociationsRequest\022E\n" + + "\006parent\030\001 \001(" + + "\tB5\340A\002\372A/\022-backupdr.googleapis.com/BackupPlanAssociation\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"\251\001\n" + + "\"ListBackupPlanAssociationsResponse\022U\n" + + "\030backup_plan_associations\030\001" + + " \003(\01323.google.cloud.backupdr.v1beta.BackupPlanAssociation\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\363\001\n" + + "1FetchBackupPlanAssociationsForResourceTypeRequest\022E\n" + + "\006parent\030\001 \001(" + + "\tB5\340A\002\372A/\022-backupdr.googleapis.com/BackupPlanAssociation\022\032\n\r" + + "resource_type\030\002 \001(\tB\003\340A\002\022\026\n" + + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\004 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\005 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\006 \001(\tB\003\340A\001\"\256\001\n" + + "2FetchBackupPlanAssociationsForResourceTypeResponse\022Z\n" + + "\030backup_plan_associations\030\001" + + " \003(\01323.google.cloud.backupdr.v1beta.BackupPlanAssociationB\003\340A\003\022\034\n" + + "\017next_page_token\030\002 \001(\tB\003\340A\003\"f\n" + + "\037GetBackupPlanAssociationRequest\022C\n" + + "\004name\030\001 \001(\tB5\340A\002\372A/\n" + + "-backupdr.googleapis.com/BackupPlanAssociation\"\357\001\n" + + "\"DeleteBackupPlanAssociationRequest\022C\n" + + "\004name\030\001 \001(\tB5\340A\002\372A/\n" + + "-backupdr.googleapis.com/BackupPlanAssociation\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022c\n" + + "\036auto_protection_policy_binding\030\003 \001(\tB;\340A\001\372A5\n" + + "3backupdr.googleapis.com/AutoProtectionPolicyBinding\"\326\001\n" + + "\"UpdateBackupPlanAssociationRequest\022Y\n" + + "\027backup_plan_association\030\001 \001(\01323.google." + + "cloud.backupdr.v1beta.BackupPlanAssociationB\003\340A\002\0224\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\272\002\n" + + "\024TriggerBackupRequest\022C\n" + + "\004name\030\001 \001(\tB5\340A\002\372A/\n" + + "-backupdr.googleapis.com/BackupPlanAssociation\022\024\n" + + "\007rule_id\030\002 \001(\tB\003\340A\001\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\"\n" + + "\025custom_retention_days\030\006 \001(\005B\003\340A\001\022S\n" + + "\006labels\030\007 \003(\0132>.google.cloud.backupdr" + + ".v1beta.TriggerBackupRequest.LabelsEntryB\003\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001B\336\001\n" + + " com.google.cloud.backupdr.v1betaB\032BackupPlanAssociationProtoP\001Z" + + " + * BackupPlanDetail defines configuration of protection. + * + * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupPlanDetail} + */ +@com.google.protobuf.Generated +public final class BackupPlanDetail extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupPlanDetail) + BackupPlanDetailOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupPlanDetail"); + } + + // Use BackupPlanDetail.newBuilder() to construct. + private BackupPlanDetail(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupPlanDetail() { + resourceType_ = ""; + backupPlan_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupPlanDetail.class, + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder.class); + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + + /** + * + * + *
+   * Required. The type of resource that this policy will automatically protect.
+   * For MVP, `compute.googleapis.com/Instance` and
+   * `compute.googleapis.com/Disk` are supported.
+   * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The type of resource that this policy will automatically protect.
+   * For MVP, `compute.googleapis.com/Instance` and
+   * `compute.googleapis.com/Disk` are supported.
+   * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlan_ = ""; + + /** + * + * + *
+   * Required. The resource name of the BackupPlan to apply to resources that
+   * match the policy's criteria. This backup plan must be in the same location
+   * as AutoProtectionPolicy. Format:
+   * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+   * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlan. + */ + @java.lang.Override + public java.lang.String getBackupPlan() { + java.lang.Object ref = backupPlan_; + 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(); + backupPlan_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the BackupPlan to apply to resources that
+   * match the policy's criteria. This backup plan must be in the same location
+   * as AutoProtectionPolicy. Format:
+   * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+   * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlan. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanBytes() { + java.lang.Object ref = backupPlan_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlan_ = 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.GeneratedMessage.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, resourceType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlan_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupPlan_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, resourceType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlan_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupPlan_); + } + 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.backupdr.v1beta.BackupPlanDetail)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupPlanDetail other = + (com.google.cloud.backupdr.v1beta.BackupPlanDetail) obj; + + if (!getResourceType().equals(other.getResourceType())) return false; + if (!getBackupPlan().equals(other.getBackupPlan())) 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) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlan().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail 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.backupdr.v1beta.BackupPlanDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail 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.backupdr.v1beta.BackupPlanDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupPlanDetail 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupPlanDetail defines configuration of protection.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupPlanDetail} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupPlanDetail) + com.google.cloud.backupdr.v1beta.BackupPlanDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupPlanDetail.class, + com.google.cloud.backupdr.v1beta.BackupPlanDetail.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupPlanDetail.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceType_ = ""; + backupPlan_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanDetail_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanDetail getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanDetail.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanDetail build() { + com.google.cloud.backupdr.v1beta.BackupPlanDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanDetail buildPartial() { + com.google.cloud.backupdr.v1beta.BackupPlanDetail result = + new com.google.cloud.backupdr.v1beta.BackupPlanDetail(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupPlanDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPlan_ = backupPlan_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupPlanDetail) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupPlanDetail) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupPlanDetail other) { + if (other == com.google.cloud.backupdr.v1beta.BackupPlanDetail.getDefaultInstance()) + return this; + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupPlan().isEmpty()) { + backupPlan_ = other.backupPlan_; + bitField0_ |= 0x00000002; + 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: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + backupPlan_ = input.readStringRequireUtf8(); + 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 java.lang.Object resourceType_ = ""; + + /** + * + * + *
+     * Required. The type of resource that this policy will automatically protect.
+     * For MVP, `compute.googleapis.com/Instance` and
+     * `compute.googleapis.com/Disk` are supported.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The type of resource that this policy will automatically protect.
+     * For MVP, `compute.googleapis.com/Instance` and
+     * `compute.googleapis.com/Disk` are supported.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The type of resource that this policy will automatically protect.
+     * For MVP, `compute.googleapis.com/Instance` and
+     * `compute.googleapis.com/Disk` are supported.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of resource that this policy will automatically protect.
+     * For MVP, `compute.googleapis.com/Instance` and
+     * `compute.googleapis.com/Disk` are supported.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of resource that this policy will automatically protect.
+     * For MVP, `compute.googleapis.com/Instance` and
+     * `compute.googleapis.com/Disk` are supported.
+     * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupPlan_ = ""; + + /** + * + * + *
+     * Required. The resource name of the BackupPlan to apply to resources that
+     * match the policy's criteria. This backup plan must be in the same location
+     * as AutoProtectionPolicy. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlan. + */ + public java.lang.String getBackupPlan() { + java.lang.Object ref = backupPlan_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlan_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the BackupPlan to apply to resources that
+     * match the policy's criteria. This backup plan must be in the same location
+     * as AutoProtectionPolicy. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlan. + */ + public com.google.protobuf.ByteString getBackupPlanBytes() { + java.lang.Object ref = backupPlan_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlan_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the BackupPlan to apply to resources that
+     * match the policy's criteria. This backup plan must be in the same location
+     * as AutoProtectionPolicy. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The backupPlan to set. + * @return This builder for chaining. + */ + public Builder setBackupPlan(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlan_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the BackupPlan to apply to resources that
+     * match the policy's criteria. This backup plan must be in the same location
+     * as AutoProtectionPolicy. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBackupPlan() { + backupPlan_ = getDefaultInstance().getBackupPlan(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the BackupPlan to apply to resources that
+     * match the policy's criteria. This backup plan must be in the same location
+     * as AutoProtectionPolicy. Format:
+     * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+     * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for backupPlan to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlan_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupPlanDetail) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupPlanDetail) + private static final com.google.cloud.backupdr.v1beta.BackupPlanDetail DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupPlanDetail(); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupPlanDetail 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.backupdr.v1beta.BackupPlanDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanDetailOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanDetailOrBuilder.java new file mode 100644 index 000000000000..d92993607f1b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanDetailOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupPlanDetailOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupPlanDetail) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The type of resource that this policy will automatically protect.
+   * For MVP, `compute.googleapis.com/Instance` and
+   * `compute.googleapis.com/Disk` are supported.
+   * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + + /** + * + * + *
+   * Required. The type of resource that this policy will automatically protect.
+   * For MVP, `compute.googleapis.com/Instance` and
+   * `compute.googleapis.com/Disk` are supported.
+   * 
+ * + * string resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+   * Required. The resource name of the BackupPlan to apply to resources that
+   * match the policy's criteria. This backup plan must be in the same location
+   * as AutoProtectionPolicy. Format:
+   * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+   * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The backupPlan. + */ + java.lang.String getBackupPlan(); + + /** + * + * + *
+   * Required. The resource name of the BackupPlan to apply to resources that
+   * match the policy's criteria. This backup plan must be in the same location
+   * as AutoProtectionPolicy. Format:
+   * projects/{project}/locations/{location}/backupPlans/{backupPlanId}
+   * 
+ * + * + * string backup_plan = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupPlan. + */ + com.google.protobuf.ByteString getBackupPlanBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanName.java new file mode 100644 index 000000000000..f0421be09f2e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanName.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class BackupPlanName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUP_PLAN = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupPlans/{backup_plan}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String backupPlan; + + @Deprecated + protected BackupPlanName() { + project = null; + location = null; + backupPlan = null; + } + + private BackupPlanName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + backupPlan = Preconditions.checkNotNull(builder.getBackupPlan()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupPlan() { + return backupPlan; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BackupPlanName of(String project, String location, String backupPlan) { + return newBuilder().setProject(project).setLocation(location).setBackupPlan(backupPlan).build(); + } + + public static String format(String project, String location, String backupPlan) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupPlan(backupPlan) + .build() + .toString(); + } + + public static @Nullable BackupPlanName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUP_PLAN.validatedMatch( + formattedString, "BackupPlanName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("backup_plan")); + } + + 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<@Nullable BackupPlanName> values) { + List list = new ArrayList<>(values.size()); + for (BackupPlanName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BACKUP_PLAN.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 (backupPlan != null) { + fieldMapBuilder.put("backup_plan", backupPlan); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BACKUP_PLAN.instantiate( + "project", project, "location", location, "backup_plan", backupPlan); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BackupPlanName that = ((BackupPlanName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.backupPlan, that.backupPlan); + } + 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(backupPlan); + return h; + } + + /** Builder for projects/{project}/locations/{location}/backupPlans/{backup_plan}. */ + public static class Builder { + private String project; + private String location; + private String backupPlan; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupPlan() { + return backupPlan; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBackupPlan(String backupPlan) { + this.backupPlan = backupPlan; + return this; + } + + private Builder(BackupPlanName backupPlanName) { + this.project = backupPlanName.project; + this.location = backupPlanName.location; + this.backupPlan = backupPlanName.backupPlan; + } + + public BackupPlanName build() { + return new BackupPlanName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanOrBuilder.java new file mode 100644 index 000000000000..72cc6e297c36 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanOrBuilder.java @@ -0,0 +1,730 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupPlanOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupPlan) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of disk-based
+   * resources, such as Compute Engine Persistent Disks. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskBackupPlanProperties field is set. + */ + boolean hasDiskBackupPlanProperties(); + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of disk-based
+   * resources, such as Compute Engine Persistent Disks. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskBackupPlanProperties. + */ + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties getDiskBackupPlanProperties(); + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of disk-based
+   * resources, such as Compute Engine Persistent Disks. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DiskBackupPlanProperties disk_backup_plan_properties = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.DiskBackupPlanPropertiesOrBuilder + getDiskBackupPlanPropertiesOrBuilder(); + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of compute
+   * instance based resources, such as Compute Engine Instances. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the computeInstanceBackupPlanProperties field is set. + */ + boolean hasComputeInstanceBackupPlanProperties(); + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of compute
+   * instance based resources, such as Compute Engine Instances. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The computeInstanceBackupPlanProperties. + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + getComputeInstanceBackupPlanProperties(); + + /** + * + * + *
+   * Optional. Defines optional properties specific to backups of compute
+   * instance based resources, such as Compute Engine Instances. This includes
+   * settings like whether to perform a guest flush.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties compute_instance_backup_plan_properties = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanPropertiesOrBuilder + getComputeInstanceBackupPlanPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. Identifier. The resource name of the `BackupPlan`.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Identifier. The resource name of the `BackupPlan`.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The description of the `BackupPlan` resource.
+   *
+   * The description allows for additional details about `BackupPlan` and its
+   * use cases to be provided. An example description is the following:  "This
+   * is a backup plan that performs a daily backup at 6pm and retains data for 3
+   * months". The description must be at most 2048 characters.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the `BackupPlan` resource.
+   *
+   * The description allows for additional details about `BackupPlan` and its
+   * use cases to be provided. An example description is the following:  "This
+   * is a backup plan that performs a daily backup at 6pm and retains data for 3
+   * months". The description must be at most 2048 characters.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. This collection of key/value pairs allows for custom labels to be
+   * supplied by the user.  Example, {"tag": "Weekly"}.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. When the `BackupPlan` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. When the `BackupPlan` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. When the `BackupPlan` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. When the `BackupPlan` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. When the `BackupPlan` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. When the `BackupPlan` was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getBackupRulesList(); + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.BackupRule getBackupRules(int index); + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getBackupRulesCount(); + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getBackupRulesOrBuilderList(); + + /** + * + * + *
+   * Optional. The backup rules for this `BackupPlan`.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupRule backup_rules = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.BackupRuleOrBuilder getBackupRulesOrBuilder(int index); + + /** + * + * + *
+   * Optional. Optional field to configure the maximum number of days for which
+   * a backup can be retained. This field is only applicable for on-demand
+   * backups taken with custom retention value.
+   * 
+ * + * int32 max_custom_on_demand_retention_days = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maxCustomOnDemandRetentionDays. + */ + int getMaxCustomOnDemandRetentionDays(); + + /** + * + * + *
+   * Output only. The `State` for the `BackupPlan`.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The `State` for the `BackupPlan`.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.BackupPlan.State getState(); + + /** + * + * + *
+   * Required. The resource type to which the `BackupPlan` will be applied.
+   * Examples include, "compute.googleapis.com/Instance",
+   * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+   * "compute.googleapis.com/Disk".
+   * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + + /** + * + * + *
+   * Required. The resource type to which the `BackupPlan` will be applied.
+   * Examples include, "compute.googleapis.com/Instance",
+   * "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster",
+   * "compute.googleapis.com/Disk".
+   * 
+ * + * string resource_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+   * Optional. `etag` is returned from the service in the response. As a user of
+   * the service, you may provide an etag value in this field to prevent stale
+   * resources.
+   * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. `etag` is returned from the service in the response. As a user of
+   * the service, you may provide an etag value in this field to prevent stale
+   * resources.
+   * 
+ * + * string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Required. Resource name of backup vault which will be used as storage
+   * location for backups. Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupvault}
+   * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The backupVault. + */ + java.lang.String getBackupVault(); + + /** + * + * + *
+   * Required. Resource name of backup vault which will be used as storage
+   * location for backups. Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupvault}
+   * 
+ * + * + * string backup_vault = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for backupVault. + */ + com.google.protobuf.ByteString getBackupVaultBytes(); + + /** + * + * + *
+   * Output only. The Google Cloud service account to be used by the BackupVault
+   * for taking backups. Specify the email address of the Backup Vault Service
+   * Account.
+   * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupVaultServiceAccount. + */ + java.lang.String getBackupVaultServiceAccount(); + + /** + * + * + *
+   * Output only. The Google Cloud service account to be used by the BackupVault
+   * for taking backups. Specify the email address of the Backup Vault Service
+   * Account.
+   * 
+ * + * string backup_vault_service_account = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for backupVaultServiceAccount. + */ + com.google.protobuf.ByteString getBackupVaultServiceAccountBytes(); + + /** + * + * + *
+   * Optional. Applicable only for Cloud SQL resource_type.
+   *
+   * Configures how long logs will be stored. It is defined in “days”. This
+   * value should be greater than or equal to minimum enforced log retention
+   * duration of the backup vault.
+   * 
+ * + * int64 log_retention_days = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The logRetentionDays. + */ + long getLogRetentionDays(); + + /** + * + * + *
+   * Output only. All resource types to which backupPlan can be applied.
+   * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedResourceTypes. + */ + java.util.List getSupportedResourceTypesList(); + + /** + * + * + *
+   * Output only. All resource types to which backupPlan can be applied.
+   * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedResourceTypes. + */ + int getSupportedResourceTypesCount(); + + /** + * + * + *
+   * Output only. All resource types to which backupPlan can be applied.
+   * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedResourceTypes at the given index. + */ + java.lang.String getSupportedResourceTypes(int index); + + /** + * + * + *
+   * Output only. All resource types to which backupPlan can be applied.
+   * 
+ * + * + * repeated string supported_resource_types = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the supportedResourceTypes at the given index. + */ + com.google.protobuf.ByteString getSupportedResourceTypesBytes(int index); + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + java.lang.String getRevisionId(); + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string revision_id = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString getRevisionIdBytes(); + + /** + * + * + *
+   * Output only. The resource id of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+   * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionName. + */ + java.lang.String getRevisionName(); + + /** + * + * + *
+   * Output only. The resource id of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}`
+   * 
+ * + * string revision_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionName. + */ + com.google.protobuf.ByteString getRevisionNameBytes(); + + com.google.cloud.backupdr.v1beta.BackupPlan.ResourcePropertiesCase getResourcePropertiesCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanProto.java new file mode 100644 index 000000000000..1c53b670d101 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanProto.java @@ -0,0 +1,484 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class BackupPlanProto extends com.google.protobuf.GeneratedFile { + private BackupPlanProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupPlanProto"); + } + + 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_backupdr_v1beta_BackupPlan_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupPlan_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupPlan_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupPlan_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_StandardSchedule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_StandardSchedule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupWindow_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_WeekDayOfMonth_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_WeekDayOfMonth_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupPlansRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupPlansRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupPlansResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupPlansResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupPlanRevision_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupPlanRevision_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRevisionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRevisionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DiskBackupPlanProperties_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DiskBackupPlanProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupPlanProperties_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupPlanProperties_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/backupdr/v1beta/backuppla" + + "n.proto\022\034google.cloud.backupdr.v1beta\032\037g" + + "oogle/api/field_behavior.proto\032\033google/a" + + "pi/field_info.proto\032\031google/api/resource.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\032\033googl" + + "e/type/dayofweek.proto\032\027google/type/month.proto\"\331\t\n\n" + + "BackupPlan\022b\n" + + "\033disk_backup_plan_properties\030\023 \001(\01326.google.cloud.backu" + + "pdr.v1beta.DiskBackupPlanPropertiesB\003\340A\001H\000\022y\n" + + "\'compute_instance_backup_plan_properties\030\024" + + " \001(\0132A.google.cloud.backupdr.v1be" + + "ta.ComputeInstanceBackupPlanPropertiesB\003\340A\001H\000\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\003\340A\010\022\030\n" + + "\013description\030\002 \001(\tB\003\340A\001\022I\n" + + "\006labels\030\003 \003(\01324.google.c" + + "loud.backupdr.v1beta.BackupPlan.LabelsEntryB\003\340A\001\0224\n" + + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022C\n" + + "\014backup_rules\030\006" + + " \003(\0132(.google.cloud.backupdr.v1beta.BackupRuleB\003\340A\001\0220\n" + + "#max_custom_on_demand_retention_days\030\022 \001(\005B\003\340A\001\022B\n" + + "\005state\030\007" + + " \001(\0162..google.cloud.backupdr.v1beta.BackupPlan.StateB\003\340A\003\022\032\n\r" + + "resource_type\030\010 \001(\tB\003\340A\002\022\021\n" + + "\004etag\030\t \001(\tB\003\340A\001\022A\n" + + "\014backup_vault\030\n" + + " \001(\tB+\340A\002\372A%\n" + + "#backupdr.googleapis.com/BackupVault\022)\n" + + "\034backup_vault_service_account\030\013 \001(\tB\003\340A\003\022\037\n" + + "\022log_retention_days\030\014 \001(\003B\003\340A\001\022%\n" + + "\030supported_resource_types\030\r" + + " \003(\tB\003\340A\003\022\030\n" + + "\013revision_id\030\016 \001(\tB\003\340A\003\022\032\n\r" + + "revision_name\030\017 \001(\tB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"b\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010DELETING\020\003\022\014\n" + + "\010INACTIVE\020\004\022\014\n" + + "\010UPDATING\020\005:\204\001\352A\200\001\n" + + "\"backupdr.googleapis.com/BackupPlan\022Aprojects/{project}/loc" + + "ations/{location}/backupPlans/{backup_plan}*\013backupPlans2\n" + + "backupPlanB\025\n" + + "\023resource_properties\"\264\001\n\n" + + "BackupRule\022P\n" + + "\021standard_schedule\030\005" + + " \001(\0132..google.cloud.backupdr.v1beta.StandardScheduleB\003\340A\001H\000\022\027\n" + + "\007rule_id\030\001 \001(\tB\006\340A\002\340A\005\022\"\n" + + "\025backup_retention_days\030\004 \001(\005B\003\340A\002B\027\n" + + "\025backup_schedule_oneof\"\243\004\n" + + "\020StandardSchedule\022[\n" + + "\017recurrence_type\030\001 \001(\016" + + "2=.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceTypeB\003\340A\002\022\035\n" + + "\020hourly_frequency\030\002 \001(\005B\003\340A\001\0221\n" + + "\014days_of_week\030\003" + + " \003(\0162\026.google.type.DayOfWeekB\003\340A\001\022\032\n\r" + + "days_of_month\030\004 \003(\005B\003\340A\001\022L\n" + + "\021week_day_of_month\030\005" + + " \001(\0132,.google.cloud.backupdr.v1beta.WeekDayOfMonthB\003\340A\001\022\'\n" + + "\006months\030\006 \003(\0162\022.google.type.MonthB\003\340A\001\022F\n\r" + + "backup_window\030\007 \001(\013" + + "2*.google.cloud.backupdr.v1beta.BackupWindowB\003\340A\002\022\026\n" + + "\ttime_zone\030\010 \001(\tB\003\340A\002\"m\n" + + "\016RecurrenceType\022\037\n" + + "\033RECURRENCE_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006HOURLY\020\001\022\t\n" + + "\005DAILY\020\002\022\n\n" + + "\006WEEKLY\020\003\022\013\n" + + "\007MONTHLY\020\004\022\n\n" + + "\006YEARLY\020\005\"L\n" + + "\014BackupWindow\022\036\n" + + "\021start_hour_of_day\030\001 \001(\005B\003\340A\002\022\034\n" + + "\017end_hour_of_day\030\002 \001(\005B\003\340A\002\"\376\001\n" + + "\016WeekDayOfMonth\022T\n\r" + + "week_of_month\030\001 \001(\01628.google.cloud." + + "backupdr.v1beta.WeekDayOfMonth.WeekOfMonthB\003\340A\002\0220\n" + + "\013day_of_week\030\002 \001(\0162\026.google.type.DayOfWeekB\003\340A\002\"d\n" + + "\013WeekOfMonth\022\035\n" + + "\031WEEK_OF_MONTH_UNSPECIFIED\020\000\022\t\n" + + "\005FIRST\020\001\022\n\n" + + "\006SECOND\020\002\022\t\n" + + "\005THIRD\020\003\022\n\n" + + "\006FOURTH\020\004\022\010\n" + + "\004LAST\020\005\"\327\001\n" + + "\027CreateBackupPlanRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"backupdr.googleapis.com/BackupPlan\022\033\n" + + "\016backup_plan_id\030\002 \001(\tB\003\340A\002\022B\n" + + "\013backup_plan\030\003" + + " \001(\0132(.google.cloud.backupdr.v1beta.BackupPlanB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\261\001\n" + + "\026ListBackupPlansRequest\022:\n" + + "\006parent\030\001 \001(" + + "\tB*\340A\002\372A$\022\"backupdr.googleapis.com/BackupPlan\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\207\001\n" + + "\027ListBackupPlansResponse\022>\n" + + "\014backup_plans\030\001 \003(\0132(.google.cloud.backupdr.v1beta.BackupPlan\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"P\n" + + "\024GetBackupPlanRequest\0228\n" + + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"backupdr.googleapis.com/BackupPlan\"t\n" + + "\027DeleteBackupPlanRequest\0228\n" + + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"backupdr.googleapis.com/BackupPlan\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\264\001\n" + + "\027UpdateBackupPlanRequest\022B\n" + + "\013backup_plan\030\001" + + " \001(\0132(.google.cloud.backupdr.v1beta.BackupPlanB\003\340A\002\0224\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\230\004\n" + + "\022BackupPlanRevision\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\003\340A\010\022\030\n" + + "\013revision_id\030\002 \001(\tB\003\340A\003\022J\n" + + "\005state\030\003" + + " \001(\01626.google.cloud.backupdr.v1beta.BackupPlanRevision.StateB\003\340A\003\022F\n" + + "\024backup_plan_snapshot\030\004" + + " \001(\0132(.google.cloud.backupdr.v1beta.BackupPlan\0224\n" + + "\013create_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"T\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010DELETING\020\003\022\014\n" + + "\010INACTIVE\020\004:\261\001\352A\255\001\n" + + "*backupdr.googleapis.com/BackupPlanRevision\022Vprojects/{project}/locations/{" + + "location}/backupPlans/{backup_plan}/revi" + + "sions/{revision}*\023backupPlanRevisions2\022backupPlanRevision\"`\n" + + "\034GetBackupPlanRevisionRequest\022@\n" + + "\004name\030\001 \001(\tB2\340A\002\372A,\n" + + "*backupdr.googleapis.com/BackupPlanRevision\"\225\001\n" + + "\036ListBackupPlanRevisionsRequest\022B\n" + + "\006parent\030\001 \001(" + + "\tB2\340A\002\372A,\022*backupdr.googleapis.com/BackupPlanRevision\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\240\001\n" + + "\037ListBackupPlanRevisionsResponse\022O\n" + + "\025backup_plan_revisions\030\001" + + " \003(\01320.google.cloud.backupdr.v1beta.BackupPlanRevision\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"4\n" + + "\030DiskBackupPlanProperties\022\030\n" + + "\013guest_flush\030\001 \001(\010B\003\340A\001\"?\n" + + "#ComputeInstanceBackupPlanProperties\022\030\n" + + "\013guest_flush\030\001 \001(\010B\003\340A\001B\323\001\n" + + " com.google.cloud.backupdr.v1betaB\017BackupPlanPr" + + "otoP\001Z + * `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in + * time. + * + * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupPlanRevision} + */ +@com.google.protobuf.Generated +public final class BackupPlanRevision extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupPlanRevision) + BackupPlanRevisionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupPlanRevision"); + } + + // Use BackupPlanRevision.newBuilder() to construct. + private BackupPlanRevision(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupPlanRevision() { + name_ = ""; + revisionId_ = ""; + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanRevision_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanRevision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupPlanRevision.class, + com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder.class); + } + + /** + * + * + *
+   * The state of the `BackupPlanRevision`.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupPlanRevision.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The resource is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The resource has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The resource is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * The resource has been created but is not usable.
+     * 
+ * + * INACTIVE = 4; + */ + INACTIVE(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The resource is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The resource has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The resource is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + /** + * + * + *
+     * The resource has been created but is not usable.
+     * 
+ * + * INACTIVE = 4; + */ + public static final int INACTIVE_VALUE = 4; + + 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 ACTIVE; + case 3: + return DELETING; + case 4: + return INACTIVE; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanRevision.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.backupdr.v1beta.BackupPlanRevision.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 REVISION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object revisionId_ = ""; + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + @java.lang.Override + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + 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(); + revisionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + + /** + * + * + *
+   * Output only. Resource State
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.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. Resource State
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanRevision.State getState() { + com.google.cloud.backupdr.v1beta.BackupPlanRevision.State result = + com.google.cloud.backupdr.v1beta.BackupPlanRevision.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupPlanRevision.State.UNRECOGNIZED + : result; + } + + public static final int BACKUP_PLAN_SNAPSHOT_FIELD_NUMBER = 4; + private com.google.cloud.backupdr.v1beta.BackupPlan backupPlanSnapshot_; + + /** + * + * + *
+   * The Backup Plan being encompassed by this revision.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + * + * @return Whether the backupPlanSnapshot field is set. + */ + @java.lang.Override + public boolean hasBackupPlanSnapshot() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The Backup Plan being encompassed by this revision.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + * + * @return The backupPlanSnapshot. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlanSnapshot() { + return backupPlanSnapshot_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlanSnapshot_; + } + + /** + * + * + *
+   * The Backup Plan being encompassed by this revision.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanSnapshotOrBuilder() { + return backupPlanSnapshot_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlanSnapshot_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 timestamp that the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, revisionId_); + } + if (state_ + != com.google.cloud.backupdr.v1beta.BackupPlanRevision.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getBackupPlanSnapshot()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(revisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, revisionId_); + } + if (state_ + != com.google.cloud.backupdr.v1beta.BackupPlanRevision.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getBackupPlanSnapshot()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + 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.backupdr.v1beta.BackupPlanRevision)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupPlanRevision other = + (com.google.cloud.backupdr.v1beta.BackupPlanRevision) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRevisionId().equals(other.getRevisionId())) return false; + if (state_ != other.state_) return false; + if (hasBackupPlanSnapshot() != other.hasBackupPlanSnapshot()) return false; + if (hasBackupPlanSnapshot()) { + if (!getBackupPlanSnapshot().equals(other.getBackupPlanSnapshot())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) 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) + REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getRevisionId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasBackupPlanSnapshot()) { + hash = (37 * hash) + BACKUP_PLAN_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanSnapshot().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision 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.backupdr.v1beta.BackupPlanRevision parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision 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.backupdr.v1beta.BackupPlanRevision parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupPlanRevision 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in
+   * time.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupPlanRevision} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupPlanRevision) + com.google.cloud.backupdr.v1beta.BackupPlanRevisionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanRevision_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanRevision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupPlanRevision.class, + com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupPlanRevision.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupPlanSnapshotFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + revisionId_ = ""; + state_ = 0; + backupPlanSnapshot_ = null; + if (backupPlanSnapshotBuilder_ != null) { + backupPlanSnapshotBuilder_.dispose(); + backupPlanSnapshotBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupPlanRevision_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanRevision getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanRevision.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanRevision build() { + com.google.cloud.backupdr.v1beta.BackupPlanRevision result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanRevision buildPartial() { + com.google.cloud.backupdr.v1beta.BackupPlanRevision result = + new com.google.cloud.backupdr.v1beta.BackupPlanRevision(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupPlanRevision result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.revisionId_ = revisionId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.backupPlanSnapshot_ = + backupPlanSnapshotBuilder_ == null + ? backupPlanSnapshot_ + : backupPlanSnapshotBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupPlanRevision) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupPlanRevision) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupPlanRevision other) { + if (other == com.google.cloud.backupdr.v1beta.BackupPlanRevision.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRevisionId().isEmpty()) { + revisionId_ = other.revisionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasBackupPlanSnapshot()) { + mergeBackupPlanSnapshot(other.getBackupPlanSnapshot()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + 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 18: + { + revisionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage( + internalGetBackupPlanSnapshotFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + 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_ = ""; + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 java.lang.Object revisionId_ = ""; + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + public java.lang.String getRevisionId() { + java.lang.Object ref = revisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + public com.google.protobuf.ByteString getRevisionIdBytes() { + java.lang.Object ref = revisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + revisionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRevisionId() { + revisionId_ = getDefaultInstance().getRevisionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+     *
+     * Example: v0, v1, v2, etc.
+     * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for revisionId to set. + * @return This builder for chaining. + */ + public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + revisionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. Resource State
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.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. Resource State
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Resource State
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanRevision.State getState() { + com.google.cloud.backupdr.v1beta.BackupPlanRevision.State result = + com.google.cloud.backupdr.v1beta.BackupPlanRevision.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupPlanRevision.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Resource State
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.BackupPlanRevision.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Resource State
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.BackupPlan backupPlanSnapshot_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder> + backupPlanSnapshotBuilder_; + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + * + * @return Whether the backupPlanSnapshot field is set. + */ + public boolean hasBackupPlanSnapshot() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + * + * @return The backupPlanSnapshot. + */ + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlanSnapshot() { + if (backupPlanSnapshotBuilder_ == null) { + return backupPlanSnapshot_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlanSnapshot_; + } else { + return backupPlanSnapshotBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + public Builder setBackupPlanSnapshot(com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlanSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanSnapshot_ = value; + } else { + backupPlanSnapshotBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + public Builder setBackupPlanSnapshot( + com.google.cloud.backupdr.v1beta.BackupPlan.Builder builderForValue) { + if (backupPlanSnapshotBuilder_ == null) { + backupPlanSnapshot_ = builderForValue.build(); + } else { + backupPlanSnapshotBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + public Builder mergeBackupPlanSnapshot(com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlanSnapshotBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && backupPlanSnapshot_ != null + && backupPlanSnapshot_ + != com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance()) { + getBackupPlanSnapshotBuilder().mergeFrom(value); + } else { + backupPlanSnapshot_ = value; + } + } else { + backupPlanSnapshotBuilder_.mergeFrom(value); + } + if (backupPlanSnapshot_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + public Builder clearBackupPlanSnapshot() { + bitField0_ = (bitField0_ & ~0x00000008); + backupPlanSnapshot_ = null; + if (backupPlanSnapshotBuilder_ != null) { + backupPlanSnapshotBuilder_.dispose(); + backupPlanSnapshotBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + public com.google.cloud.backupdr.v1beta.BackupPlan.Builder getBackupPlanSnapshotBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetBackupPlanSnapshotFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + public com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanSnapshotOrBuilder() { + if (backupPlanSnapshotBuilder_ != null) { + return backupPlanSnapshotBuilder_.getMessageOrBuilder(); + } else { + return backupPlanSnapshot_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlanSnapshot_; + } + } + + /** + * + * + *
+     * The Backup Plan being encompassed by this revision.
+     * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder> + internalGetBackupPlanSnapshotFieldBuilder() { + if (backupPlanSnapshotBuilder_ == null) { + backupPlanSnapshotBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder>( + getBackupPlanSnapshot(), getParentForChildren(), isClean()); + backupPlanSnapshot_ = null; + } + return backupPlanSnapshotBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 timestamp that the revision was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupPlanRevision) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupPlanRevision) + private static final com.google.cloud.backupdr.v1beta.BackupPlanRevision DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupPlanRevision(); + } + + public static com.google.cloud.backupdr.v1beta.BackupPlanRevision getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupPlanRevision 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.backupdr.v1beta.BackupPlanRevision getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanRevisionName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanRevisionName.java new file mode 100644 index 000000000000..7508a994d9e9 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanRevisionName.java @@ -0,0 +1,264 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class BackupPlanRevisionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUP_PLAN_REVISION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String backupPlan; + private final String revision; + + @Deprecated + protected BackupPlanRevisionName() { + project = null; + location = null; + backupPlan = null; + revision = null; + } + + private BackupPlanRevisionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + backupPlan = Preconditions.checkNotNull(builder.getBackupPlan()); + revision = Preconditions.checkNotNull(builder.getRevision()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupPlan() { + return backupPlan; + } + + public String getRevision() { + return revision; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BackupPlanRevisionName of( + String project, String location, String backupPlan, String revision) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupPlan(backupPlan) + .setRevision(revision) + .build(); + } + + public static String format(String project, String location, String backupPlan, String revision) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupPlan(backupPlan) + .setRevision(revision) + .build() + .toString(); + } + + public static @Nullable BackupPlanRevisionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUP_PLAN_REVISION.validatedMatch( + formattedString, "BackupPlanRevisionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("backup_plan"), + matchMap.get("revision")); + } + + 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<@Nullable BackupPlanRevisionName> values) { + List list = new ArrayList<>(values.size()); + for (BackupPlanRevisionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BACKUP_PLAN_REVISION.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 (backupPlan != null) { + fieldMapBuilder.put("backup_plan", backupPlan); + } + if (revision != null) { + fieldMapBuilder.put("revision", revision); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BACKUP_PLAN_REVISION.instantiate( + "project", project, "location", location, "backup_plan", backupPlan, "revision", revision); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BackupPlanRevisionName that = ((BackupPlanRevisionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.backupPlan, that.backupPlan) + && Objects.equals(this.revision, that.revision); + } + 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(backupPlan); + h *= 1000003; + h ^= Objects.hashCode(revision); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}. + */ + public static class Builder { + private String project; + private String location; + private String backupPlan; + private String revision; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupPlan() { + return backupPlan; + } + + public String getRevision() { + return revision; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setBackupPlan(String backupPlan) { + this.backupPlan = backupPlan; + return this; + } + + public Builder setRevision(String revision) { + this.revision = revision; + return this; + } + + private Builder(BackupPlanRevisionName backupPlanRevisionName) { + this.project = backupPlanRevisionName.project; + this.location = backupPlanRevisionName.location; + this.backupPlan = backupPlanRevisionName.backupPlan; + this.revision = backupPlanRevisionName.revision; + } + + public BackupPlanRevisionName build() { + return new BackupPlanRevisionName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanRevisionOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanRevisionOrBuilder.java new file mode 100644 index 000000000000..ed2bfdf8f1b4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupPlanRevisionOrBuilder.java @@ -0,0 +1,201 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupPlanRevisionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupPlanRevision) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Identifier. The resource name of the `BackupPlanRevision`.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revisionId. + */ + java.lang.String getRevisionId(); + + /** + * + * + *
+   * Output only. The user friendly revision ID of the `BackupPlanRevision`.
+   *
+   * Example: v0, v1, v2, etc.
+   * 
+ * + * string revision_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revisionId. + */ + com.google.protobuf.ByteString getRevisionIdBytes(); + + /** + * + * + *
+   * Output only. Resource State
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. Resource State
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanRevision.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.BackupPlanRevision.State getState(); + + /** + * + * + *
+   * The Backup Plan being encompassed by this revision.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + * + * @return Whether the backupPlanSnapshot field is set. + */ + boolean hasBackupPlanSnapshot(); + + /** + * + * + *
+   * The Backup Plan being encompassed by this revision.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + * + * @return The backupPlanSnapshot. + */ + com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlanSnapshot(); + + /** + * + * + *
+   * The Backup Plan being encompassed by this revision.
+   * 
+ * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan_snapshot = 4; + */ + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanSnapshotOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp that the revision was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupRule.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupRule.java new file mode 100644 index 000000000000..0b19480ab142 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupRule.java @@ -0,0 +1,1188 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * `BackupRule` binds the backup schedule to a retention policy.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupRule} + */ +@com.google.protobuf.Generated +public final class BackupRule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupRule) + BackupRuleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupRule"); + } + + // Use BackupRule.newBuilder() to construct. + private BackupRule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupRule() { + ruleId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupRule.class, + com.google.cloud.backupdr.v1beta.BackupRule.Builder.class); + } + + private int backupScheduleOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object backupScheduleOneof_; + + public enum BackupScheduleOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STANDARD_SCHEDULE(5), + BACKUPSCHEDULEONEOF_NOT_SET(0); + private final int value; + + private BackupScheduleOneofCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BackupScheduleOneofCase valueOf(int value) { + return forNumber(value); + } + + public static BackupScheduleOneofCase forNumber(int value) { + switch (value) { + case 5: + return STANDARD_SCHEDULE; + case 0: + return BACKUPSCHEDULEONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BackupScheduleOneofCase getBackupScheduleOneofCase() { + return BackupScheduleOneofCase.forNumber(backupScheduleOneofCase_); + } + + public static final int STANDARD_SCHEDULE_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Optional. Defines a schedule that runs within the confines of a defined
+   * window of time.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the standardSchedule field is set. + */ + @java.lang.Override + public boolean hasStandardSchedule() { + return backupScheduleOneofCase_ == 5; + } + + /** + * + * + *
+   * Optional. Defines a schedule that runs within the confines of a defined
+   * window of time.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardSchedule. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardSchedule getStandardSchedule() { + if (backupScheduleOneofCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.StandardSchedule) backupScheduleOneof_; + } + return com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Defines a schedule that runs within the confines of a defined
+   * window of time.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardScheduleOrBuilder getStandardScheduleOrBuilder() { + if (backupScheduleOneofCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.StandardSchedule) backupScheduleOneof_; + } + return com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance(); + } + + public static final int RULE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleId_ = ""; + + /** + * + * + *
+   * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+   * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+   * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+   * /[a-z][a-z0-9-]{,62}/.
+   * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The ruleId. + */ + @java.lang.Override + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + 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(); + ruleId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+   * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+   * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+   * /[a-z][a-z0-9-]{,62}/.
+   * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for ruleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_RETENTION_DAYS_FIELD_NUMBER = 4; + private int backupRetentionDays_ = 0; + + /** + * + * + *
+   * Required. Configures the duration for which backup data will be kept. It is
+   * defined in “days”. The value should be greater than or equal to minimum
+   * enforced retention of the backup vault.
+   *
+   * Minimum value is 1 and maximum value is 36159 for custom retention
+   * on-demand backup.
+   * Minimum and maximum values are workload specific for all other rules.
+   * Note: Longer retention can lead to higher storage costs post introductory
+   * trial. We recommend starting with a short duration of 3 days or less.
+   * 
+ * + * int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupRetentionDays. + */ + @java.lang.Override + public int getBackupRetentionDays() { + return backupRetentionDays_; + } + + 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.GeneratedMessage.isStringEmpty(ruleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ruleId_); + } + if (backupRetentionDays_ != 0) { + output.writeInt32(4, backupRetentionDays_); + } + if (backupScheduleOneofCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.backupdr.v1beta.StandardSchedule) backupScheduleOneof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ruleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ruleId_); + } + if (backupRetentionDays_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, backupRetentionDays_); + } + if (backupScheduleOneofCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.backupdr.v1beta.StandardSchedule) backupScheduleOneof_); + } + 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.backupdr.v1beta.BackupRule)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupRule other = + (com.google.cloud.backupdr.v1beta.BackupRule) obj; + + if (!getRuleId().equals(other.getRuleId())) return false; + if (getBackupRetentionDays() != other.getBackupRetentionDays()) return false; + if (!getBackupScheduleOneofCase().equals(other.getBackupScheduleOneofCase())) return false; + switch (backupScheduleOneofCase_) { + case 5: + if (!getStandardSchedule().equals(other.getStandardSchedule())) return false; + break; + case 0: + default: + } + 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) + RULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getRuleId().hashCode(); + hash = (37 * hash) + BACKUP_RETENTION_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getBackupRetentionDays(); + switch (backupScheduleOneofCase_) { + case 5: + hash = (37 * hash) + STANDARD_SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getStandardSchedule().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule 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.backupdr.v1beta.BackupRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule 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.backupdr.v1beta.BackupRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupRule 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * `BackupRule` binds the backup schedule to a retention policy.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupRule) + com.google.cloud.backupdr.v1beta.BackupRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupRule.class, + com.google.cloud.backupdr.v1beta.BackupRule.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (standardScheduleBuilder_ != null) { + standardScheduleBuilder_.clear(); + } + ruleId_ = ""; + backupRetentionDays_ = 0; + backupScheduleOneofCase_ = 0; + backupScheduleOneof_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupRule_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupRule getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupRule build() { + com.google.cloud.backupdr.v1beta.BackupRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupRule buildPartial() { + com.google.cloud.backupdr.v1beta.BackupRule result = + new com.google.cloud.backupdr.v1beta.BackupRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ruleId_ = ruleId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupRetentionDays_ = backupRetentionDays_; + } + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.BackupRule result) { + result.backupScheduleOneofCase_ = backupScheduleOneofCase_; + result.backupScheduleOneof_ = this.backupScheduleOneof_; + if (backupScheduleOneofCase_ == 5 && standardScheduleBuilder_ != null) { + result.backupScheduleOneof_ = standardScheduleBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupRule) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupRule other) { + if (other == com.google.cloud.backupdr.v1beta.BackupRule.getDefaultInstance()) return this; + if (!other.getRuleId().isEmpty()) { + ruleId_ = other.ruleId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getBackupRetentionDays() != 0) { + setBackupRetentionDays(other.getBackupRetentionDays()); + } + switch (other.getBackupScheduleOneofCase()) { + case STANDARD_SCHEDULE: + { + mergeStandardSchedule(other.getStandardSchedule()); + break; + } + case BACKUPSCHEDULEONEOF_NOT_SET: + { + break; + } + } + 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: + { + ruleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 32: + { + backupRetentionDays_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetStandardScheduleFieldBuilder().getBuilder(), extensionRegistry); + backupScheduleOneofCase_ = 5; + 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 backupScheduleOneofCase_ = 0; + private java.lang.Object backupScheduleOneof_; + + public BackupScheduleOneofCase getBackupScheduleOneofCase() { + return BackupScheduleOneofCase.forNumber(backupScheduleOneofCase_); + } + + public Builder clearBackupScheduleOneof() { + backupScheduleOneofCase_ = 0; + backupScheduleOneof_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.StandardSchedule, + com.google.cloud.backupdr.v1beta.StandardSchedule.Builder, + com.google.cloud.backupdr.v1beta.StandardScheduleOrBuilder> + standardScheduleBuilder_; + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the standardSchedule field is set. + */ + @java.lang.Override + public boolean hasStandardSchedule() { + return backupScheduleOneofCase_ == 5; + } + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardSchedule. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardSchedule getStandardSchedule() { + if (standardScheduleBuilder_ == null) { + if (backupScheduleOneofCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.StandardSchedule) backupScheduleOneof_; + } + return com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance(); + } else { + if (backupScheduleOneofCase_ == 5) { + return standardScheduleBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStandardSchedule(com.google.cloud.backupdr.v1beta.StandardSchedule value) { + if (standardScheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupScheduleOneof_ = value; + onChanged(); + } else { + standardScheduleBuilder_.setMessage(value); + } + backupScheduleOneofCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStandardSchedule( + com.google.cloud.backupdr.v1beta.StandardSchedule.Builder builderForValue) { + if (standardScheduleBuilder_ == null) { + backupScheduleOneof_ = builderForValue.build(); + onChanged(); + } else { + standardScheduleBuilder_.setMessage(builderForValue.build()); + } + backupScheduleOneofCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeStandardSchedule(com.google.cloud.backupdr.v1beta.StandardSchedule value) { + if (standardScheduleBuilder_ == null) { + if (backupScheduleOneofCase_ == 5 + && backupScheduleOneof_ + != com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance()) { + backupScheduleOneof_ = + com.google.cloud.backupdr.v1beta.StandardSchedule.newBuilder( + (com.google.cloud.backupdr.v1beta.StandardSchedule) backupScheduleOneof_) + .mergeFrom(value) + .buildPartial(); + } else { + backupScheduleOneof_ = value; + } + onChanged(); + } else { + if (backupScheduleOneofCase_ == 5) { + standardScheduleBuilder_.mergeFrom(value); + } else { + standardScheduleBuilder_.setMessage(value); + } + } + backupScheduleOneofCase_ = 5; + return this; + } + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStandardSchedule() { + if (standardScheduleBuilder_ == null) { + if (backupScheduleOneofCase_ == 5) { + backupScheduleOneofCase_ = 0; + backupScheduleOneof_ = null; + onChanged(); + } + } else { + if (backupScheduleOneofCase_ == 5) { + backupScheduleOneofCase_ = 0; + backupScheduleOneof_ = null; + } + standardScheduleBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.StandardSchedule.Builder getStandardScheduleBuilder() { + return internalGetStandardScheduleFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardScheduleOrBuilder + getStandardScheduleOrBuilder() { + if ((backupScheduleOneofCase_ == 5) && (standardScheduleBuilder_ != null)) { + return standardScheduleBuilder_.getMessageOrBuilder(); + } else { + if (backupScheduleOneofCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.StandardSchedule) backupScheduleOneof_; + } + return com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Defines a schedule that runs within the confines of a defined
+     * window of time.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.StandardSchedule, + com.google.cloud.backupdr.v1beta.StandardSchedule.Builder, + com.google.cloud.backupdr.v1beta.StandardScheduleOrBuilder> + internalGetStandardScheduleFieldBuilder() { + if (standardScheduleBuilder_ == null) { + if (!(backupScheduleOneofCase_ == 5)) { + backupScheduleOneof_ = + com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance(); + } + standardScheduleBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.StandardSchedule, + com.google.cloud.backupdr.v1beta.StandardSchedule.Builder, + com.google.cloud.backupdr.v1beta.StandardScheduleOrBuilder>( + (com.google.cloud.backupdr.v1beta.StandardSchedule) backupScheduleOneof_, + getParentForChildren(), + isClean()); + backupScheduleOneof_ = null; + } + backupScheduleOneofCase_ = 5; + onChanged(); + return standardScheduleBuilder_; + } + + private java.lang.Object ruleId_ = ""; + + /** + * + * + *
+     * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+     * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+     * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+     * /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The ruleId. + */ + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+     * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+     * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+     * /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for ruleId. + */ + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+     * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+     * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+     * /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+     * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+     * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+     * /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearRuleId() { + ruleId_ = getDefaultInstance().getRuleId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+     * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+     * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+     * /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int backupRetentionDays_; + + /** + * + * + *
+     * Required. Configures the duration for which backup data will be kept. It is
+     * defined in “days”. The value should be greater than or equal to minimum
+     * enforced retention of the backup vault.
+     *
+     * Minimum value is 1 and maximum value is 36159 for custom retention
+     * on-demand backup.
+     * Minimum and maximum values are workload specific for all other rules.
+     * Note: Longer retention can lead to higher storage costs post introductory
+     * trial. We recommend starting with a short duration of 3 days or less.
+     * 
+ * + * int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupRetentionDays. + */ + @java.lang.Override + public int getBackupRetentionDays() { + return backupRetentionDays_; + } + + /** + * + * + *
+     * Required. Configures the duration for which backup data will be kept. It is
+     * defined in “days”. The value should be greater than or equal to minimum
+     * enforced retention of the backup vault.
+     *
+     * Minimum value is 1 and maximum value is 36159 for custom retention
+     * on-demand backup.
+     * Minimum and maximum values are workload specific for all other rules.
+     * Note: Longer retention can lead to higher storage costs post introductory
+     * trial. We recommend starting with a short duration of 3 days or less.
+     * 
+ * + * int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The backupRetentionDays to set. + * @return This builder for chaining. + */ + public Builder setBackupRetentionDays(int value) { + + backupRetentionDays_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Configures the duration for which backup data will be kept. It is
+     * defined in “days”. The value should be greater than or equal to minimum
+     * enforced retention of the backup vault.
+     *
+     * Minimum value is 1 and maximum value is 36159 for custom retention
+     * on-demand backup.
+     * Minimum and maximum values are workload specific for all other rules.
+     * Note: Longer retention can lead to higher storage costs post introductory
+     * trial. We recommend starting with a short duration of 3 days or less.
+     * 
+ * + * int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBackupRetentionDays() { + bitField0_ = (bitField0_ & ~0x00000004); + backupRetentionDays_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupRule) + private static final com.google.cloud.backupdr.v1beta.BackupRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupRule(); + } + + public static com.google.cloud.backupdr.v1beta.BackupRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupRule 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.backupdr.v1beta.BackupRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupRuleOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupRuleOrBuilder.java new file mode 100644 index 000000000000..7b854a9381d8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupRuleOrBuilder.java @@ -0,0 +1,133 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Defines a schedule that runs within the confines of a defined
+   * window of time.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the standardSchedule field is set. + */ + boolean hasStandardSchedule(); + + /** + * + * + *
+   * Optional. Defines a schedule that runs within the confines of a defined
+   * window of time.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The standardSchedule. + */ + com.google.cloud.backupdr.v1beta.StandardSchedule getStandardSchedule(); + + /** + * + * + *
+   * Optional. Defines a schedule that runs within the confines of a defined
+   * window of time.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule standard_schedule = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.StandardScheduleOrBuilder getStandardScheduleOrBuilder(); + + /** + * + * + *
+   * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+   * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+   * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+   * /[a-z][a-z0-9-]{,62}/.
+   * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The ruleId. + */ + java.lang.String getRuleId(); + + /** + * + * + *
+   * Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is
+   * unique per `BackupPlan`.The `rule_id` must start with a lowercase letter
+   * followed by up to 62 lowercase letters, numbers, or hyphens. Pattern,
+   * /[a-z][a-z0-9-]{,62}/.
+   * 
+ * + * + * string rule_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for ruleId. + */ + com.google.protobuf.ByteString getRuleIdBytes(); + + /** + * + * + *
+   * Required. Configures the duration for which backup data will be kept. It is
+   * defined in “days”. The value should be greater than or equal to minimum
+   * enforced retention of the backup vault.
+   *
+   * Minimum value is 1 and maximum value is 36159 for custom retention
+   * on-demand backup.
+   * Minimum and maximum values are workload specific for all other rules.
+   * Note: Longer retention can lead to higher storage costs post introductory
+   * trial. We recommend starting with a short duration of 3 days or less.
+   * 
+ * + * int32 backup_retention_days = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupRetentionDays. + */ + int getBackupRetentionDays(); + + com.google.cloud.backupdr.v1beta.BackupRule.BackupScheduleOneofCase getBackupScheduleOneofCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVault.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVault.java new file mode 100644 index 000000000000..04a4d9a17de6 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVault.java @@ -0,0 +1,6139 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Message describing a BackupVault object.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupVault} + */ +@com.google.protobuf.Generated +public final class BackupVault extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupVault) + BackupVaultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupVault"); + } + + // Use BackupVault.newBuilder() to construct. + private BackupVault(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupVault() { + name_ = ""; + description_ = ""; + backupRetentionInheritance_ = 0; + etag_ = ""; + state_ = 0; + serviceAccount_ = ""; + uid_ = ""; + accessRestriction_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + case 22: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupVault.class, + com.google.cloud.backupdr.v1beta.BackupVault.Builder.class); + } + + /** + * + * + *
+   * How a backup's enforced retention end time is inherited.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance} + */ + public enum BackupRetentionInheritance implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Inheritance behavior not set. This will default to
+     * `INHERIT_VAULT_RETENTION`.
+     * 
+ * + * BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0; + */ + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED(0), + /** + * + * + *
+     * The enforced retention end time of a backup will be inherited from the
+     * backup vault's `backup_minimum_enforced_retention_duration` field.
+     *
+     * This is the default behavior.
+     * 
+ * + * INHERIT_VAULT_RETENTION = 1; + */ + INHERIT_VAULT_RETENTION(1), + /** + * + * + *
+     * The enforced retention end time of a backup will always match the expire
+     * time of the backup.
+     *
+     * If this is set, the backup's enforced retention end time will be set to
+     * match the expire time during creation of the backup. When updating, the
+     * ERET and expire time must be updated together and have the same value.
+     * Invalid update requests will be rejected by the server.
+     * 
+ * + * MATCH_BACKUP_EXPIRE_TIME = 2; + */ + MATCH_BACKUP_EXPIRE_TIME(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupRetentionInheritance"); + } + + /** + * + * + *
+     * Inheritance behavior not set. This will default to
+     * `INHERIT_VAULT_RETENTION`.
+     * 
+ * + * BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0; + */ + public static final int BACKUP_RETENTION_INHERITANCE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The enforced retention end time of a backup will be inherited from the
+     * backup vault's `backup_minimum_enforced_retention_duration` field.
+     *
+     * This is the default behavior.
+     * 
+ * + * INHERIT_VAULT_RETENTION = 1; + */ + public static final int INHERIT_VAULT_RETENTION_VALUE = 1; + + /** + * + * + *
+     * The enforced retention end time of a backup will always match the expire
+     * time of the backup.
+     *
+     * If this is set, the backup's enforced retention end time will be set to
+     * match the expire time during creation of the backup. When updating, the
+     * ERET and expire time must be updated together and have the same value.
+     * Invalid update requests will be rejected by the server.
+     * 
+ * + * MATCH_BACKUP_EXPIRE_TIME = 2; + */ + public static final int MATCH_BACKUP_EXPIRE_TIME_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 BackupRetentionInheritance 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 BackupRetentionInheritance forNumber(int value) { + switch (value) { + case 0: + return BACKUP_RETENTION_INHERITANCE_UNSPECIFIED; + case 1: + return INHERIT_VAULT_RETENTION; + case 2: + return MATCH_BACKUP_EXPIRE_TIME; + 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 BackupRetentionInheritance findValueByNumber(int number) { + return BackupRetentionInheritance.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVault.getDescriptor().getEnumTypes().get(0); + } + + private static final BackupRetentionInheritance[] VALUES = values(); + + public static BackupRetentionInheritance 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 BackupRetentionInheritance(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance) + } + + /** + * + * + *
+   * Holds the state of the backup vault resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupVault.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The backup vault is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The backup vault has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The backup vault is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * The backup vault is experiencing an issue and might be unusable.
+     * 
+ * + * ERROR = 4; + */ + ERROR(4), + /** + * + * + *
+     * The backup vault is being updated.
+     * 
+ * + * UPDATING = 5; + */ + UPDATING(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The backup vault is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The backup vault has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The backup vault is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + /** + * + * + *
+     * The backup vault is experiencing an issue and might be unusable.
+     * 
+ * + * ERROR = 4; + */ + public static final int ERROR_VALUE = 4; + + /** + * + * + *
+     * The backup vault 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 ACTIVE; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVault.getDescriptor().getEnumTypes().get(1); + } + + 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.backupdr.v1beta.BackupVault.State) + } + + /** + * + * + *
+   * Holds the access restriction for the backup vault.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupVault.AccessRestriction} + */ + public enum AccessRestriction implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Access restriction not set. If user does not provide any value or pass
+     * this value, it will be changed to WITHIN_ORGANIZATION.
+     * 
+ * + * ACCESS_RESTRICTION_UNSPECIFIED = 0; + */ + ACCESS_RESTRICTION_UNSPECIFIED(0), + /** + * + * + *
+     * Access to or from resources outside your current project will be denied.
+     * 
+ * + * WITHIN_PROJECT = 1; + */ + WITHIN_PROJECT(1), + /** + * + * + *
+     * Access to or from resources outside your current organization will be
+     * denied.
+     * 
+ * + * WITHIN_ORGANIZATION = 2; + */ + WITHIN_ORGANIZATION(2), + /** + * + * + *
+     * No access restriction.
+     * 
+ * + * UNRESTRICTED = 3; + */ + UNRESTRICTED(3), + /** + * + * + *
+     * Access to or from resources outside your current organization will be
+     * denied except for backup appliance.
+     * 
+ * + * WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4; + */ + WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AccessRestriction"); + } + + /** + * + * + *
+     * Access restriction not set. If user does not provide any value or pass
+     * this value, it will be changed to WITHIN_ORGANIZATION.
+     * 
+ * + * ACCESS_RESTRICTION_UNSPECIFIED = 0; + */ + public static final int ACCESS_RESTRICTION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Access to or from resources outside your current project will be denied.
+     * 
+ * + * WITHIN_PROJECT = 1; + */ + public static final int WITHIN_PROJECT_VALUE = 1; + + /** + * + * + *
+     * Access to or from resources outside your current organization will be
+     * denied.
+     * 
+ * + * WITHIN_ORGANIZATION = 2; + */ + public static final int WITHIN_ORGANIZATION_VALUE = 2; + + /** + * + * + *
+     * No access restriction.
+     * 
+ * + * UNRESTRICTED = 3; + */ + public static final int UNRESTRICTED_VALUE = 3; + + /** + * + * + *
+     * Access to or from resources outside your current organization will be
+     * denied except for backup appliance.
+     * 
+ * + * WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4; + */ + public static final int WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA_VALUE = 4; + + 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 AccessRestriction 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 AccessRestriction forNumber(int value) { + switch (value) { + case 0: + return ACCESS_RESTRICTION_UNSPECIFIED; + case 1: + return WITHIN_PROJECT; + case 2: + return WITHIN_ORGANIZATION; + case 3: + return UNRESTRICTED; + case 4: + return WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA; + 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 AccessRestriction findValueByNumber(int number) { + return AccessRestriction.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVault.getDescriptor().getEnumTypes().get(2); + } + + private static final AccessRestriction[] VALUES = values(); + + public static AccessRestriction 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 AccessRestriction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.BackupVault.AccessRestriction) + } + + public interface EncryptionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+     * Must be in the same region as the vault. Some workload backups like
+     * compute disk backups may use their inherited source key instead. Format:
+     * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+     * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKeyName field is set. + */ + boolean hasKmsKeyName(); + + /** + * + * + *
+     * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+     * Must be in the same region as the vault. Some workload backups like
+     * compute disk backups may use their inherited source key instead. Format:
+     * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+     * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + + /** + * + * + *
+     * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+     * Must be in the same region as the vault. Some workload backups like
+     * compute disk backups may use their inherited source key instead. Format:
+     * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+     * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); + } + + /** + * + * + *
+   * Message describing the EncryptionConfig of backup vault.
+   * This determines how data within the vault is encrypted at rest.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig} + */ + public static final class EncryptionConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig) + EncryptionConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "EncryptionConfig"); + } + + // Use EncryptionConfig.newBuilder() to construct. + private EncryptionConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EncryptionConfig() { + kmsKeyName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.class, + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.Builder.class); + } + + private int bitField0_; + public static final int KMS_KEY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
+     * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+     * Must be in the same region as the vault. Some workload backups like
+     * compute disk backups may use their inherited source key instead. Format:
+     * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+     * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKeyName field is set. + */ + @java.lang.Override + public boolean hasKmsKeyName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+     * Must be in the same region as the vault. Some workload backups like
+     * compute disk backups may use their inherited source key instead. Format:
+     * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+     * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + 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(); + kmsKeyName_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+     * Must be in the same region as the vault. Some workload backups like
+     * compute disk backups may use their inherited source key instead. Format:
+     * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+     * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, kmsKeyName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kmsKeyName_); + } + 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.backupdr.v1beta.BackupVault.EncryptionConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig other = + (com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig) obj; + + if (hasKmsKeyName() != other.hasKmsKeyName()) return false; + if (hasKmsKeyName()) { + if (!getKmsKeyName().equals(other.getKmsKeyName())) 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 (hasKmsKeyName()) { + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig 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.backupdr.v1beta.BackupVault.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig 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.backupdr.v1beta.BackupVault.EncryptionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupVault.EncryptionConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Message describing the EncryptionConfig of backup vault.
+     * This determines how data within the vault is encrypted at rest.
+     * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig) + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.class, + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKeyName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig build() { + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig buildPartial() { + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig result = + new com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kmsKeyName_ = kmsKeyName_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig other) { + if (other + == com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.getDefaultInstance()) + return this; + if (other.hasKmsKeyName()) { + kmsKeyName_ = other.kmsKeyName_; + 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: + { + kmsKeyName_ = 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 kmsKeyName_ = ""; + + /** + * + * + *
+       * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+       * Must be in the same region as the vault. Some workload backups like
+       * compute disk backups may use their inherited source key instead. Format:
+       * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+       * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the kmsKeyName field is set. + */ + public boolean hasKmsKeyName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+       * Must be in the same region as the vault. Some workload backups like
+       * compute disk backups may use their inherited source key instead. Format:
+       * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+       * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+       * Must be in the same region as the vault. Some workload backups like
+       * compute disk backups may use their inherited source key instead. Format:
+       * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+       * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+       * Must be in the same region as the vault. Some workload backups like
+       * compute disk backups may use their inherited source key instead. Format:
+       * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+       * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+       * Must be in the same region as the vault. Some workload backups like
+       * compute disk backups may use their inherited source key instead. Format:
+       * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+       * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The Cloud KMS key name to encrypt backups in this backup vault.
+       * Must be in the same region as the vault. Some workload backups like
+       * compute disk backups may use their inherited source key instead. Format:
+       * projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
+       * 
+ * + * + * optional string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKeyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig) + private static final com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig(); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EncryptionConfig 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.backupdr.v1beta.BackupVault.EncryptionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Identifier. Name of the backup vault to create. It must have
+   * the
+   * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+   * `{backupvault}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the project and location.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Identifier. Name of the backup vault to create. It must have
+   * the
+   * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+   * `{backupvault}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the project and location.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the BackupVault instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The description of the BackupVault instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The description of the BackupVault instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_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(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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 CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.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 instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.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 UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int BACKUP_MINIMUM_ENFORCED_RETENTION_DURATION_FIELD_NUMBER = 20; + private com.google.protobuf.Duration backupMinimumEnforcedRetentionDuration_; + + /** + * + * + *
+   * Required. The default and minimum enforced retention for each backup within
+   * the backup vault.  The enforced retention for each backup can be extended.
+   * Note: Longer minimum enforced retention period impacts potential storage
+   * costs post introductory trial. We recommend starting with a short duration
+   * of 3 days or less.
+   * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupMinimumEnforcedRetentionDuration field is set. + */ + @java.lang.Override + public boolean hasBackupMinimumEnforcedRetentionDuration() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Required. The default and minimum enforced retention for each backup within
+   * the backup vault.  The enforced retention for each backup can be extended.
+   * Note: Longer minimum enforced retention period impacts potential storage
+   * costs post introductory trial. We recommend starting with a short duration
+   * of 3 days or less.
+   * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupMinimumEnforcedRetentionDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getBackupMinimumEnforcedRetentionDuration() { + return backupMinimumEnforcedRetentionDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : backupMinimumEnforcedRetentionDuration_; + } + + /** + * + * + *
+   * Required. The default and minimum enforced retention for each backup within
+   * the backup vault.  The enforced retention for each backup can be extended.
+   * Note: Longer minimum enforced retention period impacts potential storage
+   * costs post introductory trial. We recommend starting with a short duration
+   * of 3 days or less.
+   * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder + getBackupMinimumEnforcedRetentionDurationOrBuilder() { + return backupMinimumEnforcedRetentionDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : backupMinimumEnforcedRetentionDuration_; + } + + public static final int BACKUP_RETENTION_INHERITANCE_FIELD_NUMBER = 27; + private int backupRetentionInheritance_ = 0; + + /** + * + * + *
+   * Optional. Setting for how a backup's enforced retention end time is
+   * inherited.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the backupRetentionInheritance field is set. + */ + @java.lang.Override + public boolean hasBackupRetentionInheritance() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Setting for how a backup's enforced retention end time is
+   * inherited.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for backupRetentionInheritance. + */ + @java.lang.Override + public int getBackupRetentionInheritanceValue() { + return backupRetentionInheritance_; + } + + /** + * + * + *
+   * Optional. Setting for how a backup's enforced retention end time is
+   * inherited.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The backupRetentionInheritance. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance + getBackupRetentionInheritance() { + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance result = + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance.forNumber( + backupRetentionInheritance_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance.UNRECOGNIZED + : result; + } + + public static final int DELETABLE_FIELD_NUMBER = 8; + private boolean deletable_ = false; + + /** + * + * + *
+   * Output only. Set to true when there are no backups nested under this
+   * resource.
+   * 
+ * + * optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the deletable field is set. + */ + @java.lang.Override + public boolean hasDeletable() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Output only. Set to true when there are no backups nested under this
+   * resource.
+   * 
+ * + * optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deletable. + */ + @java.lang.Override + public boolean getDeletable() { + return deletable_; + } + + public static final int ETAG_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. Server specified ETag for the backup vault resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the etag field is set. + */ + @java.lang.Override + public boolean hasEtag() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. Server specified ETag for the backup vault resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Server specified ETag for the backup vault resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The BackupVault resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.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 BackupVault resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.State getState() { + com.google.cloud.backupdr.v1beta.BackupVault.State result = + com.google.cloud.backupdr.v1beta.BackupVault.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVault.State.UNRECOGNIZED + : result; + } + + public static final int EFFECTIVE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp effectiveTime_; + + /** + * + * + *
+   * Optional. Time after which the BackupVault resource is locked.
+   * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the effectiveTime field is set. + */ + @java.lang.Override + public boolean hasEffectiveTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. Time after which the BackupVault resource is locked.
+   * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEffectiveTime() { + return effectiveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : effectiveTime_; + } + + /** + * + * + *
+   * Optional. Time after which the BackupVault resource is locked.
+   * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { + return effectiveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : effectiveTime_; + } + + public static final int BACKUP_COUNT_FIELD_NUMBER = 17; + private long backupCount_ = 0L; + + /** + * + * + *
+   * Output only. The number of backups in this backup vault.
+   * 
+ * + * int64 backup_count = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupCount. + */ + @java.lang.Override + public long getBackupCount() { + return backupCount_; + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + + /** + * + * + *
+   * Output only. Service account used by the BackupVault Service for this
+   * BackupVault.  The user should grant this account permissions in their
+   * workload project to enable the service to run backups and restores there.
+   * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + 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(); + serviceAccount_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Service account used by the BackupVault Service for this
+   * BackupVault.  The user should grant this account permissions in their
+   * workload project to enable the service to run backups and restores there.
+   * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_STORED_BYTES_FIELD_NUMBER = 19; + private long totalStoredBytes_ = 0L; + + /** + * + * + *
+   * Output only. Total size of the storage used by all backup resources.
+   * 
+ * + * int64 total_stored_bytes = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalStoredBytes. + */ + @java.lang.Override + public long getTotalStoredBytes() { + return totalStoredBytes_; + } + + public static final int UID_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. Immutable after resource creation until resource deletion.
+   * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Immutable after resource creation until resource deletion.
+   * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 22; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ACCESS_RESTRICTION_FIELD_NUMBER = 24; + private int accessRestriction_ = 0; + + /** + * + * + *
+   * Optional. Restricts access to certain sources and destinations for data
+   * being sent into, or restored from, the backup vault. Defaults to
+   * WITHIN_ORGANIZATION if not provided during creation.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for accessRestriction. + */ + @java.lang.Override + public int getAccessRestrictionValue() { + return accessRestriction_; + } + + /** + * + * + *
+   * Optional. Restricts access to certain sources and destinations for data
+   * being sent into, or restored from, the backup vault. Defaults to
+   * WITHIN_ORGANIZATION if not provided during creation.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessRestriction. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction getAccessRestriction() { + com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction result = + com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction.forNumber( + accessRestriction_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction.UNRECOGNIZED + : result; + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 29; + private com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryptionConfig_; + + /** + * + * + *
+   * Optional. The encryption config of the backup vault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. The encryption config of the backup vault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + + /** + * + * + *
+   * Optional. The encryption config of the backup vault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return encryptionConfig_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeBool(8, deletable_); + } + if (((bitField0_ & 0x00000040) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, etag_); + } + if (state_ + != com.google.cloud.backupdr.v1beta.BackupVault.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(12, getEffectiveTime()); + } + if (backupCount_ != 0L) { + output.writeInt64(17, backupCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 18, serviceAccount_); + } + if (totalStoredBytes_ != 0L) { + output.writeInt64(19, totalStoredBytes_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(20, getBackupMinimumEnforcedRetentionDuration()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 21, uid_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 22); + if (accessRestriction_ + != com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction + .ACCESS_RESTRICTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(24, accessRestriction_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeEnum(27, backupRetentionInheritance_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(29, getEncryptionConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, 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(3, labels__); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, deletable_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, etag_); + } + if (state_ + != com.google.cloud.backupdr.v1beta.BackupVault.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getEffectiveTime()); + } + if (backupCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(17, backupCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(18, serviceAccount_); + } + if (totalStoredBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(19, totalStoredBytes_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 20, getBackupMinimumEnforcedRetentionDuration()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(21, uid_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, annotations__); + } + if (accessRestriction_ + != com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction + .ACCESS_RESTRICTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(24, accessRestriction_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(27, backupRetentionInheritance_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getEncryptionConfig()); + } + 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.backupdr.v1beta.BackupVault)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupVault other = + (com.google.cloud.backupdr.v1beta.BackupVault) obj; + + if (!getName().equals(other.getName())) return false; + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription().equals(other.getDescription())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasBackupMinimumEnforcedRetentionDuration() + != other.hasBackupMinimumEnforcedRetentionDuration()) return false; + if (hasBackupMinimumEnforcedRetentionDuration()) { + if (!getBackupMinimumEnforcedRetentionDuration() + .equals(other.getBackupMinimumEnforcedRetentionDuration())) return false; + } + if (hasBackupRetentionInheritance() != other.hasBackupRetentionInheritance()) return false; + if (hasBackupRetentionInheritance()) { + if (backupRetentionInheritance_ != other.backupRetentionInheritance_) return false; + } + if (hasDeletable() != other.hasDeletable()) return false; + if (hasDeletable()) { + if (getDeletable() != other.getDeletable()) return false; + } + if (hasEtag() != other.hasEtag()) return false; + if (hasEtag()) { + if (!getEtag().equals(other.getEtag())) return false; + } + if (state_ != other.state_) return false; + if (hasEffectiveTime() != other.hasEffectiveTime()) return false; + if (hasEffectiveTime()) { + if (!getEffectiveTime().equals(other.getEffectiveTime())) return false; + } + if (getBackupCount() != other.getBackupCount()) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (getTotalStoredBytes() != other.getTotalStoredBytes()) return false; + if (!getUid().equals(other.getUid())) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (accessRestriction_ != other.accessRestriction_) return false; + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) 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 (hasDescription()) { + 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(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasBackupMinimumEnforcedRetentionDuration()) { + hash = (37 * hash) + BACKUP_MINIMUM_ENFORCED_RETENTION_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getBackupMinimumEnforcedRetentionDuration().hashCode(); + } + if (hasBackupRetentionInheritance()) { + hash = (37 * hash) + BACKUP_RETENTION_INHERITANCE_FIELD_NUMBER; + hash = (53 * hash) + backupRetentionInheritance_; + } + if (hasDeletable()) { + hash = (37 * hash) + DELETABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletable()); + } + if (hasEtag()) { + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasEffectiveTime()) { + hash = (37 * hash) + EFFECTIVE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEffectiveTime().hashCode(); + } + hash = (37 * hash) + BACKUP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBackupCount()); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + hash = (37 * hash) + TOTAL_STORED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalStoredBytes()); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (37 * hash) + ACCESS_RESTRICTION_FIELD_NUMBER; + hash = (53 * hash) + accessRestriction_; + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupVault parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.BackupVault parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.BackupVault parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupVault parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing a BackupVault object.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupVault} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupVault) + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetLabels(); + case 22: + return internalGetAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + case 22: + return internalGetMutableAnnotations(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupVault.class, + com.google.cloud.backupdr.v1beta.BackupVault.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupVault.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetBackupMinimumEnforcedRetentionDurationFieldBuilder(); + internalGetEffectiveTimeFieldBuilder(); + internalGetEncryptionConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + internalGetMutableLabels().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + backupMinimumEnforcedRetentionDuration_ = null; + if (backupMinimumEnforcedRetentionDurationBuilder_ != null) { + backupMinimumEnforcedRetentionDurationBuilder_.dispose(); + backupMinimumEnforcedRetentionDurationBuilder_ = null; + } + backupRetentionInheritance_ = 0; + deletable_ = false; + etag_ = ""; + state_ = 0; + effectiveTime_ = null; + if (effectiveTimeBuilder_ != null) { + effectiveTimeBuilder_.dispose(); + effectiveTimeBuilder_ = null; + } + backupCount_ = 0L; + serviceAccount_ = ""; + totalStoredBytes_ = 0L; + uid_ = ""; + internalGetMutableAnnotations().clear(); + accessRestriction_ = 0; + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_BackupVault_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault build() { + com.google.cloud.backupdr.v1beta.BackupVault result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault buildPartial() { + com.google.cloud.backupdr.v1beta.BackupVault result = + new com.google.cloud.backupdr.v1beta.BackupVault(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupVault result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.backupMinimumEnforcedRetentionDuration_ = + backupMinimumEnforcedRetentionDurationBuilder_ == null + ? backupMinimumEnforcedRetentionDuration_ + : backupMinimumEnforcedRetentionDurationBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.backupRetentionInheritance_ = backupRetentionInheritance_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.deletable_ = deletable_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.etag_ = etag_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.effectiveTime_ = + effectiveTimeBuilder_ == null ? effectiveTime_ : effectiveTimeBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.backupCount_ = backupCount_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.totalStoredBytes_ = totalStoredBytes_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.accessRestriction_ = accessRestriction_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.encryptionConfig_ = + encryptionConfigBuilder_ == null ? encryptionConfig_ : encryptionConfigBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupVault) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupVault) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupVault other) { + if (other == com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDescription()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000004; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasBackupMinimumEnforcedRetentionDuration()) { + mergeBackupMinimumEnforcedRetentionDuration( + other.getBackupMinimumEnforcedRetentionDuration()); + } + if (other.hasBackupRetentionInheritance()) { + setBackupRetentionInheritanceValue(other.getBackupRetentionInheritanceValue()); + } + if (other.hasDeletable()) { + setDeletable(other.getDeletable()); + } + if (other.hasEtag()) { + etag_ = other.etag_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasEffectiveTime()) { + mergeEffectiveTime(other.getEffectiveTime()); + } + if (other.getBackupCount() != 0L) { + setBackupCount(other.getBackupCount()); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.getTotalStoredBytes() != 0L) { + setTotalStoredBytes(other.getTotalStoredBytes()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00004000; + onChanged(); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00008000; + if (other.accessRestriction_ != 0) { + setAccessRestrictionValue(other.getAccessRestrictionValue()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + 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 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 64: + { + deletable_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 98: + { + input.readMessage( + internalGetEffectiveTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 136: + { + backupCount_ = input.readInt64(); + bitField0_ |= 0x00000800; + break; + } // case 136 + case 146: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 146 + case 152: + { + totalStoredBytes_ = input.readInt64(); + bitField0_ |= 0x00002000; + break; + } // case 152 + case 162: + { + input.readMessage( + internalGetBackupMinimumEnforcedRetentionDurationFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 162 + case 170: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 170 + case 178: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00008000; + break; + } // case 178 + case 192: + { + accessRestriction_ = input.readEnum(); + bitField0_ |= 0x00010000; + break; + } // case 192 + case 216: + { + backupRetentionInheritance_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 216 + case 234: + { + input.readMessage( + internalGetEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 234 + 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_ = ""; + + /** + * + * + *
+     * Output only. Identifier. Name of the backup vault to create. It must have
+     * the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+     * `{backupvault}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the project and location.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. Name of the backup vault to create. It must have
+     * the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+     * `{backupvault}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the project and location.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. Name of the backup vault to create. It must have
+     * the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+     * `{backupvault}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the project and location.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + /** + * + * + *
+     * Output only. Identifier. Name of the backup vault to create. It must have
+     * the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+     * `{backupvault}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the project and location.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. Name of the backup vault to create. It must have
+     * the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+     * `{backupvault}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the project and location.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the BackupVault instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The description of the BackupVault instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The description of the BackupVault instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The description of the BackupVault instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the BackupVault instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the BackupVault instance (2048 characters or
+     * less).
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + 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_ |= 0x00000004; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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_ & ~0x00000004); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00000004; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00000004; + return this; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.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 instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.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 instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Duration backupMinimumEnforcedRetentionDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + backupMinimumEnforcedRetentionDurationBuilder_; + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupMinimumEnforcedRetentionDuration field is set. + */ + public boolean hasBackupMinimumEnforcedRetentionDuration() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupMinimumEnforcedRetentionDuration. + */ + public com.google.protobuf.Duration getBackupMinimumEnforcedRetentionDuration() { + if (backupMinimumEnforcedRetentionDurationBuilder_ == null) { + return backupMinimumEnforcedRetentionDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : backupMinimumEnforcedRetentionDuration_; + } else { + return backupMinimumEnforcedRetentionDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupMinimumEnforcedRetentionDuration(com.google.protobuf.Duration value) { + if (backupMinimumEnforcedRetentionDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupMinimumEnforcedRetentionDuration_ = value; + } else { + backupMinimumEnforcedRetentionDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupMinimumEnforcedRetentionDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (backupMinimumEnforcedRetentionDurationBuilder_ == null) { + backupMinimumEnforcedRetentionDuration_ = builderForValue.build(); + } else { + backupMinimumEnforcedRetentionDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupMinimumEnforcedRetentionDuration(com.google.protobuf.Duration value) { + if (backupMinimumEnforcedRetentionDurationBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && backupMinimumEnforcedRetentionDuration_ != null + && backupMinimumEnforcedRetentionDuration_ + != com.google.protobuf.Duration.getDefaultInstance()) { + getBackupMinimumEnforcedRetentionDurationBuilder().mergeFrom(value); + } else { + backupMinimumEnforcedRetentionDuration_ = value; + } + } else { + backupMinimumEnforcedRetentionDurationBuilder_.mergeFrom(value); + } + if (backupMinimumEnforcedRetentionDuration_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupMinimumEnforcedRetentionDuration() { + bitField0_ = (bitField0_ & ~0x00000020); + backupMinimumEnforcedRetentionDuration_ = null; + if (backupMinimumEnforcedRetentionDurationBuilder_ != null) { + backupMinimumEnforcedRetentionDurationBuilder_.dispose(); + backupMinimumEnforcedRetentionDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Duration.Builder getBackupMinimumEnforcedRetentionDurationBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetBackupMinimumEnforcedRetentionDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.DurationOrBuilder + getBackupMinimumEnforcedRetentionDurationOrBuilder() { + if (backupMinimumEnforcedRetentionDurationBuilder_ != null) { + return backupMinimumEnforcedRetentionDurationBuilder_.getMessageOrBuilder(); + } else { + return backupMinimumEnforcedRetentionDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : backupMinimumEnforcedRetentionDuration_; + } + } + + /** + * + * + *
+     * Required. The default and minimum enforced retention for each backup within
+     * the backup vault.  The enforced retention for each backup can be extended.
+     * Note: Longer minimum enforced retention period impacts potential storage
+     * costs post introductory trial. We recommend starting with a short duration
+     * of 3 days or less.
+     * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetBackupMinimumEnforcedRetentionDurationFieldBuilder() { + if (backupMinimumEnforcedRetentionDurationBuilder_ == null) { + backupMinimumEnforcedRetentionDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getBackupMinimumEnforcedRetentionDuration(), getParentForChildren(), isClean()); + backupMinimumEnforcedRetentionDuration_ = null; + } + return backupMinimumEnforcedRetentionDurationBuilder_; + } + + private int backupRetentionInheritance_ = 0; + + /** + * + * + *
+     * Optional. Setting for how a backup's enforced retention end time is
+     * inherited.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the backupRetentionInheritance field is set. + */ + @java.lang.Override + public boolean hasBackupRetentionInheritance() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Setting for how a backup's enforced retention end time is
+     * inherited.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for backupRetentionInheritance. + */ + @java.lang.Override + public int getBackupRetentionInheritanceValue() { + return backupRetentionInheritance_; + } + + /** + * + * + *
+     * Optional. Setting for how a backup's enforced retention end time is
+     * inherited.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for backupRetentionInheritance to set. + * @return This builder for chaining. + */ + public Builder setBackupRetentionInheritanceValue(int value) { + backupRetentionInheritance_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Setting for how a backup's enforced retention end time is
+     * inherited.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The backupRetentionInheritance. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance + getBackupRetentionInheritance() { + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance result = + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance.forNumber( + backupRetentionInheritance_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Setting for how a backup's enforced retention end time is
+     * inherited.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The backupRetentionInheritance to set. + * @return This builder for chaining. + */ + public Builder setBackupRetentionInheritance( + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + backupRetentionInheritance_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Setting for how a backup's enforced retention end time is
+     * inherited.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupRetentionInheritance() { + bitField0_ = (bitField0_ & ~0x00000040); + backupRetentionInheritance_ = 0; + onChanged(); + return this; + } + + private boolean deletable_; + + /** + * + * + *
+     * Output only. Set to true when there are no backups nested under this
+     * resource.
+     * 
+ * + * optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the deletable field is set. + */ + @java.lang.Override + public boolean hasDeletable() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Set to true when there are no backups nested under this
+     * resource.
+     * 
+ * + * optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deletable. + */ + @java.lang.Override + public boolean getDeletable() { + return deletable_; + } + + /** + * + * + *
+     * Output only. Set to true when there are no backups nested under this
+     * resource.
+     * 
+ * + * optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deletable to set. + * @return This builder for chaining. + */ + public Builder setDeletable(boolean value) { + + deletable_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Set to true when there are no backups nested under this
+     * resource.
+     * 
+ * + * optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeletable() { + bitField0_ = (bitField0_ & ~0x00000080); + deletable_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. Server specified ETag for the backup vault resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the etag field is set. + */ + public boolean hasEtag() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. Server specified ETag for the backup vault resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Server specified ETag for the backup vault resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Server specified ETag for the backup vault resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Server specified ETag for the backup vault resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Server specified ETag for the backup vault resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The BackupVault resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.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 BackupVault resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.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 BackupVault resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.State getState() { + com.google.cloud.backupdr.v1beta.BackupVault.State result = + com.google.cloud.backupdr.v1beta.BackupVault.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVault.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The BackupVault resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.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.backupdr.v1beta.BackupVault.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The BackupVault resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.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; + } + + private com.google.protobuf.Timestamp effectiveTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + effectiveTimeBuilder_; + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the effectiveTime field is set. + */ + public boolean hasEffectiveTime() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveTime. + */ + public com.google.protobuf.Timestamp getEffectiveTime() { + if (effectiveTimeBuilder_ == null) { + return effectiveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : effectiveTime_; + } else { + return effectiveTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEffectiveTime(com.google.protobuf.Timestamp value) { + if (effectiveTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + effectiveTime_ = value; + } else { + effectiveTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEffectiveTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (effectiveTimeBuilder_ == null) { + effectiveTime_ = builderForValue.build(); + } else { + effectiveTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEffectiveTime(com.google.protobuf.Timestamp value) { + if (effectiveTimeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && effectiveTime_ != null + && effectiveTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEffectiveTimeBuilder().mergeFrom(value); + } else { + effectiveTime_ = value; + } + } else { + effectiveTimeBuilder_.mergeFrom(value); + } + if (effectiveTime_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEffectiveTime() { + bitField0_ = (bitField0_ & ~0x00000400); + effectiveTime_ = null; + if (effectiveTimeBuilder_ != null) { + effectiveTimeBuilder_.dispose(); + effectiveTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getEffectiveTimeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetEffectiveTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { + if (effectiveTimeBuilder_ != null) { + return effectiveTimeBuilder_.getMessageOrBuilder(); + } else { + return effectiveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : effectiveTime_; + } + } + + /** + * + * + *
+     * Optional. Time after which the BackupVault resource is locked.
+     * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEffectiveTimeFieldBuilder() { + if (effectiveTimeBuilder_ == null) { + effectiveTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEffectiveTime(), getParentForChildren(), isClean()); + effectiveTime_ = null; + } + return effectiveTimeBuilder_; + } + + private long backupCount_; + + /** + * + * + *
+     * Output only. The number of backups in this backup vault.
+     * 
+ * + * int64 backup_count = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupCount. + */ + @java.lang.Override + public long getBackupCount() { + return backupCount_; + } + + /** + * + * + *
+     * Output only. The number of backups in this backup vault.
+     * 
+ * + * int64 backup_count = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The backupCount to set. + * @return This builder for chaining. + */ + public Builder setBackupCount(long value) { + + backupCount_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of backups in this backup vault.
+     * 
+ * + * int64 backup_count = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBackupCount() { + bitField0_ = (bitField0_ & ~0x00000800); + backupCount_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + + /** + * + * + *
+     * Output only. Service account used by the BackupVault Service for this
+     * BackupVault.  The user should grant this account permissions in their
+     * workload project to enable the service to run backups and restores there.
+     * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Service account used by the BackupVault Service for this
+     * BackupVault.  The user should grant this account permissions in their
+     * workload project to enable the service to run backups and restores there.
+     * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Service account used by the BackupVault Service for this
+     * BackupVault.  The user should grant this account permissions in their
+     * workload project to enable the service to run backups and restores there.
+     * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Service account used by the BackupVault Service for this
+     * BackupVault.  The user should grant this account permissions in their
+     * workload project to enable the service to run backups and restores there.
+     * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Service account used by the BackupVault Service for this
+     * BackupVault.  The user should grant this account permissions in their
+     * workload project to enable the service to run backups and restores there.
+     * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private long totalStoredBytes_; + + /** + * + * + *
+     * Output only. Total size of the storage used by all backup resources.
+     * 
+ * + * int64 total_stored_bytes = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalStoredBytes. + */ + @java.lang.Override + public long getTotalStoredBytes() { + return totalStoredBytes_; + } + + /** + * + * + *
+     * Output only. Total size of the storage used by all backup resources.
+     * 
+ * + * int64 total_stored_bytes = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The totalStoredBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalStoredBytes(long value) { + + totalStoredBytes_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Total size of the storage used by all backup resources.
+     * 
+ * + * int64 total_stored_bytes = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTotalStoredBytes() { + bitField0_ = (bitField0_ & ~0x00002000); + totalStoredBytes_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. Immutable after resource creation until resource deletion.
+     * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Immutable after resource creation until resource deletion.
+     * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Immutable after resource creation until resource deletion.
+     * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Immutable after resource creation until resource deletion.
+     * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Immutable after resource creation until resource deletion.
+     * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00008000; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. User annotations. See https://google.aip.dev/128#annotations
+     * Stores small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. User annotations. See https://google.aip.dev/128#annotations
+     * Stores small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. User annotations. See https://google.aip.dev/128#annotations
+     * Stores small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User annotations. See https://google.aip.dev/128#annotations
+     * Stores small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00008000); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User annotations. See https://google.aip.dev/128#annotations
+     * Stores small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00008000; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User annotations. See https://google.aip.dev/128#annotations
+     * Stores small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00008000; + return this; + } + + /** + * + * + *
+     * Optional. User annotations. See https://google.aip.dev/128#annotations
+     * Stores small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00008000; + return this; + } + + private int accessRestriction_ = 0; + + /** + * + * + *
+     * Optional. Restricts access to certain sources and destinations for data
+     * being sent into, or restored from, the backup vault. Defaults to
+     * WITHIN_ORGANIZATION if not provided during creation.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for accessRestriction. + */ + @java.lang.Override + public int getAccessRestrictionValue() { + return accessRestriction_; + } + + /** + * + * + *
+     * Optional. Restricts access to certain sources and destinations for data
+     * being sent into, or restored from, the backup vault. Defaults to
+     * WITHIN_ORGANIZATION if not provided during creation.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for accessRestriction to set. + * @return This builder for chaining. + */ + public Builder setAccessRestrictionValue(int value) { + accessRestriction_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Restricts access to certain sources and destinations for data
+     * being sent into, or restored from, the backup vault. Defaults to
+     * WITHIN_ORGANIZATION if not provided during creation.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessRestriction. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction getAccessRestriction() { + com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction result = + com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction.forNumber( + accessRestriction_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Restricts access to certain sources and destinations for data
+     * being sent into, or restored from, the backup vault. Defaults to
+     * WITHIN_ORGANIZATION if not provided during creation.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The accessRestriction to set. + * @return This builder for chaining. + */ + public Builder setAccessRestriction( + com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + accessRestriction_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Restricts access to certain sources and destinations for data
+     * being sent into, or restored from, the backup vault. Defaults to
+     * WITHIN_ORGANIZATION if not provided during creation.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAccessRestriction() { + bitField0_ = (bitField0_ & ~0x00010000); + accessRestriction_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig, + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return ((bitField0_ & 0x00020000) != 0); + } + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + public com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + } else { + encryptionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.Builder builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionConfig( + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && encryptionConfig_ != null + && encryptionConfig_ + != com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig + .getDefaultInstance()) { + getEncryptionConfigBuilder().mergeFrom(value); + } else { + encryptionConfig_ = value; + } + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + if (encryptionConfig_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionConfig() { + bitField0_ = (bitField0_ & ~0x00020000); + encryptionConfig_ = null; + if (encryptionConfigBuilder_ != null) { + encryptionConfigBuilder_.dispose(); + encryptionConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return internalGetEncryptionConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + } + + /** + * + * + *
+     * Optional. The encryption config of the backup vault.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig, + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfigOrBuilder> + internalGetEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig, + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig.Builder, + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupVault) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupVault) + private static final com.google.cloud.backupdr.v1beta.BackupVault DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupVault(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.BackupVault getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultName.java new file mode 100644 index 000000000000..6ec0aa48b2f1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultName.java @@ -0,0 +1,230 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class BackupVaultName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUPVAULT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupVaults/{backupvault}"); + 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 @Nullable BackupVaultName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUPVAULT.validatedMatch( + formattedString, "BackupVaultName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("backupvault")); + } + + 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<@Nullable BackupVaultName> 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_BACKUPVAULT.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("backupvault", backupvault); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BACKUPVAULT.instantiate( + "project", project, "location", location, "backupvault", backupvault); + } + + @Override + public boolean equals(@Nullable 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/{backupvault}. */ + 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultOrBuilder.java new file mode 100644 index 000000000000..ad6ea578c84c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultOrBuilder.java @@ -0,0 +1,746 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupVaultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupVault) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Identifier. Name of the backup vault to create. It must have
+   * the
+   * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+   * `{backupvault}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the project and location.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Identifier. Name of the backup vault to create. It must have
+   * the
+   * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`.
+   * `{backupvault}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the project and location.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The description of the BackupVault instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + boolean hasDescription(); + + /** + * + * + *
+   * Optional. The description of the BackupVault instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the BackupVault instance (2048 characters or
+   * less).
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. The default and minimum enforced retention for each backup within
+   * the backup vault.  The enforced retention for each backup can be extended.
+   * Note: Longer minimum enforced retention period impacts potential storage
+   * costs post introductory trial. We recommend starting with a short duration
+   * of 3 days or less.
+   * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupMinimumEnforcedRetentionDuration field is set. + */ + boolean hasBackupMinimumEnforcedRetentionDuration(); + + /** + * + * + *
+   * Required. The default and minimum enforced retention for each backup within
+   * the backup vault.  The enforced retention for each backup can be extended.
+   * Note: Longer minimum enforced retention period impacts potential storage
+   * costs post introductory trial. We recommend starting with a short duration
+   * of 3 days or less.
+   * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupMinimumEnforcedRetentionDuration. + */ + com.google.protobuf.Duration getBackupMinimumEnforcedRetentionDuration(); + + /** + * + * + *
+   * Required. The default and minimum enforced retention for each backup within
+   * the backup vault.  The enforced retention for each backup can be extended.
+   * Note: Longer minimum enforced retention period impacts potential storage
+   * costs post introductory trial. We recommend starting with a short duration
+   * of 3 days or less.
+   * 
+ * + * + * optional .google.protobuf.Duration backup_minimum_enforced_retention_duration = 20 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.DurationOrBuilder getBackupMinimumEnforcedRetentionDurationOrBuilder(); + + /** + * + * + *
+   * Optional. Setting for how a backup's enforced retention end time is
+   * inherited.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the backupRetentionInheritance field is set. + */ + boolean hasBackupRetentionInheritance(); + + /** + * + * + *
+   * Optional. Setting for how a backup's enforced retention end time is
+   * inherited.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for backupRetentionInheritance. + */ + int getBackupRetentionInheritanceValue(); + + /** + * + * + *
+   * Optional. Setting for how a backup's enforced retention end time is
+   * inherited.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance backup_retention_inheritance = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The backupRetentionInheritance. + */ + com.google.cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritance + getBackupRetentionInheritance(); + + /** + * + * + *
+   * Output only. Set to true when there are no backups nested under this
+   * resource.
+   * 
+ * + * optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the deletable field is set. + */ + boolean hasDeletable(); + + /** + * + * + *
+   * Output only. Set to true when there are no backups nested under this
+   * resource.
+   * 
+ * + * optional bool deletable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deletable. + */ + boolean getDeletable(); + + /** + * + * + *
+   * Optional. Server specified ETag for the backup vault resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the etag field is set. + */ + boolean hasEtag(); + + /** + * + * + *
+   * Optional. Server specified ETag for the backup vault resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. Server specified ETag for the backup vault resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. The BackupVault resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The BackupVault resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.BackupVault.State getState(); + + /** + * + * + *
+   * Optional. Time after which the BackupVault resource is locked.
+   * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the effectiveTime field is set. + */ + boolean hasEffectiveTime(); + + /** + * + * + *
+   * Optional. Time after which the BackupVault resource is locked.
+   * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveTime. + */ + com.google.protobuf.Timestamp getEffectiveTime(); + + /** + * + * + *
+   * Optional. Time after which the BackupVault resource is locked.
+   * 
+ * + * + * optional .google.protobuf.Timestamp effective_time = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The number of backups in this backup vault.
+   * 
+ * + * int64 backup_count = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupCount. + */ + long getBackupCount(); + + /** + * + * + *
+   * Output only. Service account used by the BackupVault Service for this
+   * BackupVault.  The user should grant this account permissions in their
+   * workload project to enable the service to run backups and restores there.
+   * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + + /** + * + * + *
+   * Output only. Service account used by the BackupVault Service for this
+   * BackupVault.  The user should grant this account permissions in their
+   * workload project to enable the service to run backups and restores there.
+   * 
+ * + * string service_account = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Output only. Total size of the storage used by all backup resources.
+   * 
+ * + * int64 total_stored_bytes = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalStoredBytes. + */ + long getTotalStoredBytes(); + + /** + * + * + *
+   * Output only. Immutable after resource creation until resource deletion.
+   * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. Immutable after resource creation until resource deletion.
+   * 
+ * + * + * string uid = 21 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User annotations. See https://google.aip.dev/128#annotations
+   * Stores small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Restricts access to certain sources and destinations for data
+   * being sent into, or restored from, the backup vault. Defaults to
+   * WITHIN_ORGANIZATION if not provided during creation.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for accessRestriction. + */ + int getAccessRestrictionValue(); + + /** + * + * + *
+   * Optional. Restricts access to certain sources and destinations for data
+   * being sent into, or restored from, the backup vault. Defaults to
+   * WITHIN_ORGANIZATION if not provided during creation.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault.AccessRestriction access_restriction = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessRestriction. + */ + com.google.cloud.backupdr.v1beta.BackupVault.AccessRestriction getAccessRestriction(); + + /** + * + * + *
+   * Optional. The encryption config of the backup vault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + + /** + * + * + *
+   * Optional. The encryption config of the backup vault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig getEncryptionConfig(); + + /** + * + * + *
+   * Optional. The encryption config of the backup vault.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.BackupVault.EncryptionConfig encryption_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.BackupVault.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultProto.java new file mode 100644 index 000000000000..ec4648e10718 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultProto.java @@ -0,0 +1,1152 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class BackupVaultProto extends com.google.protobuf.GeneratedFile { + private BackupVaultProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "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_backupdr_v1beta_BackupVault_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupVault_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupVault_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupVault_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupVault_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupVault_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DataSource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DataSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DataSource_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DataSource_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupLock_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupLock_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_Backup_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_Backup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_Backup_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_Backup_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_TargetResource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_TargetResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GcpResource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GcpResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_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/backupdr/v1beta/backupvau" + + "lt.proto\022\034google.cloud.backupdr.v1beta\032\037" + + "google/api/field_behavior.proto\032\033google/" + + "api/field_info.proto\032\031google/api/resourc" + + "e.proto\0326google/cloud/backupdr/v1beta/backupvault_alloydb.proto\0321google/cloud/ba" + + "ckupdr/v1beta/backupvault_ba.proto\0327google/cloud/backupdr/v1beta/backupvault_clo" + + "udsql.proto\0323google/cloud/backupdr/v1beta/backupvault_disk.proto\0322google/cloud/b" + + "ackupdr/v1beta/backupvault_gce.proto\032\036google/protobuf/duration.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/" + + "timestamp.proto\032\027google/rpc/status.proto\"\267\017\n" + + "\013BackupVault\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\003\340A\010\022\035\n" + + "\013description\030\002 \001(\tB\003\340A\001H\000\210\001\001\022J\n" + + "\006labels\030\003" + + " \003(\01325.google.cloud.backupdr.v1beta.BackupVault.LabelsEntryB\003\340A\001\0229\n" + + "\013create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003H\001\210\001\001\0229\n" + + "\013update_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003H\002\210\001\001\022W\n" + + "*backup_minimum_enforced_retention_duration\030\024" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\002H\003\210\001\001\022t\n" + + "\034backup_retention_inheritance\030\033 \001(\0162D.google." + + "cloud.backupdr.v1beta.BackupVault.BackupRetentionInheritanceB\003\340A\001H\004\210\001\001\022\033\n" + + "\tdeletable\030\010 \001(\010B\003\340A\003H\005\210\001\001\022\026\n" + + "\004etag\030\t \001(\tB\003\340A\001H\006\210\001\001\022C\n" + + "\005state\030\n" + + " \001(\0162/.google.cloud.backupdr.v1beta.BackupVault.StateB\003\340A\003\022<\n" + + "\016effective_time\030\014" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001H\007\210\001\001\022\031\n" + + "\014backup_count\030\021 \001(\003B\003\340A\003\022\034\n" + + "\017service_account\030\022 \001(\tB\003\340A\003\022\037\n" + + "\022total_stored_bytes\030\023 \001(\003B\003\340A\003\022\030\n" + + "\003uid\030\025 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022T\n" + + "\013annotations\030\026 \003(\0132:.google" + + ".cloud.backupdr.v1beta.BackupVault.AnnotationsEntryB\003\340A\001\022\\\n" + + "\022access_restriction\030\030" + + " \001(\0162;.google.cloud.backupdr.v1beta.BackupVault.AccessRestrictionB\003\340A\001\022_\n" + + "\021encryption_config\030\035 \001(\0132:.google.cloud.backupd" + + "r.v1beta.BackupVault.EncryptionConfigB\003\340A\001H\010\210\001\001\032i\n" + + "\020EncryptionConfig\022D\n" + + "\014kms_key_name\030\001 \001(\tB)\340A\001\372A#\n" + + "!cloudkms.googleapis.com/CryptoKeyH\000\210\001\001B\017\n\r" + + "_kms_key_name\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"\205\001\n" + + "\032BackupRetentionInheritance\022,\n" + + "(BACKUP_RETENTION_INHERITANCE_UNSPECIFIED\020\000\022\033\n" + + "\027INHERIT_VAULT_RETENTION\020\001\022\034\n" + + "\030MATCH_BACKUP_EXPIRE_TIME\020\002\"_\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010DELETING\020\003\022\t\n" + + "\005ERROR\020\004\022\014\n" + + "\010UPDATING\020\005\"\236\001\n" + + "\021AccessRestriction\022\"\n" + + "\036ACCESS_RESTRICTION_UNSPECIFIED\020\000\022\022\n" + + "\016WITHIN_PROJECT\020\001\022\027\n" + + "\023WITHIN_ORGANIZATION\020\002\022\020\n" + + "\014UNRESTRICTED\020\003\022&\n" + + "\"WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA\020\004:\210\001\352A\204\001\n" + + "#backupdr.googleapis.com/BackupVault\022Bprojects/{project}/location" + + "s/{location}/backupVaults/{backupvault}*\014backupVaults2\013backupVaultB\016\n" + + "\014_descriptionB\016\n" + + "\014_create_timeB\016\n" + + "\014_update_timeB-\n" + + "+_backup_minimum_enforced_retention_durationB\037\n" + + "\035_backup_retention_inheritanceB\014\n\n" + + "_deletableB\007\n" + + "\005_etagB\021\n" + + "\017_effective_timeB\024\n" + + "\022_encryption_config\"\244\t\n\n" + + "DataSource\022W\n" + + "\030data_source_gcp_resource\030\032 \001(\01323.google.clo" + + "ud.backupdr.v1beta.DataSourceGcpResourceH\000\022v\n" + + "(data_source_backup_appliance_application\030\033" + + " \001(\0132B.google.cloud.backupdr.v1b" + + "eta.DataSourceBackupApplianceApplicationH\000\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\003\340A\010\022B\n" + + "\005state\030\025 \001(\0162" + + "..google.cloud.backupdr.v1beta.DataSource.StateB\003\340A\003\022I\n" + + "\006labels\030\004 \003(\01324.google.cl" + + "oud.backupdr.v1beta.DataSource.LabelsEntryB\003\340A\001\0229\n" + + "\013create_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003H\001\210\001\001\0229\n" + + "\013update_time\030\006" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003H\002\210\001\001\022\031\n" + + "\014backup_count\030\007 \001(\003H\003\210\001\001\022\021\n" + + "\004etag\030\016 \001(\tH\004\210\001\001\022\037\n" + + "\022total_stored_bytes\030\027 \001(\003H\005\210\001\001\022J\n" + + "\014config_state\030\030 \001(\0162/.google.clou" + + "d.backupdr.v1beta.BackupConfigStateB\003\340A\003\022O\n" + + "\022backup_config_info\030\031 \001(\0132..google.cl" + + "oud.backupdr.v1beta.BackupConfigInfoB\003\340A\003\0227\n" + + "*backup_blocked_by_vault_access_restriction\030\034 \001(\010B\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"Q\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010DELETING\020\003\022\t\n" + + "\005ERROR\020\004:\236\001\352A\232\001\n" + + "\"backupdr.googleapis.com/DataSource\022[project" + + "s/{project}/locations/{location}/backupV" + + "aults/{backupvault}/dataSources/{datasource}*\013dataSources2\n" + + "dataSourceB\021\n" + + "\017source_resourceB\016\n" + + "\014_create_timeB\016\n" + + "\014_update_timeB\017\n\r" + + "_backup_countB\007\n" + + "\005_etagB\025\n" + + "\023_total_stored_bytes\"\275\004\n" + + "\020BackupConfigInfo\022J\n" + + "\021gcp_backup_config\030\004" + + " \001(\0132-.google.cloud.backupdr.v1beta.GcpBackupConfigH\000\022c\n" + + "\036backup_appliance_backup_config\030\005 \001(\01329.google.clou" + + "d.backupdr.v1beta.BackupApplianceBackupConfigH\000\022^\n" + + "\021last_backup_state\030\001 \001(\0162>.goo" + + "gle.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupStateB\003\340A\003\022P\n" + + "\'last_successful_backup_consistency_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0222\n" + + "\021last_backup_error\030\003" + + " \001(\0132\022.google.rpc.StatusB\003\340A\003\"\200\001\n" + + "\017LastBackupState\022!\n" + + "\035LAST_BACKUP_STATE_UNSPECIFIED\020\000\022\030\n" + + "\024FIRST_BACKUP_PENDING\020\001\022\r" + + "\n" + + "\tSUCCEEDED\020\002\022\n\n" + + "\006FAILED\020\003\022\025\n" + + "\021PERMISSION_DENIED\020\004B\017\n\r" + + "backup_config\"\211\003\n" + + "\017GcpBackupConfig\022<\n" + + "\013backup_plan\030\001 \001(\tB\'\372A$\n" + + "\"backupdr.googleapis.com/BackupPlan\022\037\n" + + "\027backup_plan_description\030\002 \001(\t\022S\n" + + "\027backup_plan_association\030\003 \001(\tB2\372A/\n" + + "-backupdr.googleapis.com/BackupPlanAssociation\022\031\n" + + "\021backup_plan_rules\030\004 \003(\t\022!\n" + + "\031backup_plan_revision_name\030\005 \001(\t\022\037\n" + + "\027backup_plan_revision_id\030\006 \001(\t\022c\n" + + "\036auto_protection_policy_binding\030\007 \001(\tB;\340A\003\372A5\n" + + "3backupdr.googleapis.com/AutoProtectionPolicyBinding\"\272\001\n" + + "\033BackupApplianceBackupConfig\022\035\n" + + "\025backup_appliance_name\030\001 \001(\t\022\033\n" + + "\023backup_appliance_id\030\002 \001(\003\022\016\n" + + "\006sla_id\030\003 \001(\003\022\030\n" + + "\020application_name\030\004 \001(\t\022\021\n" + + "\thost_name\030\005 \001(\t\022\020\n" + + "\010slt_name\030\006 \001(\t\022\020\n" + + "\010slp_name\030\007 \001(\t\"\272\004\n" + + "\025DataSourceGcpResource\022s\n" + + "&compute_instance_datasource_properties\030\004" + + " \001(\0132A.google.cloud.backupdr.v1beta.ComputeInstanceDataSourcePropertiesH\000\022{\n" + + "(cloud_sql_instance_datasource_properties\030\005 " + + "\001(\0132B.google.cloud.backupdr.v1beta.Cloud" + + "SqlInstanceDataSourcePropertiesB\003\340A\003H\000\022w\n" + + "&alloy_db_cluster_datasource_properties\030\006" + + " \001(\0132@.google.cloud.backupdr.v1beta.Al" + + "loyDBClusterDataSourcePropertiesB\003\340A\003H\000\022\\\n" + + "\032disk_datasource_properties\030\007 \001(\01326.go" + + "ogle.cloud.backupdr.v1beta.DiskDataSourcePropertiesH\000\022\035\n" + + "\020gcp_resourcename\030\001 \001(\tB\003\340A\003\022\020\n" + + "\010location\030\002 \001(\t\022\014\n" + + "\004type\030\003 \001(\tB\031\n" + + "\027gcp_resource_properties\"\271\001\n" + + "$DataSourceBackupApplianceApplication\022\030\n" + + "\020application_name\030\001 \001(\t\022\030\n" + + "\020backup_appliance\030\002 \001(\t\022\024\n" + + "\014appliance_id\030\003 \001(\003\022\014\n" + + "\004type\030\004 \001(\t\022\026\n" + + "\016application_id\030\010 \001(\003\022\020\n" + + "\010hostname\030\006 \001(\t\022\017\n" + + "\007host_id\030\007 \001(\003\")\n" + + "\017ServiceLockInfo\022\026\n" + + "\toperation\030\001 \001(\tB\003\340A\003\"\306\001\n" + + "\027BackupApplianceLockInfo\022\022\n" + + "\010job_name\030\006 \001(\tH\000\022\026\n" + + "\014backup_image\030\007 \001(\tH\000\022\020\n" + + "\006sla_id\030\010 \001(\003H\000\022 \n" + + "\023backup_appliance_id\030\001 \001(\003B\003\340A\002\022\"\n" + + "\025backup_appliance_name\030\002 \001(\tB\003\340A\002\022\030\n" + + "\013lock_reason\030\005 \001(\tB\003\340A\002B\r\n" + + "\013lock_source\"\206\002\n\n" + + "BackupLock\022[\n" + + "\032backup_appliance_lock_info\030\003 \001(\01325.google.clou" + + "d.backupdr.v1beta.BackupApplianceLockInfoH\000\022O\n" + + "\021service_lock_info\030\004 \001(\0132-.google." + + "cloud.backupdr.v1beta.ServiceLockInfoB\003\340A\003H\000\0228\n" + + "\017lock_until_time\030\001" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\002B\020\n" + + "\016ClientLockInfo\"\267\024\n" + + "\006Backup\022p\n" + + "\"compute_instance_backup_properties\030\023 \001(\0132=.google.cloud.backupdr." + + "v1beta.ComputeInstanceBackupPropertiesB\003\340A\003H\000\022s\n" + + "$cloud_sql_instance_backup_properties\030\032 \001(\0132>.google.cloud.backupdr.v1be" + + "ta.CloudSqlInstanceBackupPropertiesB\003\340A\003H\000\022p\n" + + "\"backup_appliance_backup_properties\030\025" + + " \001(\0132=.google.cloud.backupdr.v1beta.BackupApplianceBackupPropertiesB\003\340A\003H\000\022g\n" + + "\032alloy_db_backup_properties\030\033 \001(\0132<.googl" + + "e.cloud.backupdr.v1beta.AlloyDbClusterBackupPropertiesB\003\340A\003H\000\022Y\n" + + "\026disk_backup_properties\030\034" + + " \001(\01322.google.cloud.backupdr.v1beta.DiskBackupPropertiesB\003\340A\003H\000\022[\n" + + "\024gcp_backup_plan_info\030\026 \001(\01326.google.cloud.ba" + + "ckupdr.v1beta.Backup.GCPBackupPlanInfoB\003\340A\003H\001\022L\n" + + "\014gcp_resource\030\037 \001(\0132/.google.clo" + + "ud.backupdr.v1beta.BackupGcpResourceB\003\340A\003H\002\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\003\340A\010\022\035\n" + + "\013description\030\002 \001(\tB\003\340A\003H\003\210\001\001\0229\n" + + "\013create_time\030\003" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003H\004\210\001\001\0229\n" + + "\013update_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003H\005\210\001\001\022E\n" + + "\006labels\030\005 \003(\01320.google." + + "cloud.backupdr.v1beta.Backup.LabelsEntryB\003\340A\001\022I\n" + + "\033enforced_retention_end_time\030\006 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\001H\006\210\001\001\022t\n" + + "\034backup_retention_inheritance\030\036 \001(\0162D" + + ".google.cloud.backupdr.v1beta.BackupVaul" + + "t.BackupRetentionInheritanceB\003\340A\003H\007\210\001\001\0229\n" + + "\013expire_time\030\007" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001H\010\210\001\001\022>\n" + + "\020consistency_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003H" + + "\t\210\001\001\022\026\n" + + "\004etag\030\013 \001(\tB\003\340A\001H\n" + + "\210\001\001\022>\n" + + "\005state\030\017 \001(\016" + + "2*.google.cloud.backupdr.v1beta.Backup.StateB\003\340A\003\022D\n\r" + + "service_locks\030\021 \003(\0132(.googl" + + "e.cloud.backupdr.v1beta.BackupLockB\003\340A\003\022M\n" + + "\026backup_appliance_locks\030\022 \003(\0132(.google" + + ".cloud.backupdr.v1beta.BackupLockB\003\340A\001\022I\n" + + "\013backup_type\030\024" + + " \001(\0162/.google.cloud.backupdr.v1beta.Backup.BackupTypeB\003\340A\003\022 \n" + + "\023resource_size_bytes\030\027 \001(\003B\003\340A\003\022\"\n\r" + + "satisfies_pzs\030\030 \001(\010B\006\340A\003\340A\001H\013\210\001\001\022\"\n\r" + + "satisfies_pzi\030\031 \001(\010B\006\340A\003\340A\001H\014\210\001\001\022M\n" + + "\020kms_key_versions\030! \003(\tB3\340A\001\340A\003\372A*\n" + + "(cloudkms.googleapis.com/CryptoKeyVersion\032\262\001\n" + + "\021GCPBackupPlanInfo\022<\n" + + "\013backup_plan\030\001 \001(\tB\'\372A$\n" + + "\"backupdr.googleapis.com/BackupPlan\022\033\n" + + "\023backup_plan_rule_id\030\002 \001(\t\022!\n" + + "\031backup_plan_revision_name\030\003 \001(\t\022\037\n" + + "\027backup_plan_revision_id\030\004 \001(\t\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\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010DELETING\020\003\022\t\n" + + "\005ERROR\020\004\022\r\n" + + "\tUPLOADING\020\005\"b\n\n" + + "BackupType\022\033\n" + + "\027BACKUP_TYPE_UNSPECIFIED\020\000\022\r\n" + + "\tSCHEDULED\020\001\022\r\n" + + "\tON_DEMAND\020\002\022\031\n" + + "\025ON_DEMAND_OPERATIONAL\020\003:\243\001\352A\237\001\n" + + "\036backupdr.googleapis.com/Backup\022lprojects/{project}/locations/{locat" + + "ion}/backupVaults/{backupvault}/dataSour" + + "ces/{datasource}/backups/{backup}*\007backups2\006backupB\023\n" + + "\021backup_propertiesB\013\n" + + "\tplan_infoB\021\n" + + "\017source_resourceB\016\n" + + "\014_descriptionB\016\n" + + "\014_create_timeB\016\n" + + "\014_update_timeB\036\n" + + "\034_enforced_retention_end_timeB\037\n" + + "\035_backup_retention_inheritanceB\016\n" + + "\014_expire_timeB\023\n" + + "\021_consistency_timeB\007\n" + + "\005_etagB\020\n" + + "\016_satisfies_pzsB\020\n" + + "\016_satisfies_pzi\"\370\001\n" + + "\030CreateBackupVaultRequest\022;\n" + + "\006parent\030\001 \001(" + + "\tB+\340A\002\372A%\022#backupdr.googleapis.com/BackupVault\022\034\n" + + "\017backup_vault_id\030\002 \001(\tB\003\340A\002\022D\n" + + "\014backup_vault\030\003 \001(\013" + + "2).google.cloud.backupdr.v1beta.BackupVaultB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "validate_only\030\005 \001(\010B\003\340A\001\"\365\001\n" + + "\027ListBackupVaultsRequest\022;\n" + + "\006parent\030\001 \001(\tB+\340A\002\372A" + + "%\022#backupdr.googleapis.com/BackupVault\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\022@\n" + + "\004view\030\006 \001(\0162-.google.cloud" + + ".backupdr.v1beta.BackupVaultViewB\003\340A\001\"\212\001\n" + + "\030ListBackupVaultsResponse\022@\n\r" + + "backup_vaults\030\001 \003(\0132).google.cloud.backupdr.v1beta.BackupVault\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\272\001\n" + + "\036FetchUsableBackupVaultsRequest\022;\n" + + "\006parent\030\001 \001(" + + "\tB+\340A\002\372A%\022#backupdr.googleapis.com/BackupVault\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\221\001\n" + + "\037FetchUsableBackupVaultsResponse\022@\n\r" + + "backup_vaults\030\001 \003(\0132).google.cloud.backupdr.v1beta.BackupVault\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\222\002\n" + + "\"FetchBackupsForResourceTypeRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A" + + " \022\036backupdr.googleapis.com/Backup\022\032\n\r" + + "resource_type\030\002 \001(\tB\003\340A\002\022\026\n" + + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\004 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\005 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\006 \001(\tB\003\340A\001\022;\n" + + "\004view\030\007" + + " \001(\0162(.google.cloud.backupdr.v1beta.BackupViewB\003\340A\001\"u\n" + + "#FetchBackupsForResourceTypeResponse\0225\n" + + "\007backups\030\001 \003(\0132$.google.cloud.backupdr.v1beta.Backup\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\224\001\n" + + "\025GetBackupVaultRequest\0229\n" + + "\004name\030\001 \001(\tB+\340A\002\372A%\n" + + "#backupdr.googleapis.com/BackupVault\022@\n" + + "\004view\030\002" + + " \001(\0162-.google.cloud.backupdr.v1beta.BackupVaultViewB\003\340A\001\"\225\002\n" + + "\030UpdateBackupVaultRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022D\n" + + "\014backup_vault\030\002" + + " \001(\0132).google.cloud.backupdr.v1beta.BackupVaultB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "validate_only\030\004 \001(\010B\003\340A\001\022\022\n" + + "\005force\030\005 \001(\010B\003\340A\001\022,\n" + + "\037force_update_access_restriction\030\006 \001(\010B\003\340A\001\"\374\001\n" + + "\030DeleteBackupVaultRequest\0229\n" + + "\004name\030\001 \001(\tB+\340A\002\372A%\n" + + "#backupdr.googleapis.com/BackupVault\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\022\n" + + "\005force\030\003 \001(\010B\003\340A\001\022\014\n" + + "\004etag\030\004 \001(\t\022\032\n\r" + + "validate_only\030\005 \001(\010B\003\340A\001\022\032\n\r" + + "allow_missing\030\006 \001(\010B\003\340A\001\022*\n" + + "\035ignore_backup_plan_references\030\007 \001(\010B\003\340A\001\"\261\001\n" + + "\026ListDataSourcesRequest\022:\n" + + "\006parent\030\001 \001(\t" + + "B*\340A\002\372A$\022\"backupdr.googleapis.com/DataSource\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\207\001\n" + + "\027ListDataSourcesResponse\022>\n" + + "\014data_sources\030\001 \003(\0132(.google.cloud.backupdr.v1beta.DataSource\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"P\n" + + "\024GetDataSourceRequest\0228\n" + + "\004name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"backupdr.googleapis.com/DataSource\"\320\001\n" + + "\027UpdateDataSourceRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022B\n" + + "\013data_source\030\002" + + " \001(\0132(.google.cloud.backupdr.v1beta.DataSourceB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "allow_missing\030\004 \001(\010B\003\340A\001\"\346\001\n" + + "\022ListBackupsRequest\0226\n" + + "\006parent\030\001 \001(\tB&\340A\002\372A" + + " \022\036backupdr.googleapis.com/Backup\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\022;\n" + + "\004view\030\006 \001(\0162(.goo" + + "gle.cloud.backupdr.v1beta.BackupViewB\003\340A\001\"z\n" + + "\023ListBackupsResponse\0225\n" + + "\007backups\030\001 \003(\0132$.google.cloud.backupdr.v1beta.Backup\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\205\001\n" + + "\020GetBackupRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036backupdr.googleapis.com/Backup\022;\n" + + "\004view\030\002" + + " \001(\0162(.google.cloud.backupdr.v1beta.BackupViewB\003\340A\001\"\247\001\n" + + "\023UpdateBackupRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\0229\n" + + "\006backup\030\002 \001(\0132$.go" + + "ogle.cloud.backupdr.v1beta.BackupB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"l\n" + + "\023DeleteBackupRequest\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036backupdr.googleapis.com/Backup\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\366\005\n" + + "\024RestoreBackupRequest\022m\n" + + "#compute_instance_target_environment\030\003" + + " \001(\0132>.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironmentH\000\022V\n" + + "\027disk_target_environment\030\005 \001(\01323.google." + + "cloud.backupdr.v1beta.DiskTargetEnvironmentH\000\022c\n" + + "\036region_disk_target_environment\030\006" + + " \001(\01329.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironmentH\000\022m\n" + + "#compute_instance_restore_properties\030\004 \001(\0132>.google" + + ".cloud.backupdr.v1beta.ComputeInstanceRestorePropertiesH\001\022V\n" + + "\027disk_restore_properties\030\007" + + " \001(\01323.google.cloud.backupdr.v1beta.DiskRestorePropertiesH\001\0224\n" + + "\004name\030\001 \001(\tB&\340A\002\372A \n" + + "\036backupdr.googleapis.com/Backup\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022H\n" + + "\032clear_overrides_field_mask\030\010" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001H\002\210\001\001B\024\n" + + "\022target_environmentB\025\n" + + "\023instance_propertiesB\035\n" + + "\033_clear_overrides_field_mask\"^\n" + + "\025RestoreBackupResponse\022E\n" + + "\017target_resource\030\001 \001(\0132,.googl" + + "e.cloud.backupdr.v1beta.TargetResource\"k\n" + + "\016TargetResource\022A\n" + + "\014gcp_resource\030\001 \001(\0132)" + + ".google.cloud.backupdr.v1beta.GcpResourceH\000B\026\n" + + "\024target_resource_info\"G\n" + + "\013GcpResource\022\030\n" + + "\020gcp_resourcename\030\001 \001(\t\022\020\n" + + "\010location\030\002 \001(\t\022\014\n" + + "\004type\030\003 \001(\t\"M\n" + + "\021BackupGcpResource\022\030\n" + + "\020gcp_resourcename\030\001 \001(\t\022\020\n" + + "\010location\030\002 \001(\t\022\014\n" + + "\004type\030\003 \001(\t*Q\n" + + "\021BackupConfigState\022#\n" + + "\037BACKUP_CONFIG_STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\013\n" + + "\007PASSIVE\020\002*V\n\n" + + "BackupView\022\033\n" + + "\027BACKUP_VIEW_UNSPECIFIED\020\000\022\025\n" + + "\021BACKUP_VIEW_BASIC\020\001\022\024\n" + + "\020BACKUP_VIEW_FULL\020\002*m\n" + + "\017BackupVaultView\022!\n" + + "\035BACKUP_VAULT_VIEW_UNSPECIFIED\020\000\022\033\n" + + "\027BACKUP_VAULT_VIEW_BASIC\020\001\022\032\n" + + "\026BACKUP_VAULT_VIEW_FULL\020\002B\356\003\n" + + " com.google.cloud.backupdr.v1betaB\020BackupVaultProtoP\001Z<" + + "cloud.google.com/go/backupdr/apiv1beta/b" + + "ackupdrpb;backupdrpb\252\002\034Google.Cloud.Back" + + "upDR.V1Beta\312\002\034Google\\Cloud\\BackupDR\\V1beta\352\002\037Google::Cloud::BackupDR::V1beta\352Am\n" + + "!cloudkms.googleapis.com/CryptoKey\022Hproj" + + "ects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}\352A\246\001\n" + + "(cloudkms.googleapis.com/CryptoKeyVersion\022zproj" + + "ects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/" + + "cryptoKeyVersions/{crypto_key_version}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto.getDescriptor(), + com.google.cloud.backupdr.v1beta.BackupvaultBaProto.getDescriptor(), + com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto.getDescriptor(), + com.google.cloud.backupdr.v1beta.BackupvaultDiskProto.getDescriptor(), + com.google.cloud.backupdr.v1beta.BackupvaultGceProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_backupdr_v1beta_BackupVault_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_backupdr_v1beta_BackupVault_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupVault_descriptor, + new java.lang.String[] { + "Name", + "Description", + "Labels", + "CreateTime", + "UpdateTime", + "BackupMinimumEnforcedRetentionDuration", + "BackupRetentionInheritance", + "Deletable", + "Etag", + "State", + "EffectiveTime", + "BackupCount", + "ServiceAccount", + "TotalStoredBytes", + "Uid", + "Annotations", + "AccessRestriction", + "EncryptionConfig", + }); + internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_descriptor = + internal_static_google_cloud_backupdr_v1beta_BackupVault_descriptor.getNestedType(0); + internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupVault_EncryptionConfig_descriptor, + new java.lang.String[] { + "KmsKeyName", + }); + internal_static_google_cloud_backupdr_v1beta_BackupVault_LabelsEntry_descriptor = + internal_static_google_cloud_backupdr_v1beta_BackupVault_descriptor.getNestedType(1); + internal_static_google_cloud_backupdr_v1beta_BackupVault_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupVault_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_backupdr_v1beta_BackupVault_AnnotationsEntry_descriptor = + internal_static_google_cloud_backupdr_v1beta_BackupVault_descriptor.getNestedType(2); + internal_static_google_cloud_backupdr_v1beta_BackupVault_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupVault_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_backupdr_v1beta_DataSource_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_backupdr_v1beta_DataSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_DataSource_descriptor, + new java.lang.String[] { + "DataSourceGcpResource", + "DataSourceBackupApplianceApplication", + "Name", + "State", + "Labels", + "CreateTime", + "UpdateTime", + "BackupCount", + "Etag", + "TotalStoredBytes", + "ConfigState", + "BackupConfigInfo", + "BackupBlockedByVaultAccessRestriction", + "SourceResource", + }); + internal_static_google_cloud_backupdr_v1beta_DataSource_LabelsEntry_descriptor = + internal_static_google_cloud_backupdr_v1beta_DataSource_descriptor.getNestedType(0); + internal_static_google_cloud_backupdr_v1beta_DataSource_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_DataSource_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupConfigInfo_descriptor, + new java.lang.String[] { + "GcpBackupConfig", + "BackupApplianceBackupConfig", + "LastBackupState", + "LastSuccessfulBackupConsistencyTime", + "LastBackupError", + "BackupConfig", + }); + internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_descriptor, + new java.lang.String[] { + "BackupPlan", + "BackupPlanDescription", + "BackupPlanAssociation", + "BackupPlanRules", + "BackupPlanRevisionName", + "BackupPlanRevisionId", + "AutoProtectionPolicyBinding", + }); + internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupApplianceBackupConfig_descriptor, + new java.lang.String[] { + "BackupApplianceName", + "BackupApplianceId", + "SlaId", + "ApplicationName", + "HostName", + "SltName", + "SlpName", + }); + internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_descriptor, + new java.lang.String[] { + "ComputeInstanceDatasourceProperties", + "CloudSqlInstanceDatasourceProperties", + "AlloyDbClusterDatasourceProperties", + "DiskDatasourceProperties", + "GcpResourcename", + "Location", + "Type", + "GcpResourceProperties", + }); + internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_descriptor, + new java.lang.String[] { + "ApplicationName", + "BackupAppliance", + "ApplianceId", + "Type", + "ApplicationId", + "Hostname", + "HostId", + }); + internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_descriptor, + new java.lang.String[] { + "Operation", + }); + internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupApplianceLockInfo_descriptor, + new java.lang.String[] { + "JobName", + "BackupImage", + "SlaId", + "BackupApplianceId", + "BackupApplianceName", + "LockReason", + "LockSource", + }); + internal_static_google_cloud_backupdr_v1beta_BackupLock_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_backupdr_v1beta_BackupLock_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupLock_descriptor, + new java.lang.String[] { + "BackupApplianceLockInfo", "ServiceLockInfo", "LockUntilTime", "ClientLockInfo", + }); + internal_static_google_cloud_backupdr_v1beta_Backup_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_backupdr_v1beta_Backup_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_Backup_descriptor, + new java.lang.String[] { + "ComputeInstanceBackupProperties", + "CloudSqlInstanceBackupProperties", + "BackupApplianceBackupProperties", + "AlloyDbBackupProperties", + "DiskBackupProperties", + "GcpBackupPlanInfo", + "GcpResource", + "Name", + "Description", + "CreateTime", + "UpdateTime", + "Labels", + "EnforcedRetentionEndTime", + "BackupRetentionInheritance", + "ExpireTime", + "ConsistencyTime", + "Etag", + "State", + "ServiceLocks", + "BackupApplianceLocks", + "BackupType", + "ResourceSizeBytes", + "SatisfiesPzs", + "SatisfiesPzi", + "KmsKeyVersions", + "BackupProperties", + "PlanInfo", + "SourceResource", + }); + internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_descriptor = + internal_static_google_cloud_backupdr_v1beta_Backup_descriptor.getNestedType(0); + internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_Backup_GCPBackupPlanInfo_descriptor, + new java.lang.String[] { + "BackupPlan", "BackupPlanRuleId", "BackupPlanRevisionName", "BackupPlanRevisionId", + }); + internal_static_google_cloud_backupdr_v1beta_Backup_LabelsEntry_descriptor = + internal_static_google_cloud_backupdr_v1beta_Backup_descriptor.getNestedType(1); + internal_static_google_cloud_backupdr_v1beta_Backup_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_Backup_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_descriptor, + new java.lang.String[] { + "Parent", "BackupVaultId", "BackupVault", "RequestId", "ValidateOnly", + }); + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_descriptor, + new java.lang.String[] { + "BackupVaults", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_descriptor, + new java.lang.String[] { + "BackupVaults", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_descriptor, + new java.lang.String[] { + "Parent", "ResourceType", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_descriptor, + new java.lang.String[] { + "Backups", "NextPageToken", + }); + internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_descriptor, + new java.lang.String[] { + "UpdateMask", + "BackupVault", + "RequestId", + "ValidateOnly", + "Force", + "ForceUpdateAccessRestriction", + }); + internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_descriptor = + getDescriptor().getMessageType(20); + internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_descriptor, + new java.lang.String[] { + "Name", + "RequestId", + "Force", + "Etag", + "ValidateOnly", + "AllowMissing", + "IgnoreBackupPlanReferences", + }); + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_descriptor = + getDescriptor().getMessageType(21); + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_descriptor = + getDescriptor().getMessageType(22); + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_descriptor, + new java.lang.String[] { + "DataSources", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_descriptor = + getDescriptor().getMessageType(23); + internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_descriptor = + getDescriptor().getMessageType(24); + internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "DataSource", "RequestId", "AllowMissing", + }); + internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_descriptor = + getDescriptor().getMessageType(25); + internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "View", + }); + internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_descriptor = + getDescriptor().getMessageType(26); + internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_descriptor, + new java.lang.String[] { + "Backups", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_descriptor = + getDescriptor().getMessageType(27); + internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_descriptor = + getDescriptor().getMessageType(28); + internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Backup", "RequestId", + }); + internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_descriptor = + getDescriptor().getMessageType(29); + internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_descriptor = + getDescriptor().getMessageType(30); + internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_descriptor, + new java.lang.String[] { + "ComputeInstanceTargetEnvironment", + "DiskTargetEnvironment", + "RegionDiskTargetEnvironment", + "ComputeInstanceRestoreProperties", + "DiskRestoreProperties", + "Name", + "RequestId", + "ClearOverridesFieldMask", + "TargetEnvironment", + "InstanceProperties", + }); + internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_descriptor = + getDescriptor().getMessageType(31); + internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_descriptor, + new java.lang.String[] { + "TargetResource", + }); + internal_static_google_cloud_backupdr_v1beta_TargetResource_descriptor = + getDescriptor().getMessageType(32); + internal_static_google_cloud_backupdr_v1beta_TargetResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_TargetResource_descriptor, + new java.lang.String[] { + "GcpResource", "TargetResourceInfo", + }); + internal_static_google_cloud_backupdr_v1beta_GcpResource_descriptor = + getDescriptor().getMessageType(33); + internal_static_google_cloud_backupdr_v1beta_GcpResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_GcpResource_descriptor, + new java.lang.String[] { + "GcpResourcename", "Location", "Type", + }); + internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_descriptor = + getDescriptor().getMessageType(34); + internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_backupdr_v1beta_BackupGcpResource_descriptor, + new java.lang.String[] { + "GcpResourcename", "Location", "Type", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.backupdr.v1beta.BackupvaultAlloyDBProto.getDescriptor(); + com.google.cloud.backupdr.v1beta.BackupvaultBaProto.getDescriptor(); + com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto.getDescriptor(); + com.google.cloud.backupdr.v1beta.BackupvaultDiskProto.getDescriptor(); + com.google.cloud.backupdr.v1beta.BackupvaultGceProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultView.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultView.java new file mode 100644 index 000000000000..17fab93ac389 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupVaultView.java @@ -0,0 +1,193 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupVaultView contains enum options for Partial and Full view.
+ * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupVaultView} + */ +@com.google.protobuf.Generated +public enum BackupVaultView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * If the value is not set, the default 'FULL' view is used.
+   * 
+ * + * BACKUP_VAULT_VIEW_UNSPECIFIED = 0; + */ + BACKUP_VAULT_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Includes basic data about the Backup Vault, but not the full contents.
+   * 
+ * + * BACKUP_VAULT_VIEW_BASIC = 1; + */ + BACKUP_VAULT_VIEW_BASIC(1), + /** + * + * + *
+   * Includes all data about the Backup Vault.
+   * This is the default value (for both ListBackupVaults and GetBackupVault).
+   * 
+ * + * BACKUP_VAULT_VIEW_FULL = 2; + */ + BACKUP_VAULT_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupVaultView"); + } + + /** + * + * + *
+   * If the value is not set, the default 'FULL' view is used.
+   * 
+ * + * BACKUP_VAULT_VIEW_UNSPECIFIED = 0; + */ + public static final int BACKUP_VAULT_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Includes basic data about the Backup Vault, but not the full contents.
+   * 
+ * + * BACKUP_VAULT_VIEW_BASIC = 1; + */ + public static final int BACKUP_VAULT_VIEW_BASIC_VALUE = 1; + + /** + * + * + *
+   * Includes all data about the Backup Vault.
+   * This is the default value (for both ListBackupVaults and GetBackupVault).
+   * 
+ * + * BACKUP_VAULT_VIEW_FULL = 2; + */ + public static final int BACKUP_VAULT_VIEW_FULL_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 BackupVaultView 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 BackupVaultView forNumber(int value) { + switch (value) { + case 0: + return BACKUP_VAULT_VIEW_UNSPECIFIED; + case 1: + return BACKUP_VAULT_VIEW_BASIC; + case 2: + return BACKUP_VAULT_VIEW_FULL; + 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 BackupVaultView findValueByNumber(int number) { + return BackupVaultView.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto.getDescriptor().getEnumTypes().get(2); + } + + private static final BackupVaultView[] VALUES = values(); + + public static BackupVaultView 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 BackupVaultView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.BackupVaultView) +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupView.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupView.java new file mode 100644 index 000000000000..c3bee6d0b09a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupView.java @@ -0,0 +1,193 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupView contains enum options for Partial and Full view.
+ * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.BackupView} + */ +@com.google.protobuf.Generated +public enum BackupView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * If the value is not set, the default 'FULL' view is used.
+   * 
+ * + * BACKUP_VIEW_UNSPECIFIED = 0; + */ + BACKUP_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * Includes basic data about the Backup, but not the full contents.
+   * 
+ * + * BACKUP_VIEW_BASIC = 1; + */ + BACKUP_VIEW_BASIC(1), + /** + * + * + *
+   * Includes all data about the Backup.
+   * This is the default value (for both ListBackups and GetBackup).
+   * 
+ * + * BACKUP_VIEW_FULL = 2; + */ + BACKUP_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupView"); + } + + /** + * + * + *
+   * If the value is not set, the default 'FULL' view is used.
+   * 
+ * + * BACKUP_VIEW_UNSPECIFIED = 0; + */ + public static final int BACKUP_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Includes basic data about the Backup, but not the full contents.
+   * 
+ * + * BACKUP_VIEW_BASIC = 1; + */ + public static final int BACKUP_VIEW_BASIC_VALUE = 1; + + /** + * + * + *
+   * Includes all data about the Backup.
+   * This is the default value (for both ListBackups and GetBackup).
+   * 
+ * + * BACKUP_VIEW_FULL = 2; + */ + public static final int BACKUP_VIEW_FULL_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 BackupView 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 BackupView forNumber(int value) { + switch (value) { + case 0: + return BACKUP_VIEW_UNSPECIFIED; + case 1: + return BACKUP_VIEW_BASIC; + case 2: + return BACKUP_VIEW_FULL; + 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 BackupView findValueByNumber(int number) { + return BackupView.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto.getDescriptor().getEnumTypes().get(1); + } + + private static final BackupView[] VALUES = values(); + + public static BackupView 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 BackupView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.BackupView) +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupWindow.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupWindow.java new file mode 100644 index 000000000000..21ba1a224563 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupWindow.java @@ -0,0 +1,631 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * `BackupWindow` defines a window of the day during which backup jobs will run.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupWindow} + */ +@com.google.protobuf.Generated +public final class BackupWindow extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BackupWindow) + BackupWindowOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupWindow"); + } + + // Use BackupWindow.newBuilder() to construct. + private BackupWindow(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BackupWindow() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupWindow.class, + com.google.cloud.backupdr.v1beta.BackupWindow.Builder.class); + } + + public static final int START_HOUR_OF_DAY_FIELD_NUMBER = 1; + private int startHourOfDay_ = 0; + + /** + * + * + *
+   * Required. The hour of day (0-23) when the window starts for e.g. if value
+   * of start hour of day is 6 that mean backup window start at 6:00.
+   * 
+ * + * int32 start_hour_of_day = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startHourOfDay. + */ + @java.lang.Override + public int getStartHourOfDay() { + return startHourOfDay_; + } + + public static final int END_HOUR_OF_DAY_FIELD_NUMBER = 2; + private int endHourOfDay_ = 0; + + /** + * + * + *
+   * Required. The hour of day (1-24) when the window end for e.g. if value of
+   * end hour of day is 10 that mean backup window end time is 10:00.
+   *
+   * End hour of day should be greater than start hour of day.
+   * 0 <= start_hour_of_day < end_hour_of_day <= 24
+   *
+   * End hour of day is not include in backup window that mean if
+   * end_hour_of_day= 10 jobs should start before 10:00.
+   * 
+ * + * int32 end_hour_of_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endHourOfDay. + */ + @java.lang.Override + public int getEndHourOfDay() { + return endHourOfDay_; + } + + 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 (startHourOfDay_ != 0) { + output.writeInt32(1, startHourOfDay_); + } + if (endHourOfDay_ != 0) { + output.writeInt32(2, endHourOfDay_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startHourOfDay_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, startHourOfDay_); + } + if (endHourOfDay_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, endHourOfDay_); + } + 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.backupdr.v1beta.BackupWindow)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BackupWindow other = + (com.google.cloud.backupdr.v1beta.BackupWindow) obj; + + if (getStartHourOfDay() != other.getStartHourOfDay()) return false; + if (getEndHourOfDay() != other.getEndHourOfDay()) 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) + START_HOUR_OF_DAY_FIELD_NUMBER; + hash = (53 * hash) + getStartHourOfDay(); + hash = (37 * hash) + END_HOUR_OF_DAY_FIELD_NUMBER; + hash = (53 * hash) + getEndHourOfDay(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow 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.backupdr.v1beta.BackupWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow 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.backupdr.v1beta.BackupWindow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupWindow 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * `BackupWindow` defines a window of the day during which backup jobs will run.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BackupWindow} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BackupWindow) + com.google.cloud.backupdr.v1beta.BackupWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BackupWindow.class, + com.google.cloud.backupdr.v1beta.BackupWindow.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BackupWindow.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startHourOfDay_ = 0; + endHourOfDay_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_BackupWindow_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupWindow getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BackupWindow.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupWindow build() { + com.google.cloud.backupdr.v1beta.BackupWindow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupWindow buildPartial() { + com.google.cloud.backupdr.v1beta.BackupWindow result = + new com.google.cloud.backupdr.v1beta.BackupWindow(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BackupWindow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startHourOfDay_ = startHourOfDay_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endHourOfDay_ = endHourOfDay_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BackupWindow) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BackupWindow) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BackupWindow other) { + if (other == com.google.cloud.backupdr.v1beta.BackupWindow.getDefaultInstance()) return this; + if (other.getStartHourOfDay() != 0) { + setStartHourOfDay(other.getStartHourOfDay()); + } + if (other.getEndHourOfDay() != 0) { + setEndHourOfDay(other.getEndHourOfDay()); + } + 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 8: + { + startHourOfDay_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + endHourOfDay_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 int startHourOfDay_; + + /** + * + * + *
+     * Required. The hour of day (0-23) when the window starts for e.g. if value
+     * of start hour of day is 6 that mean backup window start at 6:00.
+     * 
+ * + * int32 start_hour_of_day = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startHourOfDay. + */ + @java.lang.Override + public int getStartHourOfDay() { + return startHourOfDay_; + } + + /** + * + * + *
+     * Required. The hour of day (0-23) when the window starts for e.g. if value
+     * of start hour of day is 6 that mean backup window start at 6:00.
+     * 
+ * + * int32 start_hour_of_day = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The startHourOfDay to set. + * @return This builder for chaining. + */ + public Builder setStartHourOfDay(int value) { + + startHourOfDay_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The hour of day (0-23) when the window starts for e.g. if value
+     * of start hour of day is 6 that mean backup window start at 6:00.
+     * 
+ * + * int32 start_hour_of_day = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearStartHourOfDay() { + bitField0_ = (bitField0_ & ~0x00000001); + startHourOfDay_ = 0; + onChanged(); + return this; + } + + private int endHourOfDay_; + + /** + * + * + *
+     * Required. The hour of day (1-24) when the window end for e.g. if value of
+     * end hour of day is 10 that mean backup window end time is 10:00.
+     *
+     * End hour of day should be greater than start hour of day.
+     * 0 <= start_hour_of_day < end_hour_of_day <= 24
+     *
+     * End hour of day is not include in backup window that mean if
+     * end_hour_of_day= 10 jobs should start before 10:00.
+     * 
+ * + * int32 end_hour_of_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endHourOfDay. + */ + @java.lang.Override + public int getEndHourOfDay() { + return endHourOfDay_; + } + + /** + * + * + *
+     * Required. The hour of day (1-24) when the window end for e.g. if value of
+     * end hour of day is 10 that mean backup window end time is 10:00.
+     *
+     * End hour of day should be greater than start hour of day.
+     * 0 <= start_hour_of_day < end_hour_of_day <= 24
+     *
+     * End hour of day is not include in backup window that mean if
+     * end_hour_of_day= 10 jobs should start before 10:00.
+     * 
+ * + * int32 end_hour_of_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The endHourOfDay to set. + * @return This builder for chaining. + */ + public Builder setEndHourOfDay(int value) { + + endHourOfDay_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The hour of day (1-24) when the window end for e.g. if value of
+     * end hour of day is 10 that mean backup window end time is 10:00.
+     *
+     * End hour of day should be greater than start hour of day.
+     * 0 <= start_hour_of_day < end_hour_of_day <= 24
+     *
+     * End hour of day is not include in backup window that mean if
+     * end_hour_of_day= 10 jobs should start before 10:00.
+     * 
+ * + * int32 end_hour_of_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEndHourOfDay() { + bitField0_ = (bitField0_ & ~0x00000002); + endHourOfDay_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BackupWindow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BackupWindow) + private static final com.google.cloud.backupdr.v1beta.BackupWindow DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BackupWindow(); + } + + public static com.google.cloud.backupdr.v1beta.BackupWindow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BackupWindow 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.backupdr.v1beta.BackupWindow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupWindowOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupWindowOrBuilder.java new file mode 100644 index 000000000000..182d3af48327 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupWindowOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BackupWindowOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BackupWindow) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The hour of day (0-23) when the window starts for e.g. if value
+   * of start hour of day is 6 that mean backup window start at 6:00.
+   * 
+ * + * int32 start_hour_of_day = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startHourOfDay. + */ + int getStartHourOfDay(); + + /** + * + * + *
+   * Required. The hour of day (1-24) when the window end for e.g. if value of
+   * end hour of day is 10 that mean backup window end time is 10:00.
+   *
+   * End hour of day should be greater than start hour of day.
+   * 0 <= start_hour_of_day < end_hour_of_day <= 24
+   *
+   * End hour of day is not include in backup window that mean if
+   * end_hour_of_day= 10 jobs should start before 10:00.
+   * 
+ * + * int32 end_hour_of_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endHourOfDay. + */ + int getEndHourOfDay(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupvaultAlloyDBProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupvaultAlloyDBProto.java new file mode 100644 index 000000000000..2341861e1798 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BackupvaultAlloyDBProto.java @@ -0,0 +1,172 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_alloydb.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class BackupvaultAlloyDBProto extends com.google.protobuf.GeneratedFile { + private BackupvaultAlloyDBProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BackupvaultAlloyDBProto"); + } + + 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_backupdr_v1beta_AlloyDBClusterDataSourceProperties_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceReferenceProperties_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterDataSourceReferenceProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_AlloyDbPitrWindow_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AlloyDbPitrWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_AlloyDbClusterBackupProperties_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AlloyDbClusterBackupProperties_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterBackupPlanAssociationProperties_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AlloyDBClusterBackupPlanAssociationProperties_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" + + "6google/cloud/backupdr/v1beta/backupvault_alloydb.proto\022\034google.cloud.backupdr." + + "v1beta\032\037google/api/field_behavior.proto\032" + + "\033google/api/field_info.proto\032\031google/api" + + "/resource.proto\032\037google/protobuf/timestamp.proto\"\300\001\n" + + "\"AlloyDBClusterDataSourceProperties\0224\n" + + "\004name\030\001 \001(\tB&\340A\003\372A \n" + + "\036alloydb.googleapis.com/Cluster\022J\n" + + "\014pitr_windows\030\002 " + + "\003(\0132/.google.cloud.backupdr.v1beta.AlloyDbPitrWindowB\003\340A\003\022\030\n" + + "\013cluster_uid\030\003 \001(\tB\003\340A\003\"c\n" + + "+AlloyDBClusterDataSourceReferenceProperties\0224\n" + + "\004name\030\001 \001(\tB&\340A\003\372A \n" + + "\036alloydb.googleapis.com/Cluster\"\234\001\n" + + "\021AlloyDbPitrWindow\0223\n\n" + + "start_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\037\n" + + "\022log_retention_days\030\003 \001(\003B\003\340A\003\"\233\001\n" + + "\036AlloyDbClusterBackupProperties\022\030\n" + + "\013description\030\001 \001(\tH\000\210\001\001\022\031\n" + + "\014stored_bytes\030\002 \001(\003B\003\340A\003\022\025\n" + + "\010chain_id\030\003 \001(\tB\003\340A\003\022\035\n" + + "\020database_version\030\004 \001(\tB\003\340A\003B\016\n" + + "\014_description\"Q\n" + + "-AlloyDBClusterBackupPlanAssociationProperties\022 \n" + + "\013cluster_uid\030\001 \001(" + + "\tB\013\340A\003\342\214\317\327\010\002\010\001B\315\002\n" + + " com.google.cloud.backupdr.v1betaB\027BackupvaultAlloyD" + + "BProtoP\001Z.google.cloud.bac" + + "kupdr.v1beta.DiskRestoreProperties.AccessModeB\003\340A\001H\n" + + "\210\001\001\022`\n" + + "\014architecture\030\016 \001(\0162@." + + "google.cloud.backupdr.v1beta.DiskRestoreProperties.ArchitectureB\003\340A\001H\013\210\001\001\022\034\n" + + "\017resource_policy\030\017 \003(\tB\003\340A\001\022\026\n" + + "\004type\030\020 \001(\tB\003\340A\002H\014\210\001\001\022T\n" + + "\006labels\030\021 \003(\0132?.google.cloud.b" + + "ackupdr.v1beta.DiskRestoreProperties.LabelsEntryB\003\340A\001\022p\n" + + "\025resource_manager_tags\030\022 \003(\0132L.google.cloud.backupdr.v1beta.Disk" + + "RestoreProperties.ResourceManagerTagsEntryB\003\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032:\n" + + "\030ResourceManagerTagsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"L\n\n" + + "AccessMode\022\025\n" + + "\021READ_WRITE_SINGLE\020\000\022\023\n" + + "\017READ_WRITE_MANY\020\001\022\022\n" + + "\016READ_ONLY_MANY\020\002\"C\n" + + "\014Architecture\022\034\n" + + "\030ARCHITECTURE_UNSPECIFIED\020\000\022\n" + + "\n" + + "\006X86_64\020\001\022\t\n" + + "\005ARM64\020\002B\020\n" + + "\016source_optionsB\007\n" + + "\005_nameB\016\n" + + "\014_descriptionB\n\n" + + "\010_size_gbB\026\n" + + "\024_disk_encryption_keyB\034\n" + + "\032_physical_block_size_bytesB\023\n" + + "\021_provisioned_iopsB\031\n" + + "\027_provisioned_throughputB\036\n" + + "\034_enable_confidential_computeB\017\n\r" + + "_storage_poolB\016\n" + + "\014_access_modeB\017\n\r" + + "_architectureB\007\n" + + "\005_type\"b\n" + + "\036RestoreDiskFromInstanceOptions\022\034\n" + + "\022source_device_name\030\001 \001(\tH\000\022\023\n" + + "\tboot_disk\030\002 \001(\010H\000B\r\n" + + "\013source_disk\"\372\007\n" + + "\024DiskBackupProperties\022\030\n" + + "\013description\030\001 \001(\tH\000\210\001\001\022\020\n" + + "\010licenses\030\002 \003(\t\022F\n" + + "\020guest_os_feature\030\003" + + " \003(\0132,.google.cloud.backupdr.v1beta.GuestOsFeature\022Z\n" + + "\014architecture\030\004 \001(\0162?.google.cloud.backupdr.v1b" + + "eta.DiskBackupProperties.ArchitectureH\001\210\001\001\022\021\n" + + "\004type\030\005 \001(\tH\002\210\001\001\022\024\n" + + "\007size_gb\030\006 \001(\003H\003\210\001\001\022\023\n" + + "\006region\030\007 \001(\tH\004\210\001\001\022\021\n" + + "\004zone\030\010 \001(\tH\005\210\001\001\022\025\n\r" + + "replica_zones\030\t \003(\t\022\030\n" + + "\013source_disk\030\n" + + " \001(\tH\006\210\001\001\022\030\n" + + "\013access_mode\030\013 \001(\tH\007\210\001\001\022\035\n" + + "\020provisioned_iops\030\014 \001(\003H\010\210\001\001\022#\n" + + "\026provisioned_throughput\030\r" + + " \001(\003H\t\210\001\001\022&\n" + + "\031physical_block_size_bytes\030\016 \001(\003H\n" + + "\210\001\001\022(\n" + + "\033enable_confidential_compute\030\017 \001(\010H\013\210\001\001\022\031\n" + + "\014storage_pool\030\020 \001(\tH\014\210\001\001\022N\n" + + "\006labels\030\021 \003(\0132>.google" + + ".cloud.backupdr.v1beta.DiskBackupProperties.LabelsEntry\022\030\n" + + "\013guest_flush\030\022 \001(\010B\003\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"C\n" + + "\014Architecture\022\034\n" + + "\030ARCHITECTURE_UNSPECIFIED\020\000\022\n\n" + + "\006X86_64\020\001\022\t\n" + + "\005ARM64\020\002B\016\n" + + "\014_descriptionB\017\n\r" + + "_architectureB\007\n" + + "\005_typeB\n\n" + + "\010_size_gbB\t\n" + + "\007_regionB\007\n" + + "\005_zoneB\016\n" + + "\014_source_diskB\016\n" + + "\014_access_modeB\023\n" + + "\021_provisioned_iopsB\031\n" + + "\027_provisioned_throughputB\034\n" + + "\032_physical_block_size_bytesB\036\n" + + "\034_enable_confidential_computeB\017\n\r" + + "_storage_pool\"\\\n" + + "\030DiskDataSourceProperties\022\014\n" + + "\004name\030\001 \001(\t\022\023\n" + + "\013description\030\002 \001(\t\022\014\n" + + "\004type\030\003 \001(\t\022\017\n" + + "\007size_gb\030\004 \001(\003B\274\002\n" + + " com.google.cloud.backupdr.v1betaB\024BackupvaultDiskProtoP\001Z\n" + + "\005disks\030\007 \003(\0132*.go" + + "ogle.cloud.backupdr.v1beta.AttachedDiskB\003\340A\001\022M\n" + + "\016display_device\030\010 \001(\0132+.google.cl" + + "oud.backupdr.v1beta.DisplayDeviceB\003\340A\001H\006\210\001\001\022P\n" + + "\022guest_accelerators\030\t \003(\0132/.google" + + ".cloud.backupdr.v1beta.AcceleratorConfigB\003\340A\001\022\032\n" + + "\010hostname\030\n" + + " \001(\tB\003\340A\001H\007\210\001\001\022^\n" + + "\027instance_encryption_key\030\013 \001(\01323.google.clou" + + "d.backupdr.v1beta.CustomerEncryptionKeyB\003\340A\001H\010\210\001\001\022c\n" + + "\032key_revocation_action_type\030\014" + + " \001(\01625.google.cloud.backupdr.v1beta.KeyRevocationActionTypeB\003\340A\001H" + + "\t\210\001\001\022_\n" + + "\006labels\030\r" + + " \003(\0132J.google.cloud.backupdr.v1beta.Co" + + "mputeInstanceRestoreProperties.LabelsEntryB\003\340A\001\022\036\n" + + "\014machine_type\030\016 \001(\tB\003\340A\001H\n" + + "\210\001\001\022B\n" + + "\010metadata\030\017" + + " \001(\0132&.google.cloud.backupdr.v1beta.MetadataB\003\340A\001H\013\210\001\001\022\"\n" + + "\020min_cpu_platform\030\020 \001(\tB\003\340A\001H\014\210\001\001\022O\n" + + "\022network_interfaces\030\021" + + " \003(\0132..google.cloud.backupdr.v1beta.NetworkInterfaceB\003\340A\001\022d\n" + + "\032network_performance_config\030\022 \001(\01326.google.cloud.back" + + "updr.v1beta.NetworkPerformanceConfigB\003\340A\001H\r" + + "\210\001\001\022F\n" + + "\006params\030\023 \001(\0132,.google.cloud.ba" + + "ckupdr.v1beta.InstanceParamsB\003\340A\004H\016\210\001\001\022\214\001\n" + + "\032private_ipv6_google_access\030\024 \001(\0162^.go" + + "ogle.cloud.backupdr.v1beta.ComputeInstan" + + "ceRestoreProperties.InstancePrivateIpv6GoogleAccessB\003\340A\001H\017\210\001\001\022l\n" + + "\023allocation_affinity\030\025 \001(\01320.google.cloud.backupdr.v1bet" + + "a.AllocationAffinityB\003\340A\001H\020R\023reservationAffinity\210\001\001\022\036\n" + + "\021resource_policies\030\026 \003(\tB\003\340A\001\022F\n\n" + + "scheduling\030\027" + + " \001(\0132(.google.cloud.backupdr.v1beta.SchedulingB\003\340A\001H\021\210\001\001\022K\n" + + "\020service_accounts\030\030" + + " \003(\0132,.google.cloud.backupdr.v1beta.ServiceAccountB\003\340A\001\022:\n" + + "\004tags\030\032" + + " \001(\0132\".google.cloud.backupdr.v1beta.TagsB\003\340A\001H\022\210\001\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"\307\001\n" + + "\037InstancePrivateIpv6GoogleAccess\0223\n" + + "/INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED\020\000\022\033\n" + + "\027INHERIT_FROM_SUBNETWORK\020\001\022\'\n" + + "#ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE\020\002\022)\n" + + "%ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE\020\003B\007\n" + + "\005_nameB\034\n" + + "\032_advanced_machine_featuresB\021\n" + + "\017_can_ip_forwardB\037\n" + + "\035_confidential_instance_configB\026\n" + + "\024_deletion_protectionB\016\n" + + "\014_descriptionB\021\n" + + "\017_display_deviceB\013\n" + + "\t_hostnameB\032\n" + + "\030_instance_encryption_keyB\035\n" + + "\033_key_revocation_action_typeB\017\n\r" + + "_machine_typeB\013\n" + + "\t_metadataB\023\n" + + "\021_min_cpu_platformB\035\n" + + "\033_network_performance_configB\t\n" + + "\007_paramsB\035\n" + + "\033_private_ipv6_google_accessB\026\n" + + "\024_allocation_affinityB\r\n" + + "\013_schedulingB\007\n" + + "\005_tags\"\232\001\n" + + " ComputeInstanceTargetEnvironment\022\024\n" + + "\007project\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004zone\030\002 \001(\tB\003\340A\002\022-\n" + + "\033use_project_service_account\030\003" + + " \001(\010B\003\340A\001H\000\210\001\001B\036\n" + + "\034_use_project_service_account\"\224\001\n" + + "#ComputeInstanceDataSourceProperties\022\014\n" + + "\004name\030\001 \001(\t\022\023\n" + + "\013description\030\002 \001(\t\022\024\n" + + "\014machine_type\030\003 \001(\t\022\030\n" + + "\020total_disk_count\030\004 \001(\003\022\032\n" + + "\022total_disk_size_gb\030\005 \001(\003\"\245\002\n" + + "\027AdvancedMachineFeatures\022.\n" + + "\034enable_nested_virtualization\030\001" + + " \001(\010B\003\340A\001H\000\210\001\001\022\"\n" + + "\020threads_per_core\030\002 \001(\005B\003\340A\001H\001\210\001\001\022$\n" + + "\022visible_core_count\030\003 \001(\005B\003\340A\001H\002\210\001\001\022(\n" + + "\026enable_uefi_networking\030\004 \001(\010B\003\340A\001H\003\210\001\001B\037\n" + + "\035_enable_nested_virtualizationB\023\n" + + "\021_threads_per_coreB\025\n" + + "\023_visible_core_countB\031\n" + + "\027_enable_uefi_networking\"k\n" + + "\032ConfidentialInstanceConfig\022-\n" + + "\033enable_confidential_compute\030\001" + + " \001(\010B\003\340A\001H\000\210\001\001B\036\n" + + "\034_enable_confidential_compute\"D\n\r" + + "DisplayDevice\022 \n" + + "\016enable_display\030\001 \001(\010B\003\340A\001H\000\210\001\001B\021\n" + + "\017_enable_display\"\335\001\n" + + "\030NetworkPerformanceConfig\022j\n" + + "\033total_egress_bandwidth_tier\030\001 \001(\0162;.google.cloud." + + "backupdr.v1beta.NetworkPerformanceConfig.TierB\003\340A\001H\000\210\001\001\"5\n" + + "\004Tier\022\024\n" + + "\020TIER_UNSPECIFIED\020\000\022\013\n" + + "\007DEFAULT\020\001\022\n\n" + + "\006TIER_1\020\002B\036\n" + + "\034_total_egress_bandwidth_tier\"\267\001\n" + + "\016InstanceParams\022i\n" + + "\025resource_manager_tags\030\001 \003(\0132E.googl" + + "e.cloud.backupdr.v1beta.InstanceParams.ResourceManagerTagsEntryB\003\340A\001\032:\n" + + "\030ResourceManagerTagsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"\271\003\n" + + "\016GuestOsFeature\022K\n" + + "\004type\030\001 \001(" + + "\01628.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureTypeH\000\210\001\001\"\320\002\n" + + "\013FeatureType\022\034\n" + + "\030FEATURE_TYPE_UNSPECIFIED\020\000\022\032\n" + + "\026VIRTIO_SCSI_MULTIQUEUE\020\001\022\013\n" + + "\007WINDOWS\020\002\022\023\n" + + "\017MULTI_IP_SUBNET\020\003\022\023\n" + + "\017UEFI_COMPATIBLE\020\004\022\017\n" + + "\013SECURE_BOOT\020\005\022\t\n" + + "\005GVNIC\020\006\022\017\n" + + "\013SEV_CAPABLE\020\007\022\037\n" + + "\033BARE_METAL_LINUX_COMPATIBLE\020\010\022\035\n" + + "\031SUSPEND_RESUME_COMPATIBLE\020\t\022\027\n" + + "\023SEV_LIVE_MIGRATABLE\020\n" + + "\022\023\n" + + "\017SEV_SNP_CAPABLE\020\013\022\017\n" + + "\013TDX_CAPABLE\020\014\022\010\n" + + "\004IDPF\020\r" + + "\022\032\n" + + "\026SEV_LIVE_MIGRATABLE_V2\020\016B\007\n" + + "\005_type\"\277\002\n" + + "\022AllocationAffinity\022x\n" + + "\027consume_allocation_type\030\001 \001(\01625.google.cl" + + "oud.backupdr.v1beta.AllocationAffinity.TypeB\003\340A\001H\000R\026consumeReservationType\210\001\001\022\025\n" + + "\003key\030\002 \001(\tB\003\340A\001H\001\210\001\001\022\023\n" + + "\006values\030\003 \003(\tB\003\340A\001\"_\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\022\n" + + "\016NO_RESERVATION\020\001\022\023\n" + + "\017ANY_RESERVATION\020\002\022\030\n" + + "\024SPECIFIC_RESERVATION\020\003B\032\n" + + "\030_consume_allocation_typeB\006\n" + + "\004_key\"\207\001\n" + + "\021AcceleratorConfig\022\"\n" + + "\020accelerator_type\030\001 \001(\tB\003\340A\001H\000\210\001\001\022#\n" + + "\021accelerator_count\030\002 \001(\005B\003\340A\001H\001\210\001\001B\023\n" + + "\021_accelerator_typeB\024\n" + + "\022_accelerator_count\"\274\001\n" + + "\025CustomerEncryptionKey\022\026\n" + + "\007raw_key\030\001 \001(\tB\003\340A\001H\000\022 \n" + + "\021rsa_encrypted_key\030\002 \001(\tB\003\340A\001H\000\022\033\n" + + "\014kms_key_name\030\003 \001(\tB\003\340A\001H\000\022)\n" + + "\027kms_key_service_account\030\004 \001(\tB\003\340A\001H\001\210\001\001B\005\n" + + "\003keyB\032\n" + + "\030_kms_key_service_account\"I\n" + + "\005Entry\022\025\n" + + "\003key\030\001 \001(\tB\003\340A\001H\000\210\001\001\022\027\n" + + "\005value\030\002 \001(\tB\003\340A\001H\001\210\001\001B\006\n" + + "\004_keyB\010\n" + + "\006_value\"C\n" + + "\010Metadata\0227\n" + + "\005items\030\001 \003(\0132#.google.cloud.backupdr.v1beta.EntryB\003\340A\001\"\256" + + "\t\n" + + "\020NetworkInterface\022\031\n" + + "\007network\030\001 \001(\tB\003\340A\001H\000\210\001\001\022\034\n\n" + + "subnetwork\030\002 \001(\tB\003\340A\001H\001\210\001\001\022/\n\n" + + "ip_address\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\002H\002R" + + "\tnetworkIP\210\001\001\022&\n" + + "\014ipv6_address\030\004 \001(" + + "\tB\013\340A\001\342\214\317\327\010\002\010\003H\003\210\001\001\022-\n" + + "\033internal_ipv6_prefix_length\030\005" + + " \001(\005B\003\340A\001H\004\210\001\001\022\026\n" + + "\004name\030\006 \001(\tB\003\340A\003H\005\210\001\001\022G\n" + + "\016access_configs\030\007 \003(\0132*.google.c" + + "loud.backupdr.v1beta.AccessConfigB\003\340A\001\022L\n" + + "\023ipv6_access_configs\030\010" + + " \003(\0132*.google.cloud.backupdr.v1beta.AccessConfigB\003\340A\001\022H\n" + + "\017alias_ip_ranges\030\t" + + " \003(\0132*.google.cloud.backupdr.v1beta.AliasIpRangeB\003\340A\001\022Q\n\n" + + "stack_type\030\n" + + " \001(\01628.google.cloud.backupdr.v1beta.NetworkInterface.StackTypeH\006\210\001\001\022a\n" + + "\020ipv6_access_type\030\013 \001(\0162=.google.cloud.backu" + + "pdr.v1beta.NetworkInterface.Ipv6AccessTypeB\003\340A\001H\007\210\001\001\022\035\n" + + "\013queue_count\030\014 \001(\005B\003\340A\001H\010\210\001\001\022R\n" + + "\010nic_type\030\r" + + " \001(\01626.google.cloud.backupdr.v1beta.NetworkInterface.NicTypeB\003\340A\001H" + + "\t\210\001\001\022$\n" + + "\022network_attachment\030\016 \001(\tB\003\340A\001H\n" + + "\210\001\001\"E\n" + + "\tStackType\022\032\n" + + "\026STACK_TYPE_UNSPECIFIED\020\000\022\r\n" + + "\tIPV4_ONLY\020\001\022\r\n" + + "\tIPV4_IPV6\020\002\"N\n" + + "\016Ipv6AccessType\022 \n" + + "\034UNSPECIFIED_IPV6_ACCESS_TYPE\020\000\022\014\n" + + "\010INTERNAL\020\001\022\014\n" + + "\010EXTERNAL\020\002\">\n" + + "\007NicType\022\030\n" + + "\024NIC_TYPE_UNSPECIFIED\020\000\022\016\n\n" + + "VIRTIO_NET\020\001\022\t\n" + + "\005GVNIC\020\002B\n\n" + + "\010_networkB\r\n" + + "\013_subnetworkB\r\n" + + "\013_ip_addressB\017\n\r" + + "_ipv6_addressB\036\n" + + "\034_internal_ipv6_prefix_lengthB\007\n" + + "\005_nameB\r\n" + + "\013_stack_typeB\023\n" + + "\021_ipv6_access_typeB\016\n" + + "\014_queue_countB\013\n" + + "\t_nic_typeB\025\n" + + "\023_network_attachment\"\272\005\n" + + "\014AccessConfig\022M\n" + + "\004type\030\001 \001(\0162" + + "5.google.cloud.backupdr.v1beta.AccessConfig.AccessTypeB\003\340A\001H\000\210\001\001\022\026\n" + + "\004name\030\002 \001(\tB\003\340A\001H\001\210\001\001\022$\n" + + "\013external_ip\030\003 \001(\tB\003\340A\001H\002R\005natIP\210\001\001\022\037\n\r" + + "external_ipv6\030\004 \001(\tB\003\340A\001H\003\210\001\001\022-\n" + + "\033external_ipv6_prefix_length\030\005 \001(\005B\003\340A\001H\004\210\001\001\022" + + " \n" + + "\016set_public_ptr\030\006 \001(\010B\003\340A\001H\005\210\001\001\022(\n" + + "\026public_ptr_domain_name\030\007 \001(\tB\003\340A\001H\006\210\001\001\022V\n" + + "\014network_tier\030\010 \001(\01626.google.cloud." + + "backupdr.v1beta.AccessConfig.NetworkTierB\003\340A\001H\007\210\001\001\"N\n\n" + + "AccessType\022\033\n" + + "\027ACCESS_TYPE_UNSPECIFIED\020\000\022\022\n" + + "\016ONE_TO_ONE_NAT\020\001\022\017\n" + + "\013DIRECT_IPV6\020\002\"F\n" + + "\013NetworkTier\022\034\n" + + "\030NETWORK_TIER_UNSPECIFIED\020\000\022\013\n" + + "\007PREMIUM\020\001\022\014\n" + + "\010STANDARD\020\002B\007\n" + + "\005_typeB\007\n" + + "\005_nameB\016\n" + + "\014_external_ipB\020\n" + + "\016_external_ipv6B\036\n" + + "\034_external_ipv6_prefix_lengthB\021\n" + + "\017_set_public_ptrB\031\n" + + "\027_public_ptr_domain_nameB\017\n\r" + + "_network_tier\"\204\001\n" + + "\014AliasIpRange\022\037\n\r" + + "ip_cidr_range\030\001 \001(\tB\003\340A\001H\000\210\001\001\022\'\n" + + "\025subnetwork_range_name\030\002 \001(\tB\003\340A\001H\001\210\001\001B\020\n" + + "\016_ip_cidr_rangeB\030\n" + + "\026_subnetwork_range_name\"\364\t\n\n" + + "Scheduling\022a\n" + + "\023on_host_maintenance\030\001 \001(\0162:.google.cloud.backupdr.v1beta." + + "Scheduling.OnHostMaintenanceB\003\340A\001H\000\210\001\001\022#\n" + + "\021automatic_restart\030\002 \001(\010B\003\340A\001H\001\210\001\001\022\035\n" + + "\013preemptible\030\003 \001(\010B\003\340A\001H\002\210\001\001\022S\n" + + "\017node_affinities\030\004" + + " \003(\01325.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityB\003\340A\001\022\037\n\r" + + "min_node_cpus\030\005 \001(\005B\003\340A\001H\003\210\001\001\022`\n" + + "\022provisioning_model\030\006 \001(\0162:.google.cloud.backupdr.v1b" + + "eta.Scheduling.ProvisioningModelB\003\340A\001H\004\210\001\001\022q\n" + + "\033instance_termination_action\030\007 \001(\0162" + + "B.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationActionB\003\340A\001H\005\210\001\001\022^\n" + + "\032local_ssd_recovery_timeout\030\n" + + " \001(\01320.goog" + + "le.cloud.backupdr.v1beta.SchedulingDurationB\003\340A\001H\006\210\001\001\032\345\001\n" + + "\014NodeAffinity\022\025\n" + + "\003key\030\001 \001(\tB\003\340A\001H\000\210\001\001\022Z\n" + + "\010operator\030\002 \001(\0162>.google" + + ".cloud.backupdr.v1beta.Scheduling.NodeAffinity.OperatorB\003\340A\001H\001\210\001\001\022\023\n" + + "\006values\030\003 \003(\tB\003\340A\001\"8\n" + + "\010Operator\022\030\n" + + "\024OPERATOR_UNSPECIFIED\020\000\022\006\n" + + "\002IN\020\001\022\n\n" + + "\006NOT_IN\020\002B\006\n" + + "\004_keyB\013\n" + + "\t_operator\"U\n" + + "\021OnHostMaintenance\022#\n" + + "\037ON_HOST_MAINTENANCE_UNSPECIFIED\020\000\022\r\n" + + "\tTERMINATE\020\001\022\014\n" + + "\007MIGRATE\020\350\007\"O\n" + + "\021ProvisioningModel\022\"\n" + + "\036PROVISIONING_MODEL_UNSPECIFIED\020\000\022\014\n" + + "\010STANDARD\020\001\022\010\n" + + "\004SPOT\020\002\"^\n" + + "\031InstanceTerminationAction\022+\n" + + "\'INSTANCE_TERMINATION_ACTION_UNSPECIFIED\020\000\022\n\n" + + "\006DELETE\020\001\022\010\n" + + "\004STOP\020\002B\026\n" + + "\024_on_host_maintenanceB\024\n" + + "\022_automatic_restartB\016\n" + + "\014_preemptibleB\020\n" + + "\016_min_node_cpusB\025\n" + + "\023_provisioning_modelB\036\n" + + "\034_instance_termination_actionB\035\n" + + "\033_local_ssd_recovery_timeout\"^\n" + + "\022SchedulingDuration\022\031\n" + + "\007seconds\030\001 \001(\003B\003\340A\001H\000\210\001\001\022\027\n" + + "\005nanos\030\002 \001(\005B\003\340A\001H\001\210\001\001B\n\n" + + "\010_secondsB\010\n" + + "\006_nanos\"H\n" + + "\016ServiceAccount\022\027\n" + + "\005email\030\001 \001(\tB\003\340A\001H\000\210\001\001\022\023\n" + + "\006scopes\030\002 \003(\tB\003\340A\001B\010\n" + + "\006_email\"\032\n" + + "\004Tags\022\022\n" + + "\005items\030\001 \003(\tB\003\340A\001\"\261\014\n" + + "\014AttachedDisk\022`\n" + + "\021initialize_params\030\001 \001(\0132;." + + "google.cloud.backupdr.v1beta.AttachedDisk.InitializeParamsB\003\340A\001H\000\210\001\001\022\035\n" + + "\013device_name\030\004 \001(\tB\003\340A\001H\001\210\001\001\022\026\n" + + "\004kind\030\005 \001(\tB\003\340A\001H\002\210\001\001\022Z\n" + + "\024disk_type_deprecated\030\006 \001(\01623.goog" + + "le.cloud.backupdr.v1beta.AttachedDisk.DiskTypeB\002\030\001H\003\210\001\001\022K\n" + + "\004mode\030\007 \001(\01623.google.c" + + "loud.backupdr.v1beta.AttachedDisk.DiskModeB\003\340A\001H\004\210\001\001\022\030\n" + + "\006source\030\010 \001(\tB\003\340A\001H\005\210\001\001\022\027\n" + + "\005index\030\t \001(\003B\003\340A\001H\006\210\001\001\022\026\n" + + "\004boot\030\n" + + " \001(\010B\003\340A\001H\007\210\001\001\022\035\n" + + "\013auto_delete\030\013 \001(\010B\003\340A\001H\010\210\001\001\022\024\n" + + "\007license\030\014 \003(\tB\003\340A\001\022Z\n" + + "\016disk_interface\030\r" + + " \001(\01628.google.cloud.backupdr.v1beta.AttachedDisk.DiskInterfaceB\003\340A\001H" + + "\t\210\001\001\022K\n" + + "\020guest_os_feature\030\016" + + " \003(\0132,.google.cloud.backupdr.v1beta.GuestOsFeatureB\003\340A\001\022Z\n" + + "\023disk_encryption_key\030\017" + + " \001(\01323.google.cloud.backupdr.v1beta.CustomerEncryptionKeyB\003\340A\001H\n" + + "\210\001\001\022\036\n" + + "\014disk_size_gb\030\020 \001(\003B\003\340A\001H\013\210\001\001\022[\n" + + "\013saved_state\030\021 \001(\01629.google.cloud.backupdr.v" + + "1beta.AttachedDisk.DiskSavedStateB\006\340A\001\340A\003H\014\210\001\001\022\036\n" + + "\tdisk_type\030\022 \001(\tB\006\340A\001\340A\003H\r" + + "\210\001\001\022K\n" + + "\004type\030\023" + + " \001(\01623.google.cloud.backupdr.v1beta.AttachedDisk.DiskTypeB\003\340A\001H\016\210\001\001\032Y\n" + + "\020InitializeParams\022\033\n" + + "\tdisk_name\030\001 \001(\tB\003\340A\001H\000\210\001\001\022\032\n\r" + + "replica_zones\030\002 \003(\tB\003\340A\001B\014\n\n" + + "_disk_name\"B\n" + + "\010DiskType\022\031\n" + + "\025DISK_TYPE_UNSPECIFIED\020\000\022\013\n" + + "\007SCRATCH\020\001\022\016\n\n" + + "PERSISTENT\020\002\"P\n" + + "\010DiskMode\022\031\n" + + "\025DISK_MODE_UNSPECIFIED\020\000\022\016\n\n" + + "READ_WRITE\020\001\022\r\n" + + "\tREAD_ONLY\020\002\022\n\n" + + "\006LOCKED\020\003\"Z\n\r" + + "DiskInterface\022\036\n" + + "\032DISK_INTERFACE_UNSPECIFIED\020\000\022\010\n" + + "\004SCSI\020\001\022\010\n" + + "\004NVME\020\002\022\n\n" + + "\006NVDIMM\020\003\022\t\n" + + "\005ISCSI\020\004\"A\n" + + "\016DiskSavedState\022 \n" + + "\034DISK_SAVED_STATE_UNSPECIFIED\020\000\022\r\n" + + "\tPRESERVED\020\001B\024\n" + + "\022_initialize_paramsB\016\n" + + "\014_device_nameB\007\n" + + "\005_kindB\027\n" + + "\025_disk_type_deprecatedB\007\n" + + "\005_modeB\t\n" + + "\007_sourceB\010\n" + + "\006_indexB\007\n" + + "\005_bootB\016\n" + + "\014_auto_deleteB\021\n" + + "\017_disk_interfaceB\026\n" + + "\024_disk_encryption_keyB\017\n\r" + + "_disk_size_gbB\016\n" + + "\014_saved_stateB\014\n\n" + + "_disk_typeB\007\n" + + "\005_type*Y\n" + + "\027KeyRevocationActionType\022*\n" + + "&KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED\020\000\022\010\n" + + "\004NONE\020\001\022\010\n" + + "\004STOP\020\002B\327\001\n" + + " com.google.cloud.backupdr.v1betaB\023Backupvau" + + "ltGceProtoP\001Z + * BindingEvaluationSummary contains the summary of the last run of job + * that applies policy to matching resources for a given binding. + * + * + * Protobuf type {@code google.cloud.backupdr.v1beta.BindingEvaluationSummary} + */ +@com.google.protobuf.Generated +public final class BindingEvaluationSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BindingEvaluationSummary) + BindingEvaluationSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BindingEvaluationSummary"); + } + + // Use BindingEvaluationSummary.newBuilder() to construct. + private BindingEvaluationSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BindingEvaluationSummary() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_BindingEvaluationSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_BindingEvaluationSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.class, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder.class); + } + + public static final int MATCHING_RESOURCE_COUNT_FIELD_NUMBER = 1; + private long matchingResourceCount_ = 0L; + + /** + * + * + *
+   * Output only. The number of resources that currently match the policy's
+   * criteria.
+   * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The matchingResourceCount. + */ + @java.lang.Override + public long getMatchingResourceCount() { + return matchingResourceCount_; + } + + public static final int PROTECTED_RESOURCE_COUNT_FIELD_NUMBER = 2; + private long protectedResourceCount_ = 0L; + + /** + * + * + *
+   * Output only. The number of matching resources that are successfully
+   * protected.
+   * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protectedResourceCount. + */ + @java.lang.Override + public long getProtectedResourceCount() { + return protectedResourceCount_; + } + + public static final int FAILED_RESOURCE_COUNT_FIELD_NUMBER = 3; + private long failedResourceCount_ = 0L; + + /** + * + * + *
+   * Output only. The number of matching resources whose protection failed
+   * during job run.
+   * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedResourceCount. + */ + @java.lang.Override + public long getFailedResourceCount() { + return failedResourceCount_; + } + + 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 (matchingResourceCount_ != 0L) { + output.writeInt64(1, matchingResourceCount_); + } + if (protectedResourceCount_ != 0L) { + output.writeInt64(2, protectedResourceCount_); + } + if (failedResourceCount_ != 0L) { + output.writeInt64(3, failedResourceCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (matchingResourceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, matchingResourceCount_); + } + if (protectedResourceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, protectedResourceCount_); + } + if (failedResourceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, failedResourceCount_); + } + 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.backupdr.v1beta.BindingEvaluationSummary)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary other = + (com.google.cloud.backupdr.v1beta.BindingEvaluationSummary) obj; + + if (getMatchingResourceCount() != other.getMatchingResourceCount()) return false; + if (getProtectedResourceCount() != other.getProtectedResourceCount()) return false; + if (getFailedResourceCount() != other.getFailedResourceCount()) 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) + MATCHING_RESOURCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMatchingResourceCount()); + hash = (37 * hash) + PROTECTED_RESOURCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProtectedResourceCount()); + hash = (37 * hash) + FAILED_RESOURCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedResourceCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary 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.backupdr.v1beta.BindingEvaluationSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary 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.backupdr.v1beta.BindingEvaluationSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BindingEvaluationSummary 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BindingEvaluationSummary contains the summary of the last run of job
+   * that applies policy to matching resources for a given binding.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BindingEvaluationSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BindingEvaluationSummary) + com.google.cloud.backupdr.v1beta.BindingEvaluationSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_BindingEvaluationSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_BindingEvaluationSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.class, + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchingResourceCount_ = 0L; + protectedResourceCount_ = 0L; + failedResourceCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_BindingEvaluationSummary_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary build() { + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingEvaluationSummary buildPartial() { + com.google.cloud.backupdr.v1beta.BindingEvaluationSummary result = + new com.google.cloud.backupdr.v1beta.BindingEvaluationSummary(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BindingEvaluationSummary result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchingResourceCount_ = matchingResourceCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.protectedResourceCount_ = protectedResourceCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.failedResourceCount_ = failedResourceCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BindingEvaluationSummary) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BindingEvaluationSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BindingEvaluationSummary other) { + if (other == com.google.cloud.backupdr.v1beta.BindingEvaluationSummary.getDefaultInstance()) + return this; + if (other.getMatchingResourceCount() != 0L) { + setMatchingResourceCount(other.getMatchingResourceCount()); + } + if (other.getProtectedResourceCount() != 0L) { + setProtectedResourceCount(other.getProtectedResourceCount()); + } + if (other.getFailedResourceCount() != 0L) { + setFailedResourceCount(other.getFailedResourceCount()); + } + 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 8: + { + matchingResourceCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + protectedResourceCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + failedResourceCount_ = input.readInt64(); + 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 long matchingResourceCount_; + + /** + * + * + *
+     * Output only. The number of resources that currently match the policy's
+     * criteria.
+     * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The matchingResourceCount. + */ + @java.lang.Override + public long getMatchingResourceCount() { + return matchingResourceCount_; + } + + /** + * + * + *
+     * Output only. The number of resources that currently match the policy's
+     * criteria.
+     * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The matchingResourceCount to set. + * @return This builder for chaining. + */ + public Builder setMatchingResourceCount(long value) { + + matchingResourceCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of resources that currently match the policy's
+     * criteria.
+     * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMatchingResourceCount() { + bitField0_ = (bitField0_ & ~0x00000001); + matchingResourceCount_ = 0L; + onChanged(); + return this; + } + + private long protectedResourceCount_; + + /** + * + * + *
+     * Output only. The number of matching resources that are successfully
+     * protected.
+     * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protectedResourceCount. + */ + @java.lang.Override + public long getProtectedResourceCount() { + return protectedResourceCount_; + } + + /** + * + * + *
+     * Output only. The number of matching resources that are successfully
+     * protected.
+     * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The protectedResourceCount to set. + * @return This builder for chaining. + */ + public Builder setProtectedResourceCount(long value) { + + protectedResourceCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of matching resources that are successfully
+     * protected.
+     * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProtectedResourceCount() { + bitField0_ = (bitField0_ & ~0x00000002); + protectedResourceCount_ = 0L; + onChanged(); + return this; + } + + private long failedResourceCount_; + + /** + * + * + *
+     * Output only. The number of matching resources whose protection failed
+     * during job run.
+     * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedResourceCount. + */ + @java.lang.Override + public long getFailedResourceCount() { + return failedResourceCount_; + } + + /** + * + * + *
+     * Output only. The number of matching resources whose protection failed
+     * during job run.
+     * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failedResourceCount to set. + * @return This builder for chaining. + */ + public Builder setFailedResourceCount(long value) { + + failedResourceCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of matching resources whose protection failed
+     * during job run.
+     * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailedResourceCount() { + bitField0_ = (bitField0_ & ~0x00000004); + failedResourceCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BindingEvaluationSummary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BindingEvaluationSummary) + private static final com.google.cloud.backupdr.v1beta.BindingEvaluationSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BindingEvaluationSummary(); + } + + public static com.google.cloud.backupdr.v1beta.BindingEvaluationSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BindingEvaluationSummary 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.backupdr.v1beta.BindingEvaluationSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingEvaluationSummaryOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingEvaluationSummaryOrBuilder.java new file mode 100644 index 000000000000..579f85f7abd1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingEvaluationSummaryOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BindingEvaluationSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BindingEvaluationSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The number of resources that currently match the policy's
+   * criteria.
+   * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The matchingResourceCount. + */ + long getMatchingResourceCount(); + + /** + * + * + *
+   * Output only. The number of matching resources that are successfully
+   * protected.
+   * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protectedResourceCount. + */ + long getProtectedResourceCount(); + + /** + * + * + *
+   * Output only. The number of matching resources whose protection failed
+   * during job run.
+   * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedResourceCount. + */ + long getFailedResourceCount(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResource.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResource.java new file mode 100644 index 000000000000..f72e9f31d000 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResource.java @@ -0,0 +1,1517 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BindingMatchingResource contains the details of a resource that matches the
+ * criteria of a binding.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BindingMatchingResource} + */ +@com.google.protobuf.Generated +public final class BindingMatchingResource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BindingMatchingResource) + BindingMatchingResourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BindingMatchingResource"); + } + + // Use BindingMatchingResource.newBuilder() to construct. + private BindingMatchingResource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BindingMatchingResource() { + name_ = ""; + resource_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_BindingMatchingResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_BindingMatchingResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BindingMatchingResource.class, + com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder.class); + } + + 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 `BindingMatchingResource`.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+   * 
+ * + * 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 `BindingMatchingResource`.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+   * 
+ * + * 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 RESOURCE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resource_ = ""; + + /** + * + * + *
+   * Required. Immutable. Resource name of the workload that matches the
+   * criteria of the binding.
+   *
+   * The format can be either a relative resource name (e.g.,
+   * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+   * schemeless full resource name (e.g.,
+   * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+   * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + 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(); + resource_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. Resource name of the workload that matches the
+   * criteria of the binding.
+   *
+   * The format can be either a relative resource name (e.g.,
+   * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+   * schemeless full resource name (e.g.,
+   * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+   * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_EVALUATION_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp lastEvaluationTime_; + + /** + * + * + *
+   * Output only. The timestamp when the resource was last evaluated for
+   * protection.
+   * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastEvaluationTime field is set. + */ + @java.lang.Override + public boolean hasLastEvaluationTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the resource was last evaluated for
+   * protection.
+   * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastEvaluationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastEvaluationTime() { + return lastEvaluationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastEvaluationTime_; + } + + /** + * + * + *
+   * Output only. The timestamp when the resource was last evaluated for
+   * protection.
+   * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastEvaluationTimeOrBuilder() { + return lastEvaluationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastEvaluationTime_; + } + + public static final int AUTO_PROTECTION_DETAILS_FIELD_NUMBER = 4; + private com.google.cloud.backupdr.v1beta.AutoProtectionDetails autoProtectionDetails_; + + /** + * + * + *
+   * Output only. The auto protection details of the resource from the current
+   * binding's perspective.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoProtectionDetails field is set. + */ + @java.lang.Override + public boolean hasAutoProtectionDetails() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The auto protection details of the resource from the current
+   * binding's perspective.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoProtectionDetails. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionDetails getAutoProtectionDetails() { + return autoProtectionDetails_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionDetails.getDefaultInstance() + : autoProtectionDetails_; + } + + /** + * + * + *
+   * Output only. The auto protection details of the resource from the current
+   * binding's perspective.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionDetailsOrBuilder + getAutoProtectionDetailsOrBuilder() { + return autoProtectionDetails_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionDetails.getDefaultInstance() + : autoProtectionDetails_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getLastEvaluationTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getAutoProtectionDetails()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLastEvaluationTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAutoProtectionDetails()); + } + 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.backupdr.v1beta.BindingMatchingResource)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BindingMatchingResource other = + (com.google.cloud.backupdr.v1beta.BindingMatchingResource) obj; + + if (!getName().equals(other.getName())) return false; + if (!getResource().equals(other.getResource())) return false; + if (hasLastEvaluationTime() != other.hasLastEvaluationTime()) return false; + if (hasLastEvaluationTime()) { + if (!getLastEvaluationTime().equals(other.getLastEvaluationTime())) return false; + } + if (hasAutoProtectionDetails() != other.hasAutoProtectionDetails()) return false; + if (hasAutoProtectionDetails()) { + if (!getAutoProtectionDetails().equals(other.getAutoProtectionDetails())) 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) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + if (hasLastEvaluationTime()) { + hash = (37 * hash) + LAST_EVALUATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastEvaluationTime().hashCode(); + } + if (hasAutoProtectionDetails()) { + hash = (37 * hash) + AUTO_PROTECTION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionDetails().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource 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.backupdr.v1beta.BindingMatchingResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource 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.backupdr.v1beta.BindingMatchingResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BindingMatchingResource 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BindingMatchingResource contains the details of a resource that matches the
+   * criteria of a binding.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BindingMatchingResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BindingMatchingResource) + com.google.cloud.backupdr.v1beta.BindingMatchingResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_BindingMatchingResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_BindingMatchingResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BindingMatchingResource.class, + com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BindingMatchingResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLastEvaluationTimeFieldBuilder(); + internalGetAutoProtectionDetailsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + resource_ = ""; + lastEvaluationTime_ = null; + if (lastEvaluationTimeBuilder_ != null) { + lastEvaluationTimeBuilder_.dispose(); + lastEvaluationTimeBuilder_ = null; + } + autoProtectionDetails_ = null; + if (autoProtectionDetailsBuilder_ != null) { + autoProtectionDetailsBuilder_.dispose(); + autoProtectionDetailsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_BindingMatchingResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingMatchingResource getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingMatchingResource build() { + com.google.cloud.backupdr.v1beta.BindingMatchingResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingMatchingResource buildPartial() { + com.google.cloud.backupdr.v1beta.BindingMatchingResource result = + new com.google.cloud.backupdr.v1beta.BindingMatchingResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BindingMatchingResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resource_ = resource_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lastEvaluationTime_ = + lastEvaluationTimeBuilder_ == null + ? lastEvaluationTime_ + : lastEvaluationTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.autoProtectionDetails_ = + autoProtectionDetailsBuilder_ == null + ? autoProtectionDetails_ + : autoProtectionDetailsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BindingMatchingResource) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BindingMatchingResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BindingMatchingResource other) { + if (other == com.google.cloud.backupdr.v1beta.BindingMatchingResource.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasLastEvaluationTime()) { + mergeLastEvaluationTime(other.getLastEvaluationTime()); + } + if (other.hasAutoProtectionDetails()) { + mergeAutoProtectionDetails(other.getAutoProtectionDetails()); + } + 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 18: + { + resource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetLastEvaluationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetAutoProtectionDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 `BindingMatchingResource`.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+     * 
+ * + * 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 `BindingMatchingResource`.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+     * 
+ * + * 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 `BindingMatchingResource`.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+     * 
+ * + * 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 `BindingMatchingResource`.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+     * 
+ * + * 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 `BindingMatchingResource`.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+     * 
+ * + * 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 java.lang.Object resource_ = ""; + + /** + * + * + *
+     * Required. Immutable. Resource name of the workload that matches the
+     * criteria of the binding.
+     *
+     * The format can be either a relative resource name (e.g.,
+     * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+     * schemeless full resource name (e.g.,
+     * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+     * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. Resource name of the workload that matches the
+     * criteria of the binding.
+     *
+     * The format can be either a relative resource name (e.g.,
+     * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+     * schemeless full resource name (e.g.,
+     * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+     * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. Resource name of the workload that matches the
+     * criteria of the binding.
+     *
+     * The format can be either a relative resource name (e.g.,
+     * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+     * schemeless full resource name (e.g.,
+     * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+     * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resource_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Resource name of the workload that matches the
+     * criteria of the binding.
+     *
+     * The format can be either a relative resource name (e.g.,
+     * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+     * schemeless full resource name (e.g.,
+     * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+     * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearResource() { + resource_ = getDefaultInstance().getResource(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. Resource name of the workload that matches the
+     * criteria of the binding.
+     *
+     * The format can be either a relative resource name (e.g.,
+     * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+     * schemeless full resource name (e.g.,
+     * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+     * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resource_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastEvaluationTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastEvaluationTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastEvaluationTime field is set. + */ + public boolean hasLastEvaluationTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastEvaluationTime. + */ + public com.google.protobuf.Timestamp getLastEvaluationTime() { + if (lastEvaluationTimeBuilder_ == null) { + return lastEvaluationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastEvaluationTime_; + } else { + return lastEvaluationTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastEvaluationTime(com.google.protobuf.Timestamp value) { + if (lastEvaluationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastEvaluationTime_ = value; + } else { + lastEvaluationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastEvaluationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastEvaluationTimeBuilder_ == null) { + lastEvaluationTime_ = builderForValue.build(); + } else { + lastEvaluationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastEvaluationTime(com.google.protobuf.Timestamp value) { + if (lastEvaluationTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && lastEvaluationTime_ != null + && lastEvaluationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastEvaluationTimeBuilder().mergeFrom(value); + } else { + lastEvaluationTime_ = value; + } + } else { + lastEvaluationTimeBuilder_.mergeFrom(value); + } + if (lastEvaluationTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastEvaluationTime() { + bitField0_ = (bitField0_ & ~0x00000004); + lastEvaluationTime_ = null; + if (lastEvaluationTimeBuilder_ != null) { + lastEvaluationTimeBuilder_.dispose(); + lastEvaluationTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastEvaluationTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLastEvaluationTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastEvaluationTimeOrBuilder() { + if (lastEvaluationTimeBuilder_ != null) { + return lastEvaluationTimeBuilder_.getMessageOrBuilder(); + } else { + return lastEvaluationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastEvaluationTime_; + } + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was last evaluated for
+     * protection.
+     * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLastEvaluationTimeFieldBuilder() { + if (lastEvaluationTimeBuilder_ == null) { + lastEvaluationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastEvaluationTime(), getParentForChildren(), isClean()); + lastEvaluationTime_ = null; + } + return lastEvaluationTimeBuilder_; + } + + private com.google.cloud.backupdr.v1beta.AutoProtectionDetails autoProtectionDetails_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionDetails, + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionDetailsOrBuilder> + autoProtectionDetailsBuilder_; + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoProtectionDetails field is set. + */ + public boolean hasAutoProtectionDetails() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoProtectionDetails. + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionDetails getAutoProtectionDetails() { + if (autoProtectionDetailsBuilder_ == null) { + return autoProtectionDetails_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionDetails.getDefaultInstance() + : autoProtectionDetails_; + } else { + return autoProtectionDetailsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutoProtectionDetails( + com.google.cloud.backupdr.v1beta.AutoProtectionDetails value) { + if (autoProtectionDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionDetails_ = value; + } else { + autoProtectionDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutoProtectionDetails( + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.Builder builderForValue) { + if (autoProtectionDetailsBuilder_ == null) { + autoProtectionDetails_ = builderForValue.build(); + } else { + autoProtectionDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAutoProtectionDetails( + com.google.cloud.backupdr.v1beta.AutoProtectionDetails value) { + if (autoProtectionDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && autoProtectionDetails_ != null + && autoProtectionDetails_ + != com.google.cloud.backupdr.v1beta.AutoProtectionDetails.getDefaultInstance()) { + getAutoProtectionDetailsBuilder().mergeFrom(value); + } else { + autoProtectionDetails_ = value; + } + } else { + autoProtectionDetailsBuilder_.mergeFrom(value); + } + if (autoProtectionDetails_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAutoProtectionDetails() { + bitField0_ = (bitField0_ & ~0x00000008); + autoProtectionDetails_ = null; + if (autoProtectionDetailsBuilder_ != null) { + autoProtectionDetailsBuilder_.dispose(); + autoProtectionDetailsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionDetails.Builder + getAutoProtectionDetailsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetAutoProtectionDetailsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionDetailsOrBuilder + getAutoProtectionDetailsOrBuilder() { + if (autoProtectionDetailsBuilder_ != null) { + return autoProtectionDetailsBuilder_.getMessageOrBuilder(); + } else { + return autoProtectionDetails_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionDetails.getDefaultInstance() + : autoProtectionDetails_; + } + } + + /** + * + * + *
+     * Output only. The auto protection details of the resource from the current
+     * binding's perspective.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionDetails, + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionDetailsOrBuilder> + internalGetAutoProtectionDetailsFieldBuilder() { + if (autoProtectionDetailsBuilder_ == null) { + autoProtectionDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionDetails, + com.google.cloud.backupdr.v1beta.AutoProtectionDetails.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionDetailsOrBuilder>( + getAutoProtectionDetails(), getParentForChildren(), isClean()); + autoProtectionDetails_ = null; + } + return autoProtectionDetailsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BindingMatchingResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BindingMatchingResource) + private static final com.google.cloud.backupdr.v1beta.BindingMatchingResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BindingMatchingResource(); + } + + public static com.google.cloud.backupdr.v1beta.BindingMatchingResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BindingMatchingResource 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.backupdr.v1beta.BindingMatchingResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceName.java new file mode 100644 index 000000000000..ef5f66b3130c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceName.java @@ -0,0 +1,312 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class BindingMatchingResourceName implements ResourceName { + private static final PathTemplate + PROJECT_LOCATION_AUTO_PROTECTION_POLICY_BINDING_MATCHING_RESOURCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String autoProtectionPolicy; + private final String binding; + private final String matchingResource; + + @Deprecated + protected BindingMatchingResourceName() { + project = null; + location = null; + autoProtectionPolicy = null; + binding = null; + matchingResource = null; + } + + private BindingMatchingResourceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + autoProtectionPolicy = Preconditions.checkNotNull(builder.getAutoProtectionPolicy()); + binding = Preconditions.checkNotNull(builder.getBinding()); + matchingResource = Preconditions.checkNotNull(builder.getMatchingResource()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAutoProtectionPolicy() { + return autoProtectionPolicy; + } + + public String getBinding() { + return binding; + } + + public String getMatchingResource() { + return matchingResource; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BindingMatchingResourceName of( + String project, + String location, + String autoProtectionPolicy, + String binding, + String matchingResource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAutoProtectionPolicy(autoProtectionPolicy) + .setBinding(binding) + .setMatchingResource(matchingResource) + .build(); + } + + public static String format( + String project, + String location, + String autoProtectionPolicy, + String binding, + String matchingResource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAutoProtectionPolicy(autoProtectionPolicy) + .setBinding(binding) + .setMatchingResource(matchingResource) + .build() + .toString(); + } + + public static @Nullable BindingMatchingResourceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AUTO_PROTECTION_POLICY_BINDING_MATCHING_RESOURCE.validatedMatch( + formattedString, + "BindingMatchingResourceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("auto_protection_policy"), + matchMap.get("binding"), + matchMap.get("matching_resource")); + } + + 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<@Nullable BindingMatchingResourceName> values) { + List list = new ArrayList<>(values.size()); + for (BindingMatchingResourceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AUTO_PROTECTION_POLICY_BINDING_MATCHING_RESOURCE.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 (autoProtectionPolicy != null) { + fieldMapBuilder.put("auto_protection_policy", autoProtectionPolicy); + } + if (binding != null) { + fieldMapBuilder.put("binding", binding); + } + if (matchingResource != null) { + fieldMapBuilder.put("matching_resource", matchingResource); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AUTO_PROTECTION_POLICY_BINDING_MATCHING_RESOURCE.instantiate( + "project", + project, + "location", + location, + "auto_protection_policy", + autoProtectionPolicy, + "binding", + binding, + "matching_resource", + matchingResource); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BindingMatchingResourceName that = ((BindingMatchingResourceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.autoProtectionPolicy, that.autoProtectionPolicy) + && Objects.equals(this.binding, that.binding) + && Objects.equals(this.matchingResource, that.matchingResource); + } + 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(autoProtectionPolicy); + h *= 1000003; + h ^= Objects.hashCode(binding); + h *= 1000003; + h ^= Objects.hashCode(matchingResource); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}. + */ + public static class Builder { + private String project; + private String location; + private String autoProtectionPolicy; + private String binding; + private String matchingResource; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAutoProtectionPolicy() { + return autoProtectionPolicy; + } + + public String getBinding() { + return binding; + } + + public String getMatchingResource() { + return matchingResource; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAutoProtectionPolicy(String autoProtectionPolicy) { + this.autoProtectionPolicy = autoProtectionPolicy; + return this; + } + + public Builder setBinding(String binding) { + this.binding = binding; + return this; + } + + public Builder setMatchingResource(String matchingResource) { + this.matchingResource = matchingResource; + return this; + } + + private Builder(BindingMatchingResourceName bindingMatchingResourceName) { + this.project = bindingMatchingResourceName.project; + this.location = bindingMatchingResourceName.location; + this.autoProtectionPolicy = bindingMatchingResourceName.autoProtectionPolicy; + this.binding = bindingMatchingResourceName.binding; + this.matchingResource = bindingMatchingResourceName.matchingResource; + } + + public BindingMatchingResourceName build() { + return new BindingMatchingResourceName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceOrBuilder.java new file mode 100644 index 000000000000..90b4641a6336 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceOrBuilder.java @@ -0,0 +1,193 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BindingMatchingResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BindingMatchingResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the `BindingMatchingResource`.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the `BindingMatchingResource`.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Immutable. Resource name of the workload that matches the
+   * criteria of the binding.
+   *
+   * The format can be either a relative resource name (e.g.,
+   * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+   * schemeless full resource name (e.g.,
+   * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+   * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The resource. + */ + java.lang.String getResource(); + + /** + * + * + *
+   * Required. Immutable. Resource name of the workload that matches the
+   * criteria of the binding.
+   *
+   * The format can be either a relative resource name (e.g.,
+   * `projects/my-project/zones/us-central1-a/instances/my-instance`) or a
+   * schemeless full resource name (e.g.,
+   * `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`).
+   * 
+ * + * + * string resource = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was last evaluated for
+   * protection.
+   * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastEvaluationTime field is set. + */ + boolean hasLastEvaluationTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was last evaluated for
+   * protection.
+   * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastEvaluationTime. + */ + com.google.protobuf.Timestamp getLastEvaluationTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was last evaluated for
+   * protection.
+   * 
+ * + * + * .google.protobuf.Timestamp last_evaluation_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastEvaluationTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The auto protection details of the resource from the current
+   * binding's perspective.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the autoProtectionDetails field is set. + */ + boolean hasAutoProtectionDetails(); + + /** + * + * + *
+   * Output only. The auto protection details of the resource from the current
+   * binding's perspective.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The autoProtectionDetails. + */ + com.google.cloud.backupdr.v1beta.AutoProtectionDetails getAutoProtectionDetails(); + + /** + * + * + *
+   * Output only. The auto protection details of the resource from the current
+   * binding's perspective.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionDetails auto_protection_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.AutoProtectionDetailsOrBuilder + getAutoProtectionDetailsOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceProto.java new file mode 100644 index 000000000000..fc7b511afb7b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingMatchingResourceProto.java @@ -0,0 +1,186 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class BindingMatchingResourceProto extends com.google.protobuf.GeneratedFile { + private BindingMatchingResourceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BindingMatchingResourceProto"); + } + + 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_backupdr_v1beta_GetBindingMatchingResourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetBindingMatchingResourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BindingMatchingResource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BindingMatchingResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_AutoProtectionDetails_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_AutoProtectionDetails_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/backupdr/v1beta/bindingmatchingresource.proto\022\034google.cloud.backu" + + "pdr.v1beta\032\037google/api/field_behavior.pr" + + "oto\032\031google/api/resource.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\027google/rpc/status.proto\"j\n" + + "!GetBindingMatchingResourceRequest\022E\n" + + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + + "/backupdr.googleapis.com/BindingMatchingResource\"\313\001\n" + + "#ListBindingMatchingResourcesRequest\022G\n" + + "\006parent\030\001 \001(" + + "\tB7\340A\002\372A1\022/backupdr.googleapis.com/BindingMatchingResource\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\222\001\n" + + "$ListBindingMatchingResourcesResponse\022Q\n" + + "\022matching_resources\030\001 \003(\01325.google" + + ".cloud.backupdr.v1beta.BindingMatchingResource\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\336\003\n" + + "\027BindingMatchingResource\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\010resource\030\002 \001(\tB\006\340A\005\340A\002\022=\n" + + "\024last_evaluation_time\030\003" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022Y\n" + + "\027auto_protection_details\030\004 \001(\013" + + "23.google.cloud.backupdr.v1beta.AutoProtectionDetailsB\003\340A\003:\373\001\352A\367\001\n" + + "/backupdr.googleapis.com/BindingMatchingResource\022\220\001pro" + + "jects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_pol" + + "icy}/bindings/{binding}/matchingResource" + + "s/{matching_resource}*\030bindingMatchingResources2\027bindingMatchingResource\"\230\003\n" + + "\025AutoProtectionDetails\022M\n" + + "\005state\030\001 \001(\01629.goog" + + "le.cloud.backupdr.v1beta.AutoProtectionDetails.StateB\003\340A\003\022V\n" + + "\027backup_plan_association\030\002 \001(\tB5\340A\003\372A/\n" + + "-backupdr.googleapis.com/BackupPlanAssociation\022?\n" + + "\013data_source\030\003 \001(\tB*\340A\003\372A$\n" + + "\"backupdr.googleapis.com/DataSource\022&\n" + + "\005error\030\004 \001(\0132\022.google.rpc.StatusB\003\340A\003\"o\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\r\n" + + "\tPROTECTED\020\001\022\025\n" + + "\021PROTECTION_FAILED\020\002\022\020\n" + + "\014UNPROTECTING\020\003\022\027\n" + + "\023UNPROTECTION_FAILED\020\004B\340\001\n" + + " com.google.cloud.backupdr.v1betaB\034BindingMatchingResourceProtoP\001Z + * BindingSummary contains count of different containers covered through this + * policy. + * + * + * Protobuf type {@code google.cloud.backupdr.v1beta.BindingSummary} + */ +@com.google.protobuf.Generated +public final class BindingSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.BindingSummary) + BindingSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "BindingSummary"); + } + + // Use BindingSummary.newBuilder() to construct. + private BindingSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BindingSummary() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BindingSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BindingSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BindingSummary.class, + com.google.cloud.backupdr.v1beta.BindingSummary.Builder.class); + } + + public static final int PROJECT_COUNT_FIELD_NUMBER = 1; + private long projectCount_ = 0L; + + /** + * + * + *
+   * Output only. Total count of Projects protected with this policy.
+   * 
+ * + * int64 project_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectCount. + */ + @java.lang.Override + public long getProjectCount() { + return projectCount_; + } + + 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 (projectCount_ != 0L) { + output.writeInt64(1, projectCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (projectCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, projectCount_); + } + 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.backupdr.v1beta.BindingSummary)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.BindingSummary other = + (com.google.cloud.backupdr.v1beta.BindingSummary) obj; + + if (getProjectCount() != other.getProjectCount()) 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) + PROJECT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProjectCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary 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.backupdr.v1beta.BindingSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary 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.backupdr.v1beta.BindingSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BindingSummary 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BindingSummary contains count of different containers covered through this
+   * policy.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.BindingSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.BindingSummary) + com.google.cloud.backupdr.v1beta.BindingSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BindingSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BindingSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.BindingSummary.class, + com.google.cloud.backupdr.v1beta.BindingSummary.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.BindingSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_BindingSummary_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingSummary getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.BindingSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingSummary build() { + com.google.cloud.backupdr.v1beta.BindingSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingSummary buildPartial() { + com.google.cloud.backupdr.v1beta.BindingSummary result = + new com.google.cloud.backupdr.v1beta.BindingSummary(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.BindingSummary result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectCount_ = projectCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.BindingSummary) { + return mergeFrom((com.google.cloud.backupdr.v1beta.BindingSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.BindingSummary other) { + if (other == com.google.cloud.backupdr.v1beta.BindingSummary.getDefaultInstance()) + return this; + if (other.getProjectCount() != 0L) { + setProjectCount(other.getProjectCount()); + } + 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 8: + { + projectCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 long projectCount_; + + /** + * + * + *
+     * Output only. Total count of Projects protected with this policy.
+     * 
+ * + * int64 project_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectCount. + */ + @java.lang.Override + public long getProjectCount() { + return projectCount_; + } + + /** + * + * + *
+     * Output only. Total count of Projects protected with this policy.
+     * 
+ * + * int64 project_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The projectCount to set. + * @return This builder for chaining. + */ + public Builder setProjectCount(long value) { + + projectCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Total count of Projects protected with this policy.
+     * 
+ * + * int64 project_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProjectCount() { + bitField0_ = (bitField0_ & ~0x00000001); + projectCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.BindingSummary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.BindingSummary) + private static final com.google.cloud.backupdr.v1beta.BindingSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.BindingSummary(); + } + + public static com.google.cloud.backupdr.v1beta.BindingSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BindingSummary 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.backupdr.v1beta.BindingSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingSummaryOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingSummaryOrBuilder.java new file mode 100644 index 000000000000..83c4fb7fd5e3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/BindingSummaryOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface BindingSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.BindingSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Total count of Projects protected with this policy.
+   * 
+ * + * int64 project_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The projectCount. + */ + long getProjectCount(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPlanAssociationProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPlanAssociationProperties.java new file mode 100644 index 000000000000..c042f1870868 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPlanAssociationProperties.java @@ -0,0 +1,765 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Cloud SQL instance's BPA properties.
+ * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties} + */ +@com.google.protobuf.Generated +public final class CloudSqlInstanceBackupPlanAssociationProperties + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CloudSqlInstanceBackupPlanAssociationProperties"); + } + + // Use CloudSqlInstanceBackupPlanAssociationProperties.newBuilder() to construct. + private CloudSqlInstanceBackupPlanAssociationProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CloudSqlInstanceBackupPlanAssociationProperties() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupPlanAssociationProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupPlanAssociationProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.Builder + .class); + } + + private int bitField0_; + public static final int INSTANCE_CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp instanceCreateTime_; + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + @java.lang.Override + public boolean hasInstanceCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstanceCreateTime() { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder() { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInstanceCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInstanceCreateTime()); + } + 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.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties other = + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) obj; + + if (hasInstanceCreateTime() != other.hasInstanceCreateTime()) return false; + if (hasInstanceCreateTime()) { + if (!getInstanceCreateTime().equals(other.getInstanceCreateTime())) 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 (hasInstanceCreateTime()) { + hash = (37 * hash) + INSTANCE_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceCreateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + 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.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + 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.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Cloud SQL instance's BPA properties.
+   * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupPlanAssociationProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupPlanAssociationProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instanceCreateTime_ = null; + if (instanceCreateTimeBuilder_ != null) { + instanceCreateTimeBuilder_.dispose(); + instanceCreateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupPlanAssociationProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + build() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + buildPartial() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties result = + new com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instanceCreateTime_ = + instanceCreateTimeBuilder_ == null + ? instanceCreateTime_ + : instanceCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + .getDefaultInstance()) return this; + if (other.hasInstanceCreateTime()) { + mergeInstanceCreateTime(other.getInstanceCreateTime()); + } + 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( + internalGetInstanceCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + 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 com.google.protobuf.Timestamp instanceCreateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + instanceCreateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + public boolean hasInstanceCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + public com.google.protobuf.Timestamp getInstanceCreateTime() { + if (instanceCreateTimeBuilder_ == null) { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } else { + return instanceCreateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceCreateTime(com.google.protobuf.Timestamp value) { + if (instanceCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceCreateTime_ = value; + } else { + instanceCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (instanceCreateTimeBuilder_ == null) { + instanceCreateTime_ = builderForValue.build(); + } else { + instanceCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeInstanceCreateTime(com.google.protobuf.Timestamp value) { + if (instanceCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && instanceCreateTime_ != null + && instanceCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstanceCreateTimeBuilder().mergeFrom(value); + } else { + instanceCreateTime_ = value; + } + } else { + instanceCreateTimeBuilder_.mergeFrom(value); + } + if (instanceCreateTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInstanceCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + instanceCreateTime_ = null; + if (instanceCreateTimeBuilder_ != null) { + instanceCreateTimeBuilder_.dispose(); + instanceCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getInstanceCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetInstanceCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder() { + if (instanceCreateTimeBuilder_ != null) { + return instanceCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetInstanceCreateTimeFieldBuilder() { + if (instanceCreateTimeBuilder_ == null) { + instanceCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstanceCreateTime(), getParentForChildren(), isClean()); + instanceCreateTime_ = null; + } + return instanceCreateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + private static final com.google.cloud.backupdr.v1beta + .CloudSqlInstanceBackupPlanAssociationProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties(); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser< + CloudSqlInstanceBackupPlanAssociationProperties>() { + @java.lang.Override + public CloudSqlInstanceBackupPlanAssociationProperties 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.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder.java new file mode 100644 index 000000000000..588832b1ce6d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder.java @@ -0,0 +1,71 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CloudSqlInstanceBackupPlanAssociationPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPlanAssociationProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + boolean hasInstanceCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + com.google.protobuf.Timestamp getInstanceCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupProperties.java new file mode 100644 index 000000000000..8805bc8c29ab --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupProperties.java @@ -0,0 +1,1760 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * CloudSqlInstanceBackupProperties represents Cloud SQL Instance
+ * Backup properties.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties} + */ +@com.google.protobuf.Generated +public final class CloudSqlInstanceBackupProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + CloudSqlInstanceBackupPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CloudSqlInstanceBackupProperties"); + } + + // Use CloudSqlInstanceBackupProperties.newBuilder() to construct. + private CloudSqlInstanceBackupProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CloudSqlInstanceBackupProperties() { + databaseInstalledVersion_ = ""; + sourceInstance_ = ""; + instanceTier_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.Builder.class); + } + + private int bitField0_; + public static final int DATABASE_INSTALLED_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseInstalledVersion_ = ""; + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance
+   * when the backup was taken.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + @java.lang.Override + public java.lang.String getDatabaseInstalledVersion() { + java.lang.Object ref = databaseInstalledVersion_; + 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(); + databaseInstalledVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance
+   * when the backup was taken.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseInstalledVersionBytes() { + java.lang.Object ref = databaseInstalledVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseInstalledVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FINAL_BACKUP_FIELD_NUMBER = 3; + private boolean finalBackup_ = false; + + /** + * + * + *
+   * Output only. Whether the backup is a final backup.
+   * 
+ * + * bool final_backup = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The finalBackup. + */ + @java.lang.Override + public boolean getFinalBackup() { + return finalBackup_; + } + + public static final int SOURCE_INSTANCE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceInstance_ = ""; + + /** + * + * + *
+   * Output only. The source instance of the backup.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceInstance. + */ + @java.lang.Override + public java.lang.String getSourceInstance() { + java.lang.Object ref = sourceInstance_; + 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(); + sourceInstance_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The source instance of the backup.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceInstanceBytes() { + java.lang.Object ref = sourceInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp instanceCreateTime_; + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + @java.lang.Override + public boolean hasInstanceCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstanceCreateTime() { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder() { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + + public static final int INSTANCE_TIER_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceTier_ = ""; + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + @java.lang.Override + public java.lang.String getInstanceTier() { + java.lang.Object ref = instanceTier_; + 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(); + instanceTier_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceTierBytes() { + java.lang.Object ref = instanceTier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceTier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_DELETE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp instanceDeleteTime_; + + /** + * + * + *
+   * Output only. The instance delete timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceDeleteTime field is set. + */ + @java.lang.Override + public boolean hasInstanceDeleteTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The instance delete timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceDeleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstanceDeleteTime() { + return instanceDeleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceDeleteTime_; + } + + /** + * + * + *
+   * Output only. The instance delete timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstanceDeleteTimeOrBuilder() { + return instanceDeleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceDeleteTime_; + } + + 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.GeneratedMessage.isStringEmpty(databaseInstalledVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, databaseInstalledVersion_); + } + if (finalBackup_ != false) { + output.writeBool(3, finalBackup_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceInstance_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, sourceInstance_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getInstanceCreateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceTier_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, instanceTier_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getInstanceDeleteTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseInstalledVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, databaseInstalledVersion_); + } + if (finalBackup_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, finalBackup_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceInstance_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, sourceInstance_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getInstanceCreateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceTier_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, instanceTier_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getInstanceDeleteTime()); + } + 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.backupdr.v1beta.CloudSqlInstanceBackupProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties other = + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) obj; + + if (!getDatabaseInstalledVersion().equals(other.getDatabaseInstalledVersion())) return false; + if (getFinalBackup() != other.getFinalBackup()) return false; + if (!getSourceInstance().equals(other.getSourceInstance())) return false; + if (hasInstanceCreateTime() != other.hasInstanceCreateTime()) return false; + if (hasInstanceCreateTime()) { + if (!getInstanceCreateTime().equals(other.getInstanceCreateTime())) return false; + } + if (!getInstanceTier().equals(other.getInstanceTier())) return false; + if (hasInstanceDeleteTime() != other.hasInstanceDeleteTime()) return false; + if (hasInstanceDeleteTime()) { + if (!getInstanceDeleteTime().equals(other.getInstanceDeleteTime())) 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) + DATABASE_INSTALLED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseInstalledVersion().hashCode(); + hash = (37 * hash) + FINAL_BACKUP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFinalBackup()); + hash = (37 * hash) + SOURCE_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getSourceInstance().hashCode(); + if (hasInstanceCreateTime()) { + hash = (37 * hash) + INSTANCE_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceCreateTime().hashCode(); + } + hash = (37 * hash) + INSTANCE_TIER_FIELD_NUMBER; + hash = (53 * hash) + getInstanceTier().hashCode(); + if (hasInstanceDeleteTime()) { + hash = (37 * hash) + INSTANCE_DELETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceDeleteTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties 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.backupdr.v1beta.CloudSqlInstanceBackupProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties 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.backupdr.v1beta.CloudSqlInstanceBackupProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CloudSqlInstanceBackupProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * CloudSqlInstanceBackupProperties represents Cloud SQL Instance
+   * Backup properties.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceCreateTimeFieldBuilder(); + internalGetInstanceDeleteTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + databaseInstalledVersion_ = ""; + finalBackup_ = false; + sourceInstance_ = ""; + instanceCreateTime_ = null; + if (instanceCreateTimeBuilder_ != null) { + instanceCreateTimeBuilder_.dispose(); + instanceCreateTimeBuilder_ = null; + } + instanceTier_ = ""; + instanceDeleteTime_ = null; + if (instanceDeleteTimeBuilder_ != null) { + instanceDeleteTimeBuilder_.dispose(); + instanceDeleteTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceBackupProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties build() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties buildPartial() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties result = + new com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.databaseInstalledVersion_ = databaseInstalledVersion_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.finalBackup_ = finalBackup_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sourceInstance_ = sourceInstance_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.instanceCreateTime_ = + instanceCreateTimeBuilder_ == null + ? instanceCreateTime_ + : instanceCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.instanceTier_ = instanceTier_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.instanceDeleteTime_ = + instanceDeleteTimeBuilder_ == null + ? instanceDeleteTime_ + : instanceDeleteTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties.getDefaultInstance()) + return this; + if (!other.getDatabaseInstalledVersion().isEmpty()) { + databaseInstalledVersion_ = other.databaseInstalledVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getFinalBackup() != false) { + setFinalBackup(other.getFinalBackup()); + } + if (!other.getSourceInstance().isEmpty()) { + sourceInstance_ = other.sourceInstance_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasInstanceCreateTime()) { + mergeInstanceCreateTime(other.getInstanceCreateTime()); + } + if (!other.getInstanceTier().isEmpty()) { + instanceTier_ = other.instanceTier_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasInstanceDeleteTime()) { + mergeInstanceDeleteTime(other.getInstanceDeleteTime()); + } + 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 18: + { + databaseInstalledVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 24: + { + finalBackup_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + sourceInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetInstanceCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + instanceTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 66: + { + input.readMessage( + internalGetInstanceDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 + 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 databaseInstalledVersion_ = ""; + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance
+     * when the backup was taken.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + public java.lang.String getDatabaseInstalledVersion() { + java.lang.Object ref = databaseInstalledVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseInstalledVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance
+     * when the backup was taken.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + public com.google.protobuf.ByteString getDatabaseInstalledVersionBytes() { + java.lang.Object ref = databaseInstalledVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseInstalledVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance
+     * when the backup was taken.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The databaseInstalledVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseInstalledVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseInstalledVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance
+     * when the backup was taken.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDatabaseInstalledVersion() { + databaseInstalledVersion_ = getDefaultInstance().getDatabaseInstalledVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance
+     * when the backup was taken.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for databaseInstalledVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseInstalledVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseInstalledVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean finalBackup_; + + /** + * + * + *
+     * Output only. Whether the backup is a final backup.
+     * 
+ * + * bool final_backup = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The finalBackup. + */ + @java.lang.Override + public boolean getFinalBackup() { + return finalBackup_; + } + + /** + * + * + *
+     * Output only. Whether the backup is a final backup.
+     * 
+ * + * bool final_backup = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The finalBackup to set. + * @return This builder for chaining. + */ + public Builder setFinalBackup(boolean value) { + + finalBackup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Whether the backup is a final backup.
+     * 
+ * + * bool final_backup = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFinalBackup() { + bitField0_ = (bitField0_ & ~0x00000002); + finalBackup_ = false; + onChanged(); + return this; + } + + private java.lang.Object sourceInstance_ = ""; + + /** + * + * + *
+     * Output only. The source instance of the backup.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceInstance. + */ + public java.lang.String getSourceInstance() { + java.lang.Object ref = sourceInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The source instance of the backup.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceInstance. + */ + public com.google.protobuf.ByteString getSourceInstanceBytes() { + java.lang.Object ref = sourceInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The source instance of the backup.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The sourceInstance to set. + * @return This builder for chaining. + */ + public Builder setSourceInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceInstance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The source instance of the backup.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSourceInstance() { + sourceInstance_ = getDefaultInstance().getSourceInstance(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The source instance of the backup.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for sourceInstance to set. + * @return This builder for chaining. + */ + public Builder setSourceInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceInstance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp instanceCreateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + instanceCreateTimeBuilder_; + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + public boolean hasInstanceCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + public com.google.protobuf.Timestamp getInstanceCreateTime() { + if (instanceCreateTimeBuilder_ == null) { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } else { + return instanceCreateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceCreateTime(com.google.protobuf.Timestamp value) { + if (instanceCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceCreateTime_ = value; + } else { + instanceCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (instanceCreateTimeBuilder_ == null) { + instanceCreateTime_ = builderForValue.build(); + } else { + instanceCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeInstanceCreateTime(com.google.protobuf.Timestamp value) { + if (instanceCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && instanceCreateTime_ != null + && instanceCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstanceCreateTimeBuilder().mergeFrom(value); + } else { + instanceCreateTime_ = value; + } + } else { + instanceCreateTimeBuilder_.mergeFrom(value); + } + if (instanceCreateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInstanceCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + instanceCreateTime_ = null; + if (instanceCreateTimeBuilder_ != null) { + instanceCreateTimeBuilder_.dispose(); + instanceCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getInstanceCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetInstanceCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder() { + if (instanceCreateTimeBuilder_ != null) { + return instanceCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetInstanceCreateTimeFieldBuilder() { + if (instanceCreateTimeBuilder_ == null) { + instanceCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstanceCreateTime(), getParentForChildren(), isClean()); + instanceCreateTime_ = null; + } + return instanceCreateTimeBuilder_; + } + + private java.lang.Object instanceTier_ = ""; + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + public java.lang.String getInstanceTier() { + java.lang.Object ref = instanceTier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceTier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + public com.google.protobuf.ByteString getInstanceTierBytes() { + java.lang.Object ref = instanceTier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceTier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The instanceTier to set. + * @return This builder for chaining. + */ + public Builder setInstanceTier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceTier_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceTier() { + instanceTier_ = getDefaultInstance().getInstanceTier(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for instanceTier to set. + * @return This builder for chaining. + */ + public Builder setInstanceTierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceTier_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp instanceDeleteTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + instanceDeleteTimeBuilder_; + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceDeleteTime field is set. + */ + public boolean hasInstanceDeleteTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceDeleteTime. + */ + public com.google.protobuf.Timestamp getInstanceDeleteTime() { + if (instanceDeleteTimeBuilder_ == null) { + return instanceDeleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceDeleteTime_; + } else { + return instanceDeleteTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceDeleteTime(com.google.protobuf.Timestamp value) { + if (instanceDeleteTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceDeleteTime_ = value; + } else { + instanceDeleteTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (instanceDeleteTimeBuilder_ == null) { + instanceDeleteTime_ = builderForValue.build(); + } else { + instanceDeleteTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeInstanceDeleteTime(com.google.protobuf.Timestamp value) { + if (instanceDeleteTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && instanceDeleteTime_ != null + && instanceDeleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstanceDeleteTimeBuilder().mergeFrom(value); + } else { + instanceDeleteTime_ = value; + } + } else { + instanceDeleteTimeBuilder_.mergeFrom(value); + } + if (instanceDeleteTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInstanceDeleteTime() { + bitField0_ = (bitField0_ & ~0x00000020); + instanceDeleteTime_ = null; + if (instanceDeleteTimeBuilder_ != null) { + instanceDeleteTimeBuilder_.dispose(); + instanceDeleteTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getInstanceDeleteTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetInstanceDeleteTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getInstanceDeleteTimeOrBuilder() { + if (instanceDeleteTimeBuilder_ != null) { + return instanceDeleteTimeBuilder_.getMessageOrBuilder(); + } else { + return instanceDeleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceDeleteTime_; + } + } + + /** + * + * + *
+     * Output only. The instance delete timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetInstanceDeleteTimeFieldBuilder() { + if (instanceDeleteTimeBuilder_ == null) { + instanceDeleteTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstanceDeleteTime(), getParentForChildren(), isClean()); + instanceDeleteTime_ = null; + } + return instanceDeleteTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + private static final com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties(); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSqlInstanceBackupProperties 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.backupdr.v1beta.CloudSqlInstanceBackupProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPropertiesOrBuilder.java new file mode 100644 index 000000000000..a71db7f60980 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceBackupPropertiesOrBuilder.java @@ -0,0 +1,219 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CloudSqlInstanceBackupPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CloudSqlInstanceBackupProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance
+   * when the backup was taken.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + java.lang.String getDatabaseInstalledVersion(); + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance
+   * when the backup was taken.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + com.google.protobuf.ByteString getDatabaseInstalledVersionBytes(); + + /** + * + * + *
+   * Output only. Whether the backup is a final backup.
+   * 
+ * + * bool final_backup = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The finalBackup. + */ + boolean getFinalBackup(); + + /** + * + * + *
+   * Output only. The source instance of the backup.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceInstance. + */ + java.lang.String getSourceInstance(); + + /** + * + * + *
+   * Output only. The source instance of the backup.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string source_instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceInstance. + */ + com.google.protobuf.ByteString getSourceInstanceBytes(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + boolean hasInstanceCreateTime(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + com.google.protobuf.Timestamp getInstanceCreateTime(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + java.lang.String getInstanceTier(); + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + com.google.protobuf.ByteString getInstanceTierBytes(); + + /** + * + * + *
+   * Output only. The instance delete timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceDeleteTime field is set. + */ + boolean hasInstanceDeleteTime(); + + /** + * + * + *
+   * Output only. The instance delete timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceDeleteTime. + */ + com.google.protobuf.Timestamp getInstanceDeleteTime(); + + /** + * + * + *
+   * Output only. The instance delete timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getInstanceDeleteTimeOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceProperties.java new file mode 100644 index 000000000000..97ca4fa1d5b2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceProperties.java @@ -0,0 +1,1350 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * CloudSqlInstanceDataSourceProperties represents the properties of a
+ * Cloud SQL resource that are stored in the DataSource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties} + */ +@com.google.protobuf.Generated +public final class CloudSqlInstanceDataSourceProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + CloudSqlInstanceDataSourcePropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CloudSqlInstanceDataSourceProperties"); + } + + // Use CloudSqlInstanceDataSourceProperties.newBuilder() to construct. + private CloudSqlInstanceDataSourceProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CloudSqlInstanceDataSourceProperties() { + name_ = ""; + databaseInstalledVersion_ = ""; + instanceTier_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Name of the Cloud SQL instance backed up by the datasource.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Name of the Cloud SQL instance backed up by the datasource.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + public static final int DATABASE_INSTALLED_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseInstalledVersion_ = ""; + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + @java.lang.Override + public java.lang.String getDatabaseInstalledVersion() { + java.lang.Object ref = databaseInstalledVersion_; + 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(); + databaseInstalledVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseInstalledVersionBytes() { + java.lang.Object ref = databaseInstalledVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseInstalledVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp instanceCreateTime_; + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + @java.lang.Override + public boolean hasInstanceCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstanceCreateTime() { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder() { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + + public static final int INSTANCE_TIER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceTier_ = ""; + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + @java.lang.Override + public java.lang.String getInstanceTier() { + java.lang.Object ref = instanceTier_; + 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(); + instanceTier_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceTierBytes() { + java.lang.Object ref = instanceTier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceTier_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseInstalledVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, databaseInstalledVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getInstanceCreateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceTier_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, instanceTier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseInstalledVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, databaseInstalledVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstanceCreateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceTier_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, instanceTier_); + } + 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.backupdr.v1beta.CloudSqlInstanceDataSourceProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties other = + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDatabaseInstalledVersion().equals(other.getDatabaseInstalledVersion())) return false; + if (hasInstanceCreateTime() != other.hasInstanceCreateTime()) return false; + if (hasInstanceCreateTime()) { + if (!getInstanceCreateTime().equals(other.getInstanceCreateTime())) return false; + } + if (!getInstanceTier().equals(other.getInstanceTier())) 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) + DATABASE_INSTALLED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseInstalledVersion().hashCode(); + if (hasInstanceCreateTime()) { + hash = (37 * hash) + INSTANCE_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceCreateTime().hashCode(); + } + hash = (37 * hash) + INSTANCE_TIER_FIELD_NUMBER; + hash = (53 * hash) + getInstanceTier().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties 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.backupdr.v1beta.CloudSqlInstanceDataSourceProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties 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.backupdr.v1beta.CloudSqlInstanceDataSourceProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CloudSqlInstanceDataSourceProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * CloudSqlInstanceDataSourceProperties represents the properties of a
+   * Cloud SQL resource that are stored in the DataSource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourcePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + databaseInstalledVersion_ = ""; + instanceCreateTime_ = null; + if (instanceCreateTimeBuilder_ != null) { + instanceCreateTimeBuilder_.dispose(); + instanceCreateTimeBuilder_ = null; + } + instanceTier_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties build() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties buildPartial() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties result = + new com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.databaseInstalledVersion_ = databaseInstalledVersion_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.instanceCreateTime_ = + instanceCreateTimeBuilder_ == null + ? instanceCreateTime_ + : instanceCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.instanceTier_ = instanceTier_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatabaseInstalledVersion().isEmpty()) { + databaseInstalledVersion_ = other.databaseInstalledVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInstanceCreateTime()) { + mergeInstanceCreateTime(other.getInstanceCreateTime()); + } + if (!other.getInstanceTier().isEmpty()) { + instanceTier_ = other.instanceTier_; + bitField0_ |= 0x00000008; + 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 + case 18: + { + databaseInstalledVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetInstanceCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + instanceTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + 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_ = ""; + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + private java.lang.Object databaseInstalledVersion_ = ""; + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + public java.lang.String getDatabaseInstalledVersion() { + java.lang.Object ref = databaseInstalledVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseInstalledVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + public com.google.protobuf.ByteString getDatabaseInstalledVersionBytes() { + java.lang.Object ref = databaseInstalledVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseInstalledVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The databaseInstalledVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseInstalledVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseInstalledVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDatabaseInstalledVersion() { + databaseInstalledVersion_ = getDefaultInstance().getDatabaseInstalledVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for databaseInstalledVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseInstalledVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseInstalledVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp instanceCreateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + instanceCreateTimeBuilder_; + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + public boolean hasInstanceCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + public com.google.protobuf.Timestamp getInstanceCreateTime() { + if (instanceCreateTimeBuilder_ == null) { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } else { + return instanceCreateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceCreateTime(com.google.protobuf.Timestamp value) { + if (instanceCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceCreateTime_ = value; + } else { + instanceCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (instanceCreateTimeBuilder_ == null) { + instanceCreateTime_ = builderForValue.build(); + } else { + instanceCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeInstanceCreateTime(com.google.protobuf.Timestamp value) { + if (instanceCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && instanceCreateTime_ != null + && instanceCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstanceCreateTimeBuilder().mergeFrom(value); + } else { + instanceCreateTime_ = value; + } + } else { + instanceCreateTimeBuilder_.mergeFrom(value); + } + if (instanceCreateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInstanceCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + instanceCreateTime_ = null; + if (instanceCreateTimeBuilder_ != null) { + instanceCreateTimeBuilder_.dispose(); + instanceCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getInstanceCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetInstanceCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder() { + if (instanceCreateTimeBuilder_ != null) { + return instanceCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetInstanceCreateTimeFieldBuilder() { + if (instanceCreateTimeBuilder_ == null) { + instanceCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstanceCreateTime(), getParentForChildren(), isClean()); + instanceCreateTime_ = null; + } + return instanceCreateTimeBuilder_; + } + + private java.lang.Object instanceTier_ = ""; + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + public java.lang.String getInstanceTier() { + java.lang.Object ref = instanceTier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceTier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + public com.google.protobuf.ByteString getInstanceTierBytes() { + java.lang.Object ref = instanceTier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceTier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The instanceTier to set. + * @return This builder for chaining. + */ + public Builder setInstanceTier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceTier_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceTier() { + instanceTier_ = getDefaultInstance().getInstanceTier(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for instanceTier to set. + * @return This builder for chaining. + */ + public Builder setInstanceTierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceTier_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + private static final com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties(); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSqlInstanceDataSourceProperties 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.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourcePropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourcePropertiesOrBuilder.java new file mode 100644 index 000000000000..76a9f35814a8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourcePropertiesOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CloudSqlInstanceDataSourcePropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the Cloud SQL instance backed up by the datasource.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Name of the Cloud SQL instance backed up by the datasource.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + java.lang.String getDatabaseInstalledVersion(); + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + com.google.protobuf.ByteString getDatabaseInstalledVersionBytes(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + boolean hasInstanceCreateTime(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + com.google.protobuf.Timestamp getInstanceCreateTime(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + java.lang.String getInstanceTier(); + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + com.google.protobuf.ByteString getInstanceTierBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceReferenceProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceReferenceProperties.java new file mode 100644 index 000000000000..4faa6e6c1c7a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceReferenceProperties.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * CloudSqlInstanceDataSourceReferenceProperties represents the properties of a
+ * Cloud SQL resource that are stored in the DataSourceReference.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties} + */ +@com.google.protobuf.Generated +public final class CloudSqlInstanceDataSourceReferenceProperties + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + CloudSqlInstanceDataSourceReferencePropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CloudSqlInstanceDataSourceReferenceProperties"); + } + + // Use CloudSqlInstanceDataSourceReferenceProperties.newBuilder() to construct. + private CloudSqlInstanceDataSourceReferenceProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CloudSqlInstanceDataSourceReferenceProperties() { + name_ = ""; + databaseInstalledVersion_ = ""; + instanceTier_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceReferenceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceReferenceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.Builder + .class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Name of the Cloud SQL instance backed up by the datasource.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Name of the Cloud SQL instance backed up by the datasource.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + public static final int DATABASE_INSTALLED_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object databaseInstalledVersion_ = ""; + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + @java.lang.Override + public java.lang.String getDatabaseInstalledVersion() { + java.lang.Object ref = databaseInstalledVersion_; + 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(); + databaseInstalledVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseInstalledVersionBytes() { + java.lang.Object ref = databaseInstalledVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseInstalledVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp instanceCreateTime_; + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + @java.lang.Override + public boolean hasInstanceCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getInstanceCreateTime() { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder() { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + + public static final int INSTANCE_TIER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceTier_ = ""; + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + @java.lang.Override + public java.lang.String getInstanceTier() { + java.lang.Object ref = instanceTier_; + 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(); + instanceTier_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceTierBytes() { + java.lang.Object ref = instanceTier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceTier_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseInstalledVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, databaseInstalledVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getInstanceCreateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceTier_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, instanceTier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(databaseInstalledVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, databaseInstalledVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInstanceCreateTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceTier_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, instanceTier_); + } + 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.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties other = + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDatabaseInstalledVersion().equals(other.getDatabaseInstalledVersion())) return false; + if (hasInstanceCreateTime() != other.hasInstanceCreateTime()) return false; + if (hasInstanceCreateTime()) { + if (!getInstanceCreateTime().equals(other.getInstanceCreateTime())) return false; + } + if (!getInstanceTier().equals(other.getInstanceTier())) 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) + DATABASE_INSTALLED_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseInstalledVersion().hashCode(); + if (hasInstanceCreateTime()) { + hash = (37 * hash) + INSTANCE_CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceCreateTime().hashCode(); + } + hash = (37 * hash) + INSTANCE_TIER_FIELD_NUMBER; + hash = (53 * hash) + getInstanceTier().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + 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.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + 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.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * CloudSqlInstanceDataSourceReferenceProperties represents the properties of a
+   * Cloud SQL resource that are stored in the DataSourceReference.
+   * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferencePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceReferenceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceReferenceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.Builder + .class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetInstanceCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + databaseInstalledVersion_ = ""; + instanceCreateTime_ = null; + if (instanceCreateTimeBuilder_ != null) { + instanceCreateTimeBuilder_.dispose(); + instanceCreateTimeBuilder_ = null; + } + instanceTier_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceDataSourceReferenceProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties build() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + buildPartial() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties result = + new com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.databaseInstalledVersion_ = databaseInstalledVersion_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.instanceCreateTime_ = + instanceCreateTimeBuilder_ == null + ? instanceCreateTime_ + : instanceCreateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.instanceTier_ = instanceTier_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatabaseInstalledVersion().isEmpty()) { + databaseInstalledVersion_ = other.databaseInstalledVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInstanceCreateTime()) { + mergeInstanceCreateTime(other.getInstanceCreateTime()); + } + if (!other.getInstanceTier().isEmpty()) { + instanceTier_ = other.instanceTier_; + bitField0_ |= 0x00000008; + 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 + case 18: + { + databaseInstalledVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetInstanceCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + instanceTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + 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_ = ""; + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the Cloud SQL instance backed up by the datasource.
+     * Format:
+     * projects/{project}/instances/{instance}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + private java.lang.Object databaseInstalledVersion_ = ""; + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + public java.lang.String getDatabaseInstalledVersion() { + java.lang.Object ref = databaseInstalledVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + databaseInstalledVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + public com.google.protobuf.ByteString getDatabaseInstalledVersionBytes() { + java.lang.Object ref = databaseInstalledVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + databaseInstalledVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The databaseInstalledVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseInstalledVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + databaseInstalledVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDatabaseInstalledVersion() { + databaseInstalledVersion_ = getDefaultInstance().getDatabaseInstalledVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The installed database version of the Cloud SQL instance.
+     * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for databaseInstalledVersion to set. + * @return This builder for chaining. + */ + public Builder setDatabaseInstalledVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseInstalledVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp instanceCreateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + instanceCreateTimeBuilder_; + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + public boolean hasInstanceCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + public com.google.protobuf.Timestamp getInstanceCreateTime() { + if (instanceCreateTimeBuilder_ == null) { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } else { + return instanceCreateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceCreateTime(com.google.protobuf.Timestamp value) { + if (instanceCreateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceCreateTime_ = value; + } else { + instanceCreateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setInstanceCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (instanceCreateTimeBuilder_ == null) { + instanceCreateTime_ = builderForValue.build(); + } else { + instanceCreateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeInstanceCreateTime(com.google.protobuf.Timestamp value) { + if (instanceCreateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && instanceCreateTime_ != null + && instanceCreateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getInstanceCreateTimeBuilder().mergeFrom(value); + } else { + instanceCreateTime_ = value; + } + } else { + instanceCreateTimeBuilder_.mergeFrom(value); + } + if (instanceCreateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearInstanceCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + instanceCreateTime_ = null; + if (instanceCreateTimeBuilder_ != null) { + instanceCreateTimeBuilder_.dispose(); + instanceCreateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getInstanceCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetInstanceCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder() { + if (instanceCreateTimeBuilder_ != null) { + return instanceCreateTimeBuilder_.getMessageOrBuilder(); + } else { + return instanceCreateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : instanceCreateTime_; + } + } + + /** + * + * + *
+     * Output only. The instance creation timestamp.
+     * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetInstanceCreateTimeFieldBuilder() { + if (instanceCreateTimeBuilder_ == null) { + instanceCreateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getInstanceCreateTime(), getParentForChildren(), isClean()); + instanceCreateTime_ = null; + } + return instanceCreateTimeBuilder_; + } + + private java.lang.Object instanceTier_ = ""; + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + public java.lang.String getInstanceTier() { + java.lang.Object ref = instanceTier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceTier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + public com.google.protobuf.ByteString getInstanceTierBytes() { + java.lang.Object ref = instanceTier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceTier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The instanceTier to set. + * @return This builder for chaining. + */ + public Builder setInstanceTier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceTier_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceTier() { + instanceTier_ = getDefaultInstance().getInstanceTier(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The tier (or machine type) for this instance. Example:
+     * `db-custom-1-3840`
+     * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for instanceTier to set. + * @return This builder for chaining. + */ + public Builder setInstanceTierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceTier_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + private static final com.google.cloud.backupdr.v1beta + .CloudSqlInstanceDataSourceReferenceProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties(); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSqlInstanceDataSourceReferenceProperties 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.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceReferencePropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceReferencePropertiesOrBuilder.java new file mode 100644 index 000000000000..338566682609 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceDataSourceReferencePropertiesOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CloudSqlInstanceDataSourceReferencePropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the Cloud SQL instance backed up by the datasource.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Name of the Cloud SQL instance backed up by the datasource.
+   * Format:
+   * projects/{project}/instances/{instance}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The databaseInstalledVersion. + */ + java.lang.String getDatabaseInstalledVersion(); + + /** + * + * + *
+   * Output only. The installed database version of the Cloud SQL instance.
+   * 
+ * + * string database_installed_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for databaseInstalledVersion. + */ + com.google.protobuf.ByteString getDatabaseInstalledVersionBytes(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the instanceCreateTime field is set. + */ + boolean hasInstanceCreateTime(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The instanceCreateTime. + */ + com.google.protobuf.Timestamp getInstanceCreateTime(); + + /** + * + * + *
+   * Output only. The instance creation timestamp.
+   * 
+ * + * + * .google.protobuf.Timestamp instance_create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getInstanceCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The instanceTier. + */ + java.lang.String getInstanceTier(); + + /** + * + * + *
+   * Output only. The tier (or machine type) for this instance. Example:
+   * `db-custom-1-3840`
+   * 
+ * + * string instance_tier = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for instanceTier. + */ + com.google.protobuf.ByteString getInstanceTierBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceInitializationConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceInitializationConfig.java new file mode 100644 index 000000000000..b6152879982e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceInitializationConfig.java @@ -0,0 +1,779 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * CloudSqlInstanceInitializationConfig contains the configuration for
+ * initializing a Cloud SQL instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig} + */ +@com.google.protobuf.Generated +public final class CloudSqlInstanceInitializationConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + CloudSqlInstanceInitializationConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CloudSqlInstanceInitializationConfig"); + } + + // Use CloudSqlInstanceInitializationConfig.newBuilder() to construct. + private CloudSqlInstanceInitializationConfig( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CloudSqlInstanceInitializationConfig() { + edition_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceInitializationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceInitializationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Builder.class); + } + + /** + * + * + *
+   * The edition of the Cloud SQL instance. For details, see
+   * https://cloud.google.com/sql/docs/editions-intro.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition} + */ + public enum Edition implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified edition.
+     * 
+ * + * EDITION_UNSPECIFIED = 0; + */ + EDITION_UNSPECIFIED(0), + /** + * + * + *
+     * Enterprise edition.
+     * 
+ * + * ENTERPRISE = 1; + */ + ENTERPRISE(1), + /** + * + * + *
+     * Enterprise Plus edition.
+     * 
+ * + * ENTERPRISE_PLUS = 2; + */ + ENTERPRISE_PLUS(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Edition"); + } + + /** + * + * + *
+     * Unspecified edition.
+     * 
+ * + * EDITION_UNSPECIFIED = 0; + */ + public static final int EDITION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Enterprise edition.
+     * 
+ * + * ENTERPRISE = 1; + */ + public static final int ENTERPRISE_VALUE = 1; + + /** + * + * + *
+     * Enterprise Plus edition.
+     * 
+ * + * ENTERPRISE_PLUS = 2; + */ + public static final int ENTERPRISE_PLUS_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 Edition 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 Edition forNumber(int value) { + switch (value) { + case 0: + return EDITION_UNSPECIFIED; + case 1: + return ENTERPRISE; + case 2: + return ENTERPRISE_PLUS; + 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 Edition findValueByNumber(int number) { + return Edition.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Edition[] VALUES = values(); + + public static Edition 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 Edition(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition) + } + + public static final int EDITION_FIELD_NUMBER = 1; + private int edition_ = 0; + + /** + * + * + *
+   * Required. The edition of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for edition. + */ + @java.lang.Override + public int getEditionValue() { + return edition_; + } + + /** + * + * + *
+   * Required. The edition of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The edition. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition + getEdition() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition result = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition.forNumber( + edition_); + return result == null + ? com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition.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 (edition_ + != com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition + .EDITION_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, edition_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (edition_ + != com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition + .EDITION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, edition_); + } + 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.backupdr.v1beta.CloudSqlInstanceInitializationConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig other = + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) obj; + + if (edition_ != other.edition_) 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) + EDITION_FIELD_NUMBER; + hash = (53 * hash) + edition_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig 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.backupdr.v1beta.CloudSqlInstanceInitializationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig 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.backupdr.v1beta.CloudSqlInstanceInitializationConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CloudSqlInstanceInitializationConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * CloudSqlInstanceInitializationConfig contains the configuration for
+   * initializing a Cloud SQL instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceInitializationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceInitializationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.class, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + edition_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultCloudSqlProto + .internal_static_google_cloud_backupdr_v1beta_CloudSqlInstanceInitializationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig build() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig buildPartial() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig result = + new com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.edition_ = edition_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig other) { + if (other + == com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance()) return this; + if (other.edition_ != 0) { + setEditionValue(other.getEditionValue()); + } + 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 8: + { + edition_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 int edition_ = 0; + + /** + * + * + *
+     * Required. The edition of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for edition. + */ + @java.lang.Override + public int getEditionValue() { + return edition_; + } + + /** + * + * + *
+     * Required. The edition of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for edition to set. + * @return This builder for chaining. + */ + public Builder setEditionValue(int value) { + edition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The edition of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The edition. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition + getEdition() { + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition result = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition.forNumber( + edition_); + return result == null + ? com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. The edition of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The edition to set. + * @return This builder for chaining. + */ + public Builder setEdition( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + edition_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The edition of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEdition() { + bitField0_ = (bitField0_ & ~0x00000001); + edition_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + private static final com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig(); + } + + public static com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudSqlInstanceInitializationConfig 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.backupdr.v1beta.CloudSqlInstanceInitializationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceInitializationConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceInitializationConfigOrBuilder.java new file mode 100644 index 000000000000..52050346e2bf --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CloudSqlInstanceInitializationConfigOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_cloudsql.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CloudSqlInstanceInitializationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The edition of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for edition. + */ + int getEditionValue(); + + /** + * + * + *
+   * Required. The edition of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition edition = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The edition. + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Edition getEdition(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPlanProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPlanProperties.java new file mode 100644 index 000000000000..3845f1462443 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPlanProperties.java @@ -0,0 +1,524 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Properties for a compute instance backup plan.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties} + */ +@com.google.protobuf.Generated +public final class ComputeInstanceBackupPlanProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + ComputeInstanceBackupPlanPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ComputeInstanceBackupPlanProperties"); + } + + // Use ComputeInstanceBackupPlanProperties.newBuilder() to construct. + private ComputeInstanceBackupPlanProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ComputeInstanceBackupPlanProperties() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupPlanProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupPlanProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.Builder.class); + } + + public static final int GUEST_FLUSH_FIELD_NUMBER = 1; + private boolean guestFlush_ = false; + + /** + * + * + *
+   * Optional. Indicates whether to perform a guest flush operation before
+   * taking a compute backup. When set to false, the system will create
+   * crash-consistent backups. Default value is false.
+   * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + @java.lang.Override + public boolean getGuestFlush() { + return guestFlush_; + } + + 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 (guestFlush_ != false) { + output.writeBool(1, guestFlush_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (guestFlush_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, guestFlush_); + } + 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.backupdr.v1beta.ComputeInstanceBackupPlanProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties other = + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) obj; + + if (getGuestFlush() != other.getGuestFlush()) 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) + GUEST_FLUSH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGuestFlush()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties 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.backupdr.v1beta.ComputeInstanceBackupPlanProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties 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.backupdr.v1beta.ComputeInstanceBackupPlanProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ComputeInstanceBackupPlanProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Properties for a compute instance backup plan.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupPlanProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupPlanProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + guestFlush_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupPlanProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties build() { + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties buildPartial() { + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties result = + new com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.guestFlush_ = guestFlush_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + .getDefaultInstance()) return this; + if (other.getGuestFlush() != false) { + setGuestFlush(other.getGuestFlush()); + } + 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 8: + { + guestFlush_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 boolean guestFlush_; + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a compute backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + @java.lang.Override + public boolean getGuestFlush() { + return guestFlush_; + } + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a compute backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The guestFlush to set. + * @return This builder for chaining. + */ + public Builder setGuestFlush(boolean value) { + + guestFlush_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a compute backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGuestFlush() { + bitField0_ = (bitField0_ & ~0x00000001); + guestFlush_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + private static final com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties(); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeInstanceBackupPlanProperties 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.backupdr.v1beta.ComputeInstanceBackupPlanProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPlanPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPlanPropertiesOrBuilder.java new file mode 100644 index 000000000000..3ad1fe59b212 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPlanPropertiesOrBuilder.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ComputeInstanceBackupPlanPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ComputeInstanceBackupPlanProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Indicates whether to perform a guest flush operation before
+   * taking a compute backup. When set to false, the system will create
+   * crash-consistent backups. Default value is false.
+   * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + boolean getGuestFlush(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupProperties.java new file mode 100644 index 000000000000..f292dbcd7f77 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupProperties.java @@ -0,0 +1,5403 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ComputeInstanceBackupProperties represents Compute Engine instance backup
+ * properties.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties} + */ +@com.google.protobuf.Generated +public final class ComputeInstanceBackupProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + ComputeInstanceBackupPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ComputeInstanceBackupProperties"); + } + + // Use ComputeInstanceBackupProperties.newBuilder() to construct. + private ComputeInstanceBackupProperties(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ComputeInstanceBackupProperties() { + description_ = ""; + machineType_ = ""; + networkInterface_ = java.util.Collections.emptyList(); + disk_ = java.util.Collections.emptyList(); + serviceAccount_ = java.util.Collections.emptyList(); + guestAccelerator_ = java.util.Collections.emptyList(); + minCpuPlatform_ = ""; + keyRevocationActionType_ = 0; + sourceInstance_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 14: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.Builder.class); + } + + private int bitField0_; + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * An optional text description for the instances that are created from these
+   * properties.
+   * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * An optional text description for the instances that are created from these
+   * properties.
+   * 
+ * + * optional string description = 1; + * + * @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; + } + } + + /** + * + * + *
+   * An optional text description for the instances that are created from these
+   * properties.
+   * 
+ * + * optional string description = 1; + * + * @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 TAGS_FIELD_NUMBER = 2; + private com.google.cloud.backupdr.v1beta.Tags tags_; + + /** + * + * + *
+   * A list of tags to apply to the instances that are created from these
+   * properties. The tags identify valid sources or targets for network
+   * firewalls. The setTags method can modify this list of tags. Each tag within
+   * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + * + * @return Whether the tags field is set. + */ + @java.lang.Override + public boolean hasTags() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * A list of tags to apply to the instances that are created from these
+   * properties. The tags identify valid sources or targets for network
+   * firewalls. The setTags method can modify this list of tags. Each tag within
+   * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + * + * @return The tags. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Tags getTags() { + return tags_ == null ? com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance() : tags_; + } + + /** + * + * + *
+   * A list of tags to apply to the instances that are created from these
+   * properties. The tags identify valid sources or targets for network
+   * firewalls. The setTags method can modify this list of tags. Each tag within
+   * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TagsOrBuilder getTagsOrBuilder() { + return tags_ == null ? com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance() : tags_; + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineType_ = ""; + + /** + * + * + *
+   * The machine type to use for instances that are created from these
+   * properties.
+   * 
+ * + * optional string machine_type = 3; + * + * @return Whether the machineType field is set. + */ + @java.lang.Override + public boolean hasMachineType() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * The machine type to use for instances that are created from these
+   * properties.
+   * 
+ * + * optional string machine_type = 3; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + 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(); + machineType_ = s; + return s; + } + } + + /** + * + * + *
+   * The machine type to use for instances that are created from these
+   * properties.
+   * 
+ * + * optional string machine_type = 3; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CAN_IP_FORWARD_FIELD_NUMBER = 4; + private boolean canIpForward_ = false; + + /** + * + * + *
+   * Enables instances created based on these properties to send packets with
+   * source IP addresses other than their own and receive packets with
+   * destination IP addresses other than their own. If these instances will be
+   * used as an IP gateway or it will be set as the next-hop in a Route
+   * resource, specify `true`. If unsure, leave this set to `false`. See the
+   * https://cloud.google.com/vpc/docs/using-routes#canipforward
+   * documentation for more information.
+   * 
+ * + * optional bool can_ip_forward = 4; + * + * @return Whether the canIpForward field is set. + */ + @java.lang.Override + public boolean hasCanIpForward() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Enables instances created based on these properties to send packets with
+   * source IP addresses other than their own and receive packets with
+   * destination IP addresses other than their own. If these instances will be
+   * used as an IP gateway or it will be set as the next-hop in a Route
+   * resource, specify `true`. If unsure, leave this set to `false`. See the
+   * https://cloud.google.com/vpc/docs/using-routes#canipforward
+   * documentation for more information.
+   * 
+ * + * optional bool can_ip_forward = 4; + * + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + + public static final int NETWORK_INTERFACE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List networkInterface_; + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + @java.lang.Override + public java.util.List + getNetworkInterfaceList() { + return networkInterface_; + } + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + @java.lang.Override + public java.util.List + getNetworkInterfaceOrBuilderList() { + return networkInterface_; + } + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + @java.lang.Override + public int getNetworkInterfaceCount() { + return networkInterface_.size(); + } + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface getNetworkInterface(int index) { + return networkInterface_.get(index); + } + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder getNetworkInterfaceOrBuilder( + int index) { + return networkInterface_.get(index); + } + + public static final int DISK_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List disk_; + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + @java.lang.Override + public java.util.List getDiskList() { + return disk_; + } + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + @java.lang.Override + public java.util.List + getDiskOrBuilderList() { + return disk_; + } + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + @java.lang.Override + public int getDiskCount() { + return disk_.size(); + } + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk getDisk(int index) { + return disk_.get(index); + } + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder getDiskOrBuilder(int index) { + return disk_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 7; + private com.google.cloud.backupdr.v1beta.Metadata metadata_; + + /** + * + * + *
+   * The metadata key/value pairs to assign to instances that are created from
+   * these properties. These pairs can consist of custom metadata or predefined
+   * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+   * information.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * The metadata key/value pairs to assign to instances that are created from
+   * these properties. These pairs can consist of custom metadata or predefined
+   * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+   * information.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Metadata getMetadata() { + return metadata_ == null + ? com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance() + : metadata_; + } + + /** + * + * + *
+   * The metadata key/value pairs to assign to instances that are created from
+   * these properties. These pairs can consist of custom metadata or predefined
+   * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+   * information.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null + ? com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance() + : metadata_; + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List serviceAccount_; + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + @java.lang.Override + public java.util.List getServiceAccountList() { + return serviceAccount_; + } + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + @java.lang.Override + public java.util.List + getServiceAccountOrBuilderList() { + return serviceAccount_; + } + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + @java.lang.Override + public int getServiceAccountCount() { + return serviceAccount_.size(); + } + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceAccount getServiceAccount(int index) { + return serviceAccount_.get(index); + } + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder getServiceAccountOrBuilder( + int index) { + return serviceAccount_.get(index); + } + + public static final int SCHEDULING_FIELD_NUMBER = 9; + private com.google.cloud.backupdr.v1beta.Scheduling scheduling_; + + /** + * + * + *
+   * Specifies the scheduling options for the instances that are created from
+   * these properties.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + * + * @return Whether the scheduling field is set. + */ + @java.lang.Override + public boolean hasScheduling() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Specifies the scheduling options for the instances that are created from
+   * these properties.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + * + * @return The scheduling. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling getScheduling() { + return scheduling_ == null + ? com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance() + : scheduling_; + } + + /** + * + * + *
+   * Specifies the scheduling options for the instances that are created from
+   * these properties.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.SchedulingOrBuilder getSchedulingOrBuilder() { + return scheduling_ == null + ? com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance() + : scheduling_; + } + + public static final int GUEST_ACCELERATOR_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List guestAccelerator_; + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + @java.lang.Override + public java.util.List + getGuestAcceleratorList() { + return guestAccelerator_; + } + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + @java.lang.Override + public java.util.List + getGuestAcceleratorOrBuilderList() { + return guestAccelerator_; + } + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + @java.lang.Override + public int getGuestAcceleratorCount() { + return guestAccelerator_.size(); + } + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AcceleratorConfig getGuestAccelerator(int index) { + return guestAccelerator_.get(index); + } + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder getGuestAcceleratorOrBuilder( + int index) { + return guestAccelerator_.get(index); + } + + public static final int MIN_CPU_PLATFORM_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object minCpuPlatform_ = ""; + + /** + * + * + *
+   * Minimum cpu/platform to be used by instances. The instance may be
+   * scheduled on the specified or newer cpu/platform. Applicable values are the
+   * friendly names of CPU platforms, such as
+   * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+   * For more information, read
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * optional string min_cpu_platform = 11; + * + * @return Whether the minCpuPlatform field is set. + */ + @java.lang.Override + public boolean hasMinCpuPlatform() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Minimum cpu/platform to be used by instances. The instance may be
+   * scheduled on the specified or newer cpu/platform. Applicable values are the
+   * friendly names of CPU platforms, such as
+   * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+   * For more information, read
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * optional string min_cpu_platform = 11; + * + * @return The minCpuPlatform. + */ + @java.lang.Override + public java.lang.String getMinCpuPlatform() { + java.lang.Object ref = minCpuPlatform_; + 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(); + minCpuPlatform_ = s; + return s; + } + } + + /** + * + * + *
+   * Minimum cpu/platform to be used by instances. The instance may be
+   * scheduled on the specified or newer cpu/platform. Applicable values are the
+   * friendly names of CPU platforms, such as
+   * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+   * For more information, read
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * optional string min_cpu_platform = 11; + * + * @return The bytes for minCpuPlatform. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMinCpuPlatformBytes() { + java.lang.Object ref = minCpuPlatform_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + minCpuPlatform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_REVOCATION_ACTION_TYPE_FIELD_NUMBER = 12; + private int keyRevocationActionType_ = 0; + + /** + * + * + *
+   * KeyRevocationActionType of the instance. Supported options are "STOP" and
+   * "NONE". The default value is "NONE" if it is not specified.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return Whether the keyRevocationActionType field is set. + */ + @java.lang.Override + public boolean hasKeyRevocationActionType() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * KeyRevocationActionType of the instance. Supported options are "STOP" and
+   * "NONE". The default value is "NONE" if it is not specified.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return The enum numeric value on the wire for keyRevocationActionType. + */ + @java.lang.Override + public int getKeyRevocationActionTypeValue() { + return keyRevocationActionType_; + } + + /** + * + * + *
+   * KeyRevocationActionType of the instance. Supported options are "STOP" and
+   * "NONE". The default value is "NONE" if it is not specified.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return The keyRevocationActionType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyRevocationActionType getKeyRevocationActionType() { + com.google.cloud.backupdr.v1beta.KeyRevocationActionType result = + com.google.cloud.backupdr.v1beta.KeyRevocationActionType.forNumber( + keyRevocationActionType_); + return result == null + ? com.google.cloud.backupdr.v1beta.KeyRevocationActionType.UNRECOGNIZED + : result; + } + + public static final int SOURCE_INSTANCE_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceInstance_ = ""; + + /** + * + * + *
+   * The source instance used to create this backup. This can be a partial or
+   * full URL to the resource. For example, the following are valid values:
+   * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+   * -projects/project/zones/zone/instances/instance
+   * 
+ * + * optional string source_instance = 13; + * + * @return Whether the sourceInstance field is set. + */ + @java.lang.Override + public boolean hasSourceInstance() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * The source instance used to create this backup. This can be a partial or
+   * full URL to the resource. For example, the following are valid values:
+   * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+   * -projects/project/zones/zone/instances/instance
+   * 
+ * + * optional string source_instance = 13; + * + * @return The sourceInstance. + */ + @java.lang.Override + public java.lang.String getSourceInstance() { + java.lang.Object ref = sourceInstance_; + 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(); + sourceInstance_ = s; + return s; + } + } + + /** + * + * + *
+   * The source instance used to create this backup. This can be a partial or
+   * full URL to the resource. For example, the following are valid values:
+   * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+   * -projects/project/zones/zone/instances/instance
+   * 
+ * + * optional string source_instance = 13; + * + * @return The bytes for sourceInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceInstanceBytes() { + java.lang.Object ref = sourceInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 14; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupProperties_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(); + } + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + @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(); + } + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + @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; + } + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + @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 GUEST_FLUSH_FIELD_NUMBER = 15; + private boolean guestFlush_ = false; + + /** + * + * + *
+   * Optional. Indicates whether to perform a guest flush operation before
+   * taking a compute backup. When set to false, the system will create
+   * crash-consistent backups. Default value is false.
+   * 
+ * + * bool guest_flush = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + @java.lang.Override + public boolean getGuestFlush() { + return guestFlush_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getTags()); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, machineType_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeBool(4, canIpForward_); + } + for (int i = 0; i < networkInterface_.size(); i++) { + output.writeMessage(5, networkInterface_.get(i)); + } + for (int i = 0; i < disk_.size(); i++) { + output.writeMessage(6, disk_.get(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(7, getMetadata()); + } + for (int i = 0; i < serviceAccount_.size(); i++) { + output.writeMessage(8, serviceAccount_.get(i)); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(9, getScheduling()); + } + for (int i = 0; i < guestAccelerator_.size(); i++) { + output.writeMessage(10, guestAccelerator_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, minCpuPlatform_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeEnum(12, keyRevocationActionType_); + } + if (((bitField0_ & 0x00000100) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, sourceInstance_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 14); + if (guestFlush_ != false) { + output.writeBool(15, guestFlush_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTags()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, machineType_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, canIpForward_); + } + for (int i = 0; i < networkInterface_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, networkInterface_.get(i)); + } + for (int i = 0; i < disk_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, disk_.get(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMetadata()); + } + for (int i = 0; i < serviceAccount_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, serviceAccount_.get(i)); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getScheduling()); + } + for (int i = 0; i < guestAccelerator_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, guestAccelerator_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, minCpuPlatform_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, keyRevocationActionType_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, sourceInstance_); + } + 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(14, labels__); + } + if (guestFlush_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, guestFlush_); + } + 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.backupdr.v1beta.ComputeInstanceBackupProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties other = + (com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) obj; + + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription().equals(other.getDescription())) return false; + } + if (hasTags() != other.hasTags()) return false; + if (hasTags()) { + if (!getTags().equals(other.getTags())) return false; + } + if (hasMachineType() != other.hasMachineType()) return false; + if (hasMachineType()) { + if (!getMachineType().equals(other.getMachineType())) return false; + } + if (hasCanIpForward() != other.hasCanIpForward()) return false; + if (hasCanIpForward()) { + if (getCanIpForward() != other.getCanIpForward()) return false; + } + if (!getNetworkInterfaceList().equals(other.getNetworkInterfaceList())) return false; + if (!getDiskList().equals(other.getDiskList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getServiceAccountList().equals(other.getServiceAccountList())) return false; + if (hasScheduling() != other.hasScheduling()) return false; + if (hasScheduling()) { + if (!getScheduling().equals(other.getScheduling())) return false; + } + if (!getGuestAcceleratorList().equals(other.getGuestAcceleratorList())) return false; + if (hasMinCpuPlatform() != other.hasMinCpuPlatform()) return false; + if (hasMinCpuPlatform()) { + if (!getMinCpuPlatform().equals(other.getMinCpuPlatform())) return false; + } + if (hasKeyRevocationActionType() != other.hasKeyRevocationActionType()) return false; + if (hasKeyRevocationActionType()) { + if (keyRevocationActionType_ != other.keyRevocationActionType_) return false; + } + if (hasSourceInstance() != other.hasSourceInstance()) return false; + if (hasSourceInstance()) { + if (!getSourceInstance().equals(other.getSourceInstance())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getGuestFlush() != other.getGuestFlush()) 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 (hasDescription()) { + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + } + if (hasTags()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTags().hashCode(); + } + if (hasMachineType()) { + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + } + if (hasCanIpForward()) { + hash = (37 * hash) + CAN_IP_FORWARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCanIpForward()); + } + if (getNetworkInterfaceCount() > 0) { + hash = (37 * hash) + NETWORK_INTERFACE_FIELD_NUMBER; + hash = (53 * hash) + getNetworkInterfaceList().hashCode(); + } + if (getDiskCount() > 0) { + hash = (37 * hash) + DISK_FIELD_NUMBER; + hash = (53 * hash) + getDiskList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getServiceAccountCount() > 0) { + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountList().hashCode(); + } + if (hasScheduling()) { + hash = (37 * hash) + SCHEDULING_FIELD_NUMBER; + hash = (53 * hash) + getScheduling().hashCode(); + } + if (getGuestAcceleratorCount() > 0) { + hash = (37 * hash) + GUEST_ACCELERATOR_FIELD_NUMBER; + hash = (53 * hash) + getGuestAcceleratorList().hashCode(); + } + if (hasMinCpuPlatform()) { + hash = (37 * hash) + MIN_CPU_PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getMinCpuPlatform().hashCode(); + } + if (hasKeyRevocationActionType()) { + hash = (37 * hash) + KEY_REVOCATION_ACTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + keyRevocationActionType_; + } + if (hasSourceInstance()) { + hash = (37 * hash) + SOURCE_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getSourceInstance().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + GUEST_FLUSH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGuestFlush()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties 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.backupdr.v1beta.ComputeInstanceBackupProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties 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.backupdr.v1beta.ComputeInstanceBackupProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ComputeInstanceBackupProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ComputeInstanceBackupProperties represents Compute Engine instance backup
+   * properties.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 14: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 14: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTagsFieldBuilder(); + internalGetNetworkInterfaceFieldBuilder(); + internalGetDiskFieldBuilder(); + internalGetMetadataFieldBuilder(); + internalGetServiceAccountFieldBuilder(); + internalGetSchedulingFieldBuilder(); + internalGetGuestAcceleratorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + tags_ = null; + if (tagsBuilder_ != null) { + tagsBuilder_.dispose(); + tagsBuilder_ = null; + } + machineType_ = ""; + canIpForward_ = false; + if (networkInterfaceBuilder_ == null) { + networkInterface_ = java.util.Collections.emptyList(); + } else { + networkInterface_ = null; + networkInterfaceBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (diskBuilder_ == null) { + disk_ = java.util.Collections.emptyList(); + } else { + disk_ = null; + diskBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + if (serviceAccountBuilder_ == null) { + serviceAccount_ = java.util.Collections.emptyList(); + } else { + serviceAccount_ = null; + serviceAccountBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + scheduling_ = null; + if (schedulingBuilder_ != null) { + schedulingBuilder_.dispose(); + schedulingBuilder_ = null; + } + if (guestAcceleratorBuilder_ == null) { + guestAccelerator_ = java.util.Collections.emptyList(); + } else { + guestAccelerator_ = null; + guestAcceleratorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + minCpuPlatform_ = ""; + keyRevocationActionType_ = 0; + sourceInstance_ = ""; + internalGetMutableLabels().clear(); + guestFlush_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceBackupProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties build() { + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties buildPartial() { + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties result = + new com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties result) { + if (networkInterfaceBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + networkInterface_ = java.util.Collections.unmodifiableList(networkInterface_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.networkInterface_ = networkInterface_; + } else { + result.networkInterface_ = networkInterfaceBuilder_.build(); + } + if (diskBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + disk_ = java.util.Collections.unmodifiableList(disk_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.disk_ = disk_; + } else { + result.disk_ = diskBuilder_.build(); + } + if (serviceAccountBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + serviceAccount_ = java.util.Collections.unmodifiableList(serviceAccount_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.serviceAccount_ = serviceAccount_; + } else { + result.serviceAccount_ = serviceAccountBuilder_.build(); + } + if (guestAcceleratorBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + guestAccelerator_ = java.util.Collections.unmodifiableList(guestAccelerator_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.guestAccelerator_ = guestAccelerator_; + } else { + result.guestAccelerator_ = guestAcceleratorBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tags_ = tagsBuilder_ == null ? tags_ : tagsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.machineType_ = machineType_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.canIpForward_ = canIpForward_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.scheduling_ = schedulingBuilder_ == null ? scheduling_ : schedulingBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.minCpuPlatform_ = minCpuPlatform_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.keyRevocationActionType_ = keyRevocationActionType_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.sourceInstance_ = sourceInstance_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.guestFlush_ = guestFlush_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties.getDefaultInstance()) + return this; + if (other.hasDescription()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTags()) { + mergeTags(other.getTags()); + } + if (other.hasMachineType()) { + machineType_ = other.machineType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCanIpForward()) { + setCanIpForward(other.getCanIpForward()); + } + if (networkInterfaceBuilder_ == null) { + if (!other.networkInterface_.isEmpty()) { + if (networkInterface_.isEmpty()) { + networkInterface_ = other.networkInterface_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureNetworkInterfaceIsMutable(); + networkInterface_.addAll(other.networkInterface_); + } + onChanged(); + } + } else { + if (!other.networkInterface_.isEmpty()) { + if (networkInterfaceBuilder_.isEmpty()) { + networkInterfaceBuilder_.dispose(); + networkInterfaceBuilder_ = null; + networkInterface_ = other.networkInterface_; + bitField0_ = (bitField0_ & ~0x00000010); + networkInterfaceBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetNetworkInterfaceFieldBuilder() + : null; + } else { + networkInterfaceBuilder_.addAllMessages(other.networkInterface_); + } + } + } + if (diskBuilder_ == null) { + if (!other.disk_.isEmpty()) { + if (disk_.isEmpty()) { + disk_ = other.disk_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureDiskIsMutable(); + disk_.addAll(other.disk_); + } + onChanged(); + } + } else { + if (!other.disk_.isEmpty()) { + if (diskBuilder_.isEmpty()) { + diskBuilder_.dispose(); + diskBuilder_ = null; + disk_ = other.disk_; + bitField0_ = (bitField0_ & ~0x00000020); + diskBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDiskFieldBuilder() + : null; + } else { + diskBuilder_.addAllMessages(other.disk_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (serviceAccountBuilder_ == null) { + if (!other.serviceAccount_.isEmpty()) { + if (serviceAccount_.isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureServiceAccountIsMutable(); + serviceAccount_.addAll(other.serviceAccount_); + } + onChanged(); + } + } else { + if (!other.serviceAccount_.isEmpty()) { + if (serviceAccountBuilder_.isEmpty()) { + serviceAccountBuilder_.dispose(); + serviceAccountBuilder_ = null; + serviceAccount_ = other.serviceAccount_; + bitField0_ = (bitField0_ & ~0x00000080); + serviceAccountBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetServiceAccountFieldBuilder() + : null; + } else { + serviceAccountBuilder_.addAllMessages(other.serviceAccount_); + } + } + } + if (other.hasScheduling()) { + mergeScheduling(other.getScheduling()); + } + if (guestAcceleratorBuilder_ == null) { + if (!other.guestAccelerator_.isEmpty()) { + if (guestAccelerator_.isEmpty()) { + guestAccelerator_ = other.guestAccelerator_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.addAll(other.guestAccelerator_); + } + onChanged(); + } + } else { + if (!other.guestAccelerator_.isEmpty()) { + if (guestAcceleratorBuilder_.isEmpty()) { + guestAcceleratorBuilder_.dispose(); + guestAcceleratorBuilder_ = null; + guestAccelerator_ = other.guestAccelerator_; + bitField0_ = (bitField0_ & ~0x00000200); + guestAcceleratorBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGuestAcceleratorFieldBuilder() + : null; + } else { + guestAcceleratorBuilder_.addAllMessages(other.guestAccelerator_); + } + } + } + if (other.hasMinCpuPlatform()) { + minCpuPlatform_ = other.minCpuPlatform_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.hasKeyRevocationActionType()) { + setKeyRevocationActionTypeValue(other.getKeyRevocationActionTypeValue()); + } + if (other.hasSourceInstance()) { + sourceInstance_ = other.sourceInstance_; + bitField0_ |= 0x00001000; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00002000; + if (other.getGuestFlush() != false) { + setGuestFlush(other.getGuestFlush()); + } + 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: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetTagsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + canIpForward_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + com.google.cloud.backupdr.v1beta.NetworkInterface m = + input.readMessage( + com.google.cloud.backupdr.v1beta.NetworkInterface.parser(), + extensionRegistry); + if (networkInterfaceBuilder_ == null) { + ensureNetworkInterfaceIsMutable(); + networkInterface_.add(m); + } else { + networkInterfaceBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.backupdr.v1beta.AttachedDisk m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AttachedDisk.parser(), extensionRegistry); + if (diskBuilder_ == null) { + ensureDiskIsMutable(); + disk_.add(m); + } else { + diskBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + com.google.cloud.backupdr.v1beta.ServiceAccount m = + input.readMessage( + com.google.cloud.backupdr.v1beta.ServiceAccount.parser(), + extensionRegistry); + if (serviceAccountBuilder_ == null) { + ensureServiceAccountIsMutable(); + serviceAccount_.add(m); + } else { + serviceAccountBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetSchedulingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + com.google.cloud.backupdr.v1beta.AcceleratorConfig m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AcceleratorConfig.parser(), + extensionRegistry); + if (guestAcceleratorBuilder_ == null) { + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.add(m); + } else { + guestAcceleratorBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + minCpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: + { + keyRevocationActionType_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 106: + { + sourceInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 120: + { + guestFlush_ = input.readBool(); + bitField0_ |= 0x00004000; + break; + } // case 120 + 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 description_ = ""; + + /** + * + * + *
+     * An optional text description for the instances that are created from these
+     * properties.
+     * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * An optional text description for the instances that are created from these
+     * properties.
+     * 
+ * + * optional string description = 1; + * + * @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; + } + } + + /** + * + * + *
+     * An optional text description for the instances that are created from these
+     * properties.
+     * 
+ * + * optional string description = 1; + * + * @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; + } + } + + /** + * + * + *
+     * An optional text description for the instances that are created from these
+     * properties.
+     * 
+ * + * optional string description = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional text description for the instances that are created from these
+     * properties.
+     * 
+ * + * optional string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional text description for the instances that are created from these
+     * properties.
+     * 
+ * + * optional string description = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.Tags tags_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Tags, + com.google.cloud.backupdr.v1beta.Tags.Builder, + com.google.cloud.backupdr.v1beta.TagsOrBuilder> + tagsBuilder_; + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + * + * @return Whether the tags field is set. + */ + public boolean hasTags() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + * + * @return The tags. + */ + public com.google.cloud.backupdr.v1beta.Tags getTags() { + if (tagsBuilder_ == null) { + return tags_ == null ? com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance() : tags_; + } else { + return tagsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + public Builder setTags(com.google.cloud.backupdr.v1beta.Tags value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tags_ = value; + } else { + tagsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + public Builder setTags(com.google.cloud.backupdr.v1beta.Tags.Builder builderForValue) { + if (tagsBuilder_ == null) { + tags_ = builderForValue.build(); + } else { + tagsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + public Builder mergeTags(com.google.cloud.backupdr.v1beta.Tags value) { + if (tagsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && tags_ != null + && tags_ != com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance()) { + getTagsBuilder().mergeFrom(value); + } else { + tags_ = value; + } + } else { + tagsBuilder_.mergeFrom(value); + } + if (tags_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00000002); + tags_ = null; + if (tagsBuilder_ != null) { + tagsBuilder_.dispose(); + tagsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + public com.google.cloud.backupdr.v1beta.Tags.Builder getTagsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTagsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + public com.google.cloud.backupdr.v1beta.TagsOrBuilder getTagsOrBuilder() { + if (tagsBuilder_ != null) { + return tagsBuilder_.getMessageOrBuilder(); + } else { + return tags_ == null ? com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance() : tags_; + } + } + + /** + * + * + *
+     * A list of tags to apply to the instances that are created from these
+     * properties. The tags identify valid sources or targets for network
+     * firewalls. The setTags method can modify this list of tags. Each tag within
+     * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Tags, + com.google.cloud.backupdr.v1beta.Tags.Builder, + com.google.cloud.backupdr.v1beta.TagsOrBuilder> + internalGetTagsFieldBuilder() { + if (tagsBuilder_ == null) { + tagsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Tags, + com.google.cloud.backupdr.v1beta.Tags.Builder, + com.google.cloud.backupdr.v1beta.TagsOrBuilder>( + getTags(), getParentForChildren(), isClean()); + tags_ = null; + } + return tagsBuilder_; + } + + private java.lang.Object machineType_ = ""; + + /** + * + * + *
+     * The machine type to use for instances that are created from these
+     * properties.
+     * 
+ * + * optional string machine_type = 3; + * + * @return Whether the machineType field is set. + */ + public boolean hasMachineType() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The machine type to use for instances that are created from these
+     * properties.
+     * 
+ * + * optional string machine_type = 3; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The machine type to use for instances that are created from these
+     * properties.
+     * 
+ * + * optional string machine_type = 3; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The machine type to use for instances that are created from these
+     * properties.
+     * 
+ * + * optional string machine_type = 3; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The machine type to use for instances that are created from these
+     * properties.
+     * 
+ * + * optional string machine_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + machineType_ = getDefaultInstance().getMachineType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The machine type to use for instances that are created from these
+     * properties.
+     * 
+ * + * optional string machine_type = 3; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean canIpForward_; + + /** + * + * + *
+     * Enables instances created based on these properties to send packets with
+     * source IP addresses other than their own and receive packets with
+     * destination IP addresses other than their own. If these instances will be
+     * used as an IP gateway or it will be set as the next-hop in a Route
+     * resource, specify `true`. If unsure, leave this set to `false`. See the
+     * https://cloud.google.com/vpc/docs/using-routes#canipforward
+     * documentation for more information.
+     * 
+ * + * optional bool can_ip_forward = 4; + * + * @return Whether the canIpForward field is set. + */ + @java.lang.Override + public boolean hasCanIpForward() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Enables instances created based on these properties to send packets with
+     * source IP addresses other than their own and receive packets with
+     * destination IP addresses other than their own. If these instances will be
+     * used as an IP gateway or it will be set as the next-hop in a Route
+     * resource, specify `true`. If unsure, leave this set to `false`. See the
+     * https://cloud.google.com/vpc/docs/using-routes#canipforward
+     * documentation for more information.
+     * 
+ * + * optional bool can_ip_forward = 4; + * + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + + /** + * + * + *
+     * Enables instances created based on these properties to send packets with
+     * source IP addresses other than their own and receive packets with
+     * destination IP addresses other than their own. If these instances will be
+     * used as an IP gateway or it will be set as the next-hop in a Route
+     * resource, specify `true`. If unsure, leave this set to `false`. See the
+     * https://cloud.google.com/vpc/docs/using-routes#canipforward
+     * documentation for more information.
+     * 
+ * + * optional bool can_ip_forward = 4; + * + * @param value The canIpForward to set. + * @return This builder for chaining. + */ + public Builder setCanIpForward(boolean value) { + + canIpForward_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enables instances created based on these properties to send packets with
+     * source IP addresses other than their own and receive packets with
+     * destination IP addresses other than their own. If these instances will be
+     * used as an IP gateway or it will be set as the next-hop in a Route
+     * resource, specify `true`. If unsure, leave this set to `false`. See the
+     * https://cloud.google.com/vpc/docs/using-routes#canipforward
+     * documentation for more information.
+     * 
+ * + * optional bool can_ip_forward = 4; + * + * @return This builder for chaining. + */ + public Builder clearCanIpForward() { + bitField0_ = (bitField0_ & ~0x00000008); + canIpForward_ = false; + onChanged(); + return this; + } + + private java.util.List networkInterface_ = + java.util.Collections.emptyList(); + + private void ensureNetworkInterfaceIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + networkInterface_ = + new java.util.ArrayList( + networkInterface_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkInterface, + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder, + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder> + networkInterfaceBuilder_; + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public java.util.List + getNetworkInterfaceList() { + if (networkInterfaceBuilder_ == null) { + return java.util.Collections.unmodifiableList(networkInterface_); + } else { + return networkInterfaceBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public int getNetworkInterfaceCount() { + if (networkInterfaceBuilder_ == null) { + return networkInterface_.size(); + } else { + return networkInterfaceBuilder_.getCount(); + } + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public com.google.cloud.backupdr.v1beta.NetworkInterface getNetworkInterface(int index) { + if (networkInterfaceBuilder_ == null) { + return networkInterface_.get(index); + } else { + return networkInterfaceBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder setNetworkInterface( + int index, com.google.cloud.backupdr.v1beta.NetworkInterface value) { + if (networkInterfaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkInterfaceIsMutable(); + networkInterface_.set(index, value); + onChanged(); + } else { + networkInterfaceBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder setNetworkInterface( + int index, com.google.cloud.backupdr.v1beta.NetworkInterface.Builder builderForValue) { + if (networkInterfaceBuilder_ == null) { + ensureNetworkInterfaceIsMutable(); + networkInterface_.set(index, builderForValue.build()); + onChanged(); + } else { + networkInterfaceBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder addNetworkInterface(com.google.cloud.backupdr.v1beta.NetworkInterface value) { + if (networkInterfaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkInterfaceIsMutable(); + networkInterface_.add(value); + onChanged(); + } else { + networkInterfaceBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder addNetworkInterface( + int index, com.google.cloud.backupdr.v1beta.NetworkInterface value) { + if (networkInterfaceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkInterfaceIsMutable(); + networkInterface_.add(index, value); + onChanged(); + } else { + networkInterfaceBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder addNetworkInterface( + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder builderForValue) { + if (networkInterfaceBuilder_ == null) { + ensureNetworkInterfaceIsMutable(); + networkInterface_.add(builderForValue.build()); + onChanged(); + } else { + networkInterfaceBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder addNetworkInterface( + int index, com.google.cloud.backupdr.v1beta.NetworkInterface.Builder builderForValue) { + if (networkInterfaceBuilder_ == null) { + ensureNetworkInterfaceIsMutable(); + networkInterface_.add(index, builderForValue.build()); + onChanged(); + } else { + networkInterfaceBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder addAllNetworkInterface( + java.lang.Iterable values) { + if (networkInterfaceBuilder_ == null) { + ensureNetworkInterfaceIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkInterface_); + onChanged(); + } else { + networkInterfaceBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder clearNetworkInterface() { + if (networkInterfaceBuilder_ == null) { + networkInterface_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + networkInterfaceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public Builder removeNetworkInterface(int index) { + if (networkInterfaceBuilder_ == null) { + ensureNetworkInterfaceIsMutable(); + networkInterface_.remove(index); + onChanged(); + } else { + networkInterfaceBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public com.google.cloud.backupdr.v1beta.NetworkInterface.Builder getNetworkInterfaceBuilder( + int index) { + return internalGetNetworkInterfaceFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder getNetworkInterfaceOrBuilder( + int index) { + if (networkInterfaceBuilder_ == null) { + return networkInterface_.get(index); + } else { + return networkInterfaceBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public java.util.List + getNetworkInterfaceOrBuilderList() { + if (networkInterfaceBuilder_ != null) { + return networkInterfaceBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(networkInterface_); + } + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public com.google.cloud.backupdr.v1beta.NetworkInterface.Builder addNetworkInterfaceBuilder() { + return internalGetNetworkInterfaceFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.NetworkInterface.getDefaultInstance()); + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public com.google.cloud.backupdr.v1beta.NetworkInterface.Builder addNetworkInterfaceBuilder( + int index) { + return internalGetNetworkInterfaceFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.NetworkInterface.getDefaultInstance()); + } + + /** + * + * + *
+     * An array of network access configurations for this interface.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + public java.util.List + getNetworkInterfaceBuilderList() { + return internalGetNetworkInterfaceFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkInterface, + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder, + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder> + internalGetNetworkInterfaceFieldBuilder() { + if (networkInterfaceBuilder_ == null) { + networkInterfaceBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkInterface, + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder, + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder>( + networkInterface_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + networkInterface_ = null; + } + return networkInterfaceBuilder_; + } + + private java.util.List disk_ = + java.util.Collections.emptyList(); + + private void ensureDiskIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + disk_ = new java.util.ArrayList(disk_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk, + com.google.cloud.backupdr.v1beta.AttachedDisk.Builder, + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder> + diskBuilder_; + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public java.util.List getDiskList() { + if (diskBuilder_ == null) { + return java.util.Collections.unmodifiableList(disk_); + } else { + return diskBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public int getDiskCount() { + if (diskBuilder_ == null) { + return disk_.size(); + } else { + return diskBuilder_.getCount(); + } + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk getDisk(int index) { + if (diskBuilder_ == null) { + return disk_.get(index); + } else { + return diskBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder setDisk(int index, com.google.cloud.backupdr.v1beta.AttachedDisk value) { + if (diskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiskIsMutable(); + disk_.set(index, value); + onChanged(); + } else { + diskBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder setDisk( + int index, com.google.cloud.backupdr.v1beta.AttachedDisk.Builder builderForValue) { + if (diskBuilder_ == null) { + ensureDiskIsMutable(); + disk_.set(index, builderForValue.build()); + onChanged(); + } else { + diskBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder addDisk(com.google.cloud.backupdr.v1beta.AttachedDisk value) { + if (diskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiskIsMutable(); + disk_.add(value); + onChanged(); + } else { + diskBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder addDisk(int index, com.google.cloud.backupdr.v1beta.AttachedDisk value) { + if (diskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiskIsMutable(); + disk_.add(index, value); + onChanged(); + } else { + diskBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder addDisk(com.google.cloud.backupdr.v1beta.AttachedDisk.Builder builderForValue) { + if (diskBuilder_ == null) { + ensureDiskIsMutable(); + disk_.add(builderForValue.build()); + onChanged(); + } else { + diskBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder addDisk( + int index, com.google.cloud.backupdr.v1beta.AttachedDisk.Builder builderForValue) { + if (diskBuilder_ == null) { + ensureDiskIsMutable(); + disk_.add(index, builderForValue.build()); + onChanged(); + } else { + diskBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder addAllDisk( + java.lang.Iterable values) { + if (diskBuilder_ == null) { + ensureDiskIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, disk_); + onChanged(); + } else { + diskBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder clearDisk() { + if (diskBuilder_ == null) { + disk_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + diskBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public Builder removeDisk(int index) { + if (diskBuilder_ == null) { + ensureDiskIsMutable(); + disk_.remove(index); + onChanged(); + } else { + diskBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.Builder getDiskBuilder(int index) { + return internalGetDiskFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder getDiskOrBuilder(int index) { + if (diskBuilder_ == null) { + return disk_.get(index); + } else { + return diskBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public java.util.List + getDiskOrBuilderList() { + if (diskBuilder_ != null) { + return diskBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(disk_); + } + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.Builder addDiskBuilder() { + return internalGetDiskFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AttachedDisk.getDefaultInstance()); + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.Builder addDiskBuilder(int index) { + return internalGetDiskFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.AttachedDisk.getDefaultInstance()); + } + + /** + * + * + *
+     * An array of disks that are associated with the instances that are created
+     * from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + public java.util.List + getDiskBuilderList() { + return internalGetDiskFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk, + com.google.cloud.backupdr.v1beta.AttachedDisk.Builder, + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder> + internalGetDiskFieldBuilder() { + if (diskBuilder_ == null) { + diskBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk, + com.google.cloud.backupdr.v1beta.AttachedDisk.Builder, + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder>( + disk_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + disk_ = null; + } + return diskBuilder_; + } + + private com.google.cloud.backupdr.v1beta.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Metadata, + com.google.cloud.backupdr.v1beta.Metadata.Builder, + com.google.cloud.backupdr.v1beta.MetadataOrBuilder> + metadataBuilder_; + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + * + * @return The metadata. + */ + public com.google.cloud.backupdr.v1beta.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + public Builder setMetadata(com.google.cloud.backupdr.v1beta.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + public Builder setMetadata(com.google.cloud.backupdr.v1beta.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + public Builder mergeMetadata(com.google.cloud.backupdr.v1beta.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && metadata_ != null + && metadata_ != com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000040); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + public com.google.cloud.backupdr.v1beta.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + public com.google.cloud.backupdr.v1beta.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance() + : metadata_; + } + } + + /** + * + * + *
+     * The metadata key/value pairs to assign to instances that are created from
+     * these properties. These pairs can consist of custom metadata or predefined
+     * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+     * information.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Metadata, + com.google.cloud.backupdr.v1beta.Metadata.Builder, + com.google.cloud.backupdr.v1beta.MetadataOrBuilder> + internalGetMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Metadata, + com.google.cloud.backupdr.v1beta.Metadata.Builder, + com.google.cloud.backupdr.v1beta.MetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.util.List serviceAccount_ = + java.util.Collections.emptyList(); + + private void ensureServiceAccountIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + serviceAccount_ = + new java.util.ArrayList( + serviceAccount_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceAccount, + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder, + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder> + serviceAccountBuilder_; + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public java.util.List getServiceAccountList() { + if (serviceAccountBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceAccount_); + } else { + return serviceAccountBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public int getServiceAccountCount() { + if (serviceAccountBuilder_ == null) { + return serviceAccount_.size(); + } else { + return serviceAccountBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public com.google.cloud.backupdr.v1beta.ServiceAccount getServiceAccount(int index) { + if (serviceAccountBuilder_ == null) { + return serviceAccount_.get(index); + } else { + return serviceAccountBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder setServiceAccount( + int index, com.google.cloud.backupdr.v1beta.ServiceAccount value) { + if (serviceAccountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountIsMutable(); + serviceAccount_.set(index, value); + onChanged(); + } else { + serviceAccountBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder setServiceAccount( + int index, com.google.cloud.backupdr.v1beta.ServiceAccount.Builder builderForValue) { + if (serviceAccountBuilder_ == null) { + ensureServiceAccountIsMutable(); + serviceAccount_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder addServiceAccount(com.google.cloud.backupdr.v1beta.ServiceAccount value) { + if (serviceAccountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountIsMutable(); + serviceAccount_.add(value); + onChanged(); + } else { + serviceAccountBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder addServiceAccount( + int index, com.google.cloud.backupdr.v1beta.ServiceAccount value) { + if (serviceAccountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountIsMutable(); + serviceAccount_.add(index, value); + onChanged(); + } else { + serviceAccountBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder addServiceAccount( + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder builderForValue) { + if (serviceAccountBuilder_ == null) { + ensureServiceAccountIsMutable(); + serviceAccount_.add(builderForValue.build()); + onChanged(); + } else { + serviceAccountBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder addServiceAccount( + int index, com.google.cloud.backupdr.v1beta.ServiceAccount.Builder builderForValue) { + if (serviceAccountBuilder_ == null) { + ensureServiceAccountIsMutable(); + serviceAccount_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder addAllServiceAccount( + java.lang.Iterable values) { + if (serviceAccountBuilder_ == null) { + ensureServiceAccountIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceAccount_); + onChanged(); + } else { + serviceAccountBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder clearServiceAccount() { + if (serviceAccountBuilder_ == null) { + serviceAccount_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + serviceAccountBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public Builder removeServiceAccount(int index) { + if (serviceAccountBuilder_ == null) { + ensureServiceAccountIsMutable(); + serviceAccount_.remove(index); + onChanged(); + } else { + serviceAccountBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public com.google.cloud.backupdr.v1beta.ServiceAccount.Builder getServiceAccountBuilder( + int index) { + return internalGetServiceAccountFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder getServiceAccountOrBuilder( + int index) { + if (serviceAccountBuilder_ == null) { + return serviceAccount_.get(index); + } else { + return serviceAccountBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public java.util.List + getServiceAccountOrBuilderList() { + if (serviceAccountBuilder_ != null) { + return serviceAccountBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceAccount_); + } + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public com.google.cloud.backupdr.v1beta.ServiceAccount.Builder addServiceAccountBuilder() { + return internalGetServiceAccountFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.ServiceAccount.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public com.google.cloud.backupdr.v1beta.ServiceAccount.Builder addServiceAccountBuilder( + int index) { + return internalGetServiceAccountFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.ServiceAccount.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of service accounts with specified scopes. Access tokens for these
+     * service accounts are available to the instances that are created from
+     * these properties. Use metadata queries to obtain the access tokens for
+     * these instances.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + public java.util.List + getServiceAccountBuilderList() { + return internalGetServiceAccountFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceAccount, + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder, + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder> + internalGetServiceAccountFieldBuilder() { + if (serviceAccountBuilder_ == null) { + serviceAccountBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceAccount, + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder, + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder>( + serviceAccount_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + serviceAccount_ = null; + } + return serviceAccountBuilder_; + } + + private com.google.cloud.backupdr.v1beta.Scheduling scheduling_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling, + com.google.cloud.backupdr.v1beta.Scheduling.Builder, + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder> + schedulingBuilder_; + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + * + * @return Whether the scheduling field is set. + */ + public boolean hasScheduling() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + * + * @return The scheduling. + */ + public com.google.cloud.backupdr.v1beta.Scheduling getScheduling() { + if (schedulingBuilder_ == null) { + return scheduling_ == null + ? com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance() + : scheduling_; + } else { + return schedulingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + public Builder setScheduling(com.google.cloud.backupdr.v1beta.Scheduling value) { + if (schedulingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduling_ = value; + } else { + schedulingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + public Builder setScheduling( + com.google.cloud.backupdr.v1beta.Scheduling.Builder builderForValue) { + if (schedulingBuilder_ == null) { + scheduling_ = builderForValue.build(); + } else { + schedulingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + public Builder mergeScheduling(com.google.cloud.backupdr.v1beta.Scheduling value) { + if (schedulingBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && scheduling_ != null + && scheduling_ != com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance()) { + getSchedulingBuilder().mergeFrom(value); + } else { + scheduling_ = value; + } + } else { + schedulingBuilder_.mergeFrom(value); + } + if (scheduling_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + public Builder clearScheduling() { + bitField0_ = (bitField0_ & ~0x00000100); + scheduling_ = null; + if (schedulingBuilder_ != null) { + schedulingBuilder_.dispose(); + schedulingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + public com.google.cloud.backupdr.v1beta.Scheduling.Builder getSchedulingBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetSchedulingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + public com.google.cloud.backupdr.v1beta.SchedulingOrBuilder getSchedulingOrBuilder() { + if (schedulingBuilder_ != null) { + return schedulingBuilder_.getMessageOrBuilder(); + } else { + return scheduling_ == null + ? com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance() + : scheduling_; + } + } + + /** + * + * + *
+     * Specifies the scheduling options for the instances that are created from
+     * these properties.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling, + com.google.cloud.backupdr.v1beta.Scheduling.Builder, + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder> + internalGetSchedulingFieldBuilder() { + if (schedulingBuilder_ == null) { + schedulingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling, + com.google.cloud.backupdr.v1beta.Scheduling.Builder, + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder>( + getScheduling(), getParentForChildren(), isClean()); + scheduling_ = null; + } + return schedulingBuilder_; + } + + private java.util.List guestAccelerator_ = + java.util.Collections.emptyList(); + + private void ensureGuestAcceleratorIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + guestAccelerator_ = + new java.util.ArrayList( + guestAccelerator_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AcceleratorConfig, + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder, + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder> + guestAcceleratorBuilder_; + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public java.util.List + getGuestAcceleratorList() { + if (guestAcceleratorBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestAccelerator_); + } else { + return guestAcceleratorBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public int getGuestAcceleratorCount() { + if (guestAcceleratorBuilder_ == null) { + return guestAccelerator_.size(); + } else { + return guestAcceleratorBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfig getGuestAccelerator(int index) { + if (guestAcceleratorBuilder_ == null) { + return guestAccelerator_.get(index); + } else { + return guestAcceleratorBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder setGuestAccelerator( + int index, com.google.cloud.backupdr.v1beta.AcceleratorConfig value) { + if (guestAcceleratorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.set(index, value); + onChanged(); + } else { + guestAcceleratorBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder setGuestAccelerator( + int index, com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder builderForValue) { + if (guestAcceleratorBuilder_ == null) { + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.set(index, builderForValue.build()); + onChanged(); + } else { + guestAcceleratorBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder addGuestAccelerator(com.google.cloud.backupdr.v1beta.AcceleratorConfig value) { + if (guestAcceleratorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.add(value); + onChanged(); + } else { + guestAcceleratorBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder addGuestAccelerator( + int index, com.google.cloud.backupdr.v1beta.AcceleratorConfig value) { + if (guestAcceleratorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.add(index, value); + onChanged(); + } else { + guestAcceleratorBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder addGuestAccelerator( + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder builderForValue) { + if (guestAcceleratorBuilder_ == null) { + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.add(builderForValue.build()); + onChanged(); + } else { + guestAcceleratorBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder addGuestAccelerator( + int index, com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder builderForValue) { + if (guestAcceleratorBuilder_ == null) { + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.add(index, builderForValue.build()); + onChanged(); + } else { + guestAcceleratorBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder addAllGuestAccelerator( + java.lang.Iterable values) { + if (guestAcceleratorBuilder_ == null) { + ensureGuestAcceleratorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestAccelerator_); + onChanged(); + } else { + guestAcceleratorBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder clearGuestAccelerator() { + if (guestAcceleratorBuilder_ == null) { + guestAccelerator_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + guestAcceleratorBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public Builder removeGuestAccelerator(int index) { + if (guestAcceleratorBuilder_ == null) { + ensureGuestAcceleratorIsMutable(); + guestAccelerator_.remove(index); + onChanged(); + } else { + guestAcceleratorBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder getGuestAcceleratorBuilder( + int index) { + return internalGetGuestAcceleratorFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder getGuestAcceleratorOrBuilder( + int index) { + if (guestAcceleratorBuilder_ == null) { + return guestAccelerator_.get(index); + } else { + return guestAcceleratorBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public java.util.List + getGuestAcceleratorOrBuilderList() { + if (guestAcceleratorBuilder_ != null) { + return guestAcceleratorBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestAccelerator_); + } + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder addGuestAcceleratorBuilder() { + return internalGetGuestAcceleratorFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AcceleratorConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder addGuestAcceleratorBuilder( + int index) { + return internalGetGuestAcceleratorFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.AcceleratorConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of guest accelerator cards' type and count to use for instances
+     * created from these properties.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + public java.util.List + getGuestAcceleratorBuilderList() { + return internalGetGuestAcceleratorFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AcceleratorConfig, + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder, + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder> + internalGetGuestAcceleratorFieldBuilder() { + if (guestAcceleratorBuilder_ == null) { + guestAcceleratorBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AcceleratorConfig, + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder, + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder>( + guestAccelerator_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + guestAccelerator_ = null; + } + return guestAcceleratorBuilder_; + } + + private java.lang.Object minCpuPlatform_ = ""; + + /** + * + * + *
+     * Minimum cpu/platform to be used by instances. The instance may be
+     * scheduled on the specified or newer cpu/platform. Applicable values are the
+     * friendly names of CPU platforms, such as
+     * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+     * For more information, read
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * optional string min_cpu_platform = 11; + * + * @return Whether the minCpuPlatform field is set. + */ + public boolean hasMinCpuPlatform() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Minimum cpu/platform to be used by instances. The instance may be
+     * scheduled on the specified or newer cpu/platform. Applicable values are the
+     * friendly names of CPU platforms, such as
+     * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+     * For more information, read
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * optional string min_cpu_platform = 11; + * + * @return The minCpuPlatform. + */ + public java.lang.String getMinCpuPlatform() { + java.lang.Object ref = minCpuPlatform_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + minCpuPlatform_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Minimum cpu/platform to be used by instances. The instance may be
+     * scheduled on the specified or newer cpu/platform. Applicable values are the
+     * friendly names of CPU platforms, such as
+     * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+     * For more information, read
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * optional string min_cpu_platform = 11; + * + * @return The bytes for minCpuPlatform. + */ + public com.google.protobuf.ByteString getMinCpuPlatformBytes() { + java.lang.Object ref = minCpuPlatform_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + minCpuPlatform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Minimum cpu/platform to be used by instances. The instance may be
+     * scheduled on the specified or newer cpu/platform. Applicable values are the
+     * friendly names of CPU platforms, such as
+     * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+     * For more information, read
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * optional string min_cpu_platform = 11; + * + * @param value The minCpuPlatform to set. + * @return This builder for chaining. + */ + public Builder setMinCpuPlatform(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + minCpuPlatform_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Minimum cpu/platform to be used by instances. The instance may be
+     * scheduled on the specified or newer cpu/platform. Applicable values are the
+     * friendly names of CPU platforms, such as
+     * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+     * For more information, read
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * optional string min_cpu_platform = 11; + * + * @return This builder for chaining. + */ + public Builder clearMinCpuPlatform() { + minCpuPlatform_ = getDefaultInstance().getMinCpuPlatform(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Minimum cpu/platform to be used by instances. The instance may be
+     * scheduled on the specified or newer cpu/platform. Applicable values are the
+     * friendly names of CPU platforms, such as
+     * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+     * For more information, read
+     * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+     * 
+ * + * optional string min_cpu_platform = 11; + * + * @param value The bytes for minCpuPlatform to set. + * @return This builder for chaining. + */ + public Builder setMinCpuPlatformBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + minCpuPlatform_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private int keyRevocationActionType_ = 0; + + /** + * + * + *
+     * KeyRevocationActionType of the instance. Supported options are "STOP" and
+     * "NONE". The default value is "NONE" if it is not specified.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return Whether the keyRevocationActionType field is set. + */ + @java.lang.Override + public boolean hasKeyRevocationActionType() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * KeyRevocationActionType of the instance. Supported options are "STOP" and
+     * "NONE". The default value is "NONE" if it is not specified.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return The enum numeric value on the wire for keyRevocationActionType. + */ + @java.lang.Override + public int getKeyRevocationActionTypeValue() { + return keyRevocationActionType_; + } + + /** + * + * + *
+     * KeyRevocationActionType of the instance. Supported options are "STOP" and
+     * "NONE". The default value is "NONE" if it is not specified.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @param value The enum numeric value on the wire for keyRevocationActionType to set. + * @return This builder for chaining. + */ + public Builder setKeyRevocationActionTypeValue(int value) { + keyRevocationActionType_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * KeyRevocationActionType of the instance. Supported options are "STOP" and
+     * "NONE". The default value is "NONE" if it is not specified.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return The keyRevocationActionType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyRevocationActionType getKeyRevocationActionType() { + com.google.cloud.backupdr.v1beta.KeyRevocationActionType result = + com.google.cloud.backupdr.v1beta.KeyRevocationActionType.forNumber( + keyRevocationActionType_); + return result == null + ? com.google.cloud.backupdr.v1beta.KeyRevocationActionType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * KeyRevocationActionType of the instance. Supported options are "STOP" and
+     * "NONE". The default value is "NONE" if it is not specified.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @param value The keyRevocationActionType to set. + * @return This builder for chaining. + */ + public Builder setKeyRevocationActionType( + com.google.cloud.backupdr.v1beta.KeyRevocationActionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + keyRevocationActionType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * KeyRevocationActionType of the instance. Supported options are "STOP" and
+     * "NONE". The default value is "NONE" if it is not specified.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return This builder for chaining. + */ + public Builder clearKeyRevocationActionType() { + bitField0_ = (bitField0_ & ~0x00000800); + keyRevocationActionType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sourceInstance_ = ""; + + /** + * + * + *
+     * The source instance used to create this backup. This can be a partial or
+     * full URL to the resource. For example, the following are valid values:
+     * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+     * -projects/project/zones/zone/instances/instance
+     * 
+ * + * optional string source_instance = 13; + * + * @return Whether the sourceInstance field is set. + */ + public boolean hasSourceInstance() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * The source instance used to create this backup. This can be a partial or
+     * full URL to the resource. For example, the following are valid values:
+     * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+     * -projects/project/zones/zone/instances/instance
+     * 
+ * + * optional string source_instance = 13; + * + * @return The sourceInstance. + */ + public java.lang.String getSourceInstance() { + java.lang.Object ref = sourceInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The source instance used to create this backup. This can be a partial or
+     * full URL to the resource. For example, the following are valid values:
+     * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+     * -projects/project/zones/zone/instances/instance
+     * 
+ * + * optional string source_instance = 13; + * + * @return The bytes for sourceInstance. + */ + public com.google.protobuf.ByteString getSourceInstanceBytes() { + java.lang.Object ref = sourceInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The source instance used to create this backup. This can be a partial or
+     * full URL to the resource. For example, the following are valid values:
+     * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+     * -projects/project/zones/zone/instances/instance
+     * 
+ * + * optional string source_instance = 13; + * + * @param value The sourceInstance to set. + * @return This builder for chaining. + */ + public Builder setSourceInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceInstance_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * The source instance used to create this backup. This can be a partial or
+     * full URL to the resource. For example, the following are valid values:
+     * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+     * -projects/project/zones/zone/instances/instance
+     * 
+ * + * optional string source_instance = 13; + * + * @return This builder for chaining. + */ + public Builder clearSourceInstance() { + sourceInstance_ = getDefaultInstance().getSourceInstance(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + + /** + * + * + *
+     * The source instance used to create this backup. This can be a partial or
+     * full URL to the resource. For example, the following are valid values:
+     * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+     * -projects/project/zones/zone/instances/instance
+     * 
+ * + * optional string source_instance = 13; + * + * @param value The bytes for sourceInstance to set. + * @return This builder for chaining. + */ + public Builder setSourceInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceInstance_ = value; + bitField0_ |= 0x00001000; + 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_ |= 0x00002000; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Labels to apply to instances that are created from these properties.
+     * 
+ * + * map<string, string> labels = 14; + */ + @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(); + } + + /** + * + * + *
+     * Labels to apply to instances that are created from these properties.
+     * 
+ * + * map<string, string> labels = 14; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Labels to apply to instances that are created from these properties.
+     * 
+ * + * map<string, string> labels = 14; + */ + @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; + } + + /** + * + * + *
+     * Labels to apply to instances that are created from these properties.
+     * 
+ * + * map<string, string> labels = 14; + */ + @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_ & ~0x00002000); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Labels to apply to instances that are created from these properties.
+     * 
+ * + * map<string, string> labels = 14; + */ + 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_ |= 0x00002000; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Labels to apply to instances that are created from these properties.
+     * 
+ * + * map<string, string> labels = 14; + */ + 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_ |= 0x00002000; + return this; + } + + /** + * + * + *
+     * Labels to apply to instances that are created from these properties.
+     * 
+ * + * map<string, string> labels = 14; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00002000; + return this; + } + + private boolean guestFlush_; + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a compute backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + @java.lang.Override + public boolean getGuestFlush() { + return guestFlush_; + } + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a compute backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The guestFlush to set. + * @return This builder for chaining. + */ + public Builder setGuestFlush(boolean value) { + + guestFlush_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a compute backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGuestFlush() { + bitField0_ = (bitField0_ & ~0x00004000); + guestFlush_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + private static final com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties(); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeInstanceBackupProperties 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.backupdr.v1beta.ComputeInstanceBackupProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPropertiesOrBuilder.java new file mode 100644 index 000000000000..25a089fc3a3e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceBackupPropertiesOrBuilder.java @@ -0,0 +1,761 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ComputeInstanceBackupPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ComputeInstanceBackupProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An optional text description for the instances that are created from these
+   * properties.
+   * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + boolean hasDescription(); + + /** + * + * + *
+   * An optional text description for the instances that are created from these
+   * properties.
+   * 
+ * + * optional string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * An optional text description for the instances that are created from these
+   * properties.
+   * 
+ * + * optional string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * A list of tags to apply to the instances that are created from these
+   * properties. The tags identify valid sources or targets for network
+   * firewalls. The setTags method can modify this list of tags. Each tag within
+   * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + * + * @return Whether the tags field is set. + */ + boolean hasTags(); + + /** + * + * + *
+   * A list of tags to apply to the instances that are created from these
+   * properties. The tags identify valid sources or targets for network
+   * firewalls. The setTags method can modify this list of tags. Each tag within
+   * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + * + * @return The tags. + */ + com.google.cloud.backupdr.v1beta.Tags getTags(); + + /** + * + * + *
+   * A list of tags to apply to the instances that are created from these
+   * properties. The tags identify valid sources or targets for network
+   * firewalls. The setTags method can modify this list of tags. Each tag within
+   * the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt).
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Tags tags = 2; + */ + com.google.cloud.backupdr.v1beta.TagsOrBuilder getTagsOrBuilder(); + + /** + * + * + *
+   * The machine type to use for instances that are created from these
+   * properties.
+   * 
+ * + * optional string machine_type = 3; + * + * @return Whether the machineType field is set. + */ + boolean hasMachineType(); + + /** + * + * + *
+   * The machine type to use for instances that are created from these
+   * properties.
+   * 
+ * + * optional string machine_type = 3; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + + /** + * + * + *
+   * The machine type to use for instances that are created from these
+   * properties.
+   * 
+ * + * optional string machine_type = 3; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * Enables instances created based on these properties to send packets with
+   * source IP addresses other than their own and receive packets with
+   * destination IP addresses other than their own. If these instances will be
+   * used as an IP gateway or it will be set as the next-hop in a Route
+   * resource, specify `true`. If unsure, leave this set to `false`. See the
+   * https://cloud.google.com/vpc/docs/using-routes#canipforward
+   * documentation for more information.
+   * 
+ * + * optional bool can_ip_forward = 4; + * + * @return Whether the canIpForward field is set. + */ + boolean hasCanIpForward(); + + /** + * + * + *
+   * Enables instances created based on these properties to send packets with
+   * source IP addresses other than their own and receive packets with
+   * destination IP addresses other than their own. If these instances will be
+   * used as an IP gateway or it will be set as the next-hop in a Route
+   * resource, specify `true`. If unsure, leave this set to `false`. See the
+   * https://cloud.google.com/vpc/docs/using-routes#canipforward
+   * documentation for more information.
+   * 
+ * + * optional bool can_ip_forward = 4; + * + * @return The canIpForward. + */ + boolean getCanIpForward(); + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + java.util.List getNetworkInterfaceList(); + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + com.google.cloud.backupdr.v1beta.NetworkInterface getNetworkInterface(int index); + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + int getNetworkInterfaceCount(); + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + java.util.List + getNetworkInterfaceOrBuilderList(); + + /** + * + * + *
+   * An array of network access configurations for this interface.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interface = 5; + */ + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder getNetworkInterfaceOrBuilder( + int index); + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + java.util.List getDiskList(); + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + com.google.cloud.backupdr.v1beta.AttachedDisk getDisk(int index); + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + int getDiskCount(); + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + java.util.List + getDiskOrBuilderList(); + + /** + * + * + *
+   * An array of disks that are associated with the instances that are created
+   * from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disk = 6; + */ + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder getDiskOrBuilder(int index); + + /** + * + * + *
+   * The metadata key/value pairs to assign to instances that are created from
+   * these properties. These pairs can consist of custom metadata or predefined
+   * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+   * information.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
+   * The metadata key/value pairs to assign to instances that are created from
+   * these properties. These pairs can consist of custom metadata or predefined
+   * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+   * information.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + * + * @return The metadata. + */ + com.google.cloud.backupdr.v1beta.Metadata getMetadata(); + + /** + * + * + *
+   * The metadata key/value pairs to assign to instances that are created from
+   * these properties. These pairs can consist of custom metadata or predefined
+   * keys. See https://cloud.google.com/compute/docs/metadata/overview for more
+   * information.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 7; + */ + com.google.cloud.backupdr.v1beta.MetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + java.util.List getServiceAccountList(); + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + com.google.cloud.backupdr.v1beta.ServiceAccount getServiceAccount(int index); + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + int getServiceAccountCount(); + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + java.util.List + getServiceAccountOrBuilderList(); + + /** + * + * + *
+   * A list of service accounts with specified scopes. Access tokens for these
+   * service accounts are available to the instances that are created from
+   * these properties. Use metadata queries to obtain the access tokens for
+   * these instances.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_account = 8; + */ + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder getServiceAccountOrBuilder(int index); + + /** + * + * + *
+   * Specifies the scheduling options for the instances that are created from
+   * these properties.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + * + * @return Whether the scheduling field is set. + */ + boolean hasScheduling(); + + /** + * + * + *
+   * Specifies the scheduling options for the instances that are created from
+   * these properties.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + * + * @return The scheduling. + */ + com.google.cloud.backupdr.v1beta.Scheduling getScheduling(); + + /** + * + * + *
+   * Specifies the scheduling options for the instances that are created from
+   * these properties.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 9; + */ + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder getSchedulingOrBuilder(); + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + java.util.List getGuestAcceleratorList(); + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + com.google.cloud.backupdr.v1beta.AcceleratorConfig getGuestAccelerator(int index); + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + int getGuestAcceleratorCount(); + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + java.util.List + getGuestAcceleratorOrBuilderList(); + + /** + * + * + *
+   * A list of guest accelerator cards' type and count to use for instances
+   * created from these properties.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerator = 10; + */ + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder getGuestAcceleratorOrBuilder( + int index); + + /** + * + * + *
+   * Minimum cpu/platform to be used by instances. The instance may be
+   * scheduled on the specified or newer cpu/platform. Applicable values are the
+   * friendly names of CPU platforms, such as
+   * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+   * For more information, read
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * optional string min_cpu_platform = 11; + * + * @return Whether the minCpuPlatform field is set. + */ + boolean hasMinCpuPlatform(); + + /** + * + * + *
+   * Minimum cpu/platform to be used by instances. The instance may be
+   * scheduled on the specified or newer cpu/platform. Applicable values are the
+   * friendly names of CPU platforms, such as
+   * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+   * For more information, read
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * optional string min_cpu_platform = 11; + * + * @return The minCpuPlatform. + */ + java.lang.String getMinCpuPlatform(); + + /** + * + * + *
+   * Minimum cpu/platform to be used by instances. The instance may be
+   * scheduled on the specified or newer cpu/platform. Applicable values are the
+   * friendly names of CPU platforms, such as
+   * `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`.
+   * For more information, read
+   * https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.
+   * 
+ * + * optional string min_cpu_platform = 11; + * + * @return The bytes for minCpuPlatform. + */ + com.google.protobuf.ByteString getMinCpuPlatformBytes(); + + /** + * + * + *
+   * KeyRevocationActionType of the instance. Supported options are "STOP" and
+   * "NONE". The default value is "NONE" if it is not specified.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return Whether the keyRevocationActionType field is set. + */ + boolean hasKeyRevocationActionType(); + + /** + * + * + *
+   * KeyRevocationActionType of the instance. Supported options are "STOP" and
+   * "NONE". The default value is "NONE" if it is not specified.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return The enum numeric value on the wire for keyRevocationActionType. + */ + int getKeyRevocationActionTypeValue(); + + /** + * + * + *
+   * KeyRevocationActionType of the instance. Supported options are "STOP" and
+   * "NONE". The default value is "NONE" if it is not specified.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12; + * + * + * @return The keyRevocationActionType. + */ + com.google.cloud.backupdr.v1beta.KeyRevocationActionType getKeyRevocationActionType(); + + /** + * + * + *
+   * The source instance used to create this backup. This can be a partial or
+   * full URL to the resource. For example, the following are valid values:
+   * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+   * -projects/project/zones/zone/instances/instance
+   * 
+ * + * optional string source_instance = 13; + * + * @return Whether the sourceInstance field is set. + */ + boolean hasSourceInstance(); + + /** + * + * + *
+   * The source instance used to create this backup. This can be a partial or
+   * full URL to the resource. For example, the following are valid values:
+   * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+   * -projects/project/zones/zone/instances/instance
+   * 
+ * + * optional string source_instance = 13; + * + * @return The sourceInstance. + */ + java.lang.String getSourceInstance(); + + /** + * + * + *
+   * The source instance used to create this backup. This can be a partial or
+   * full URL to the resource. For example, the following are valid values:
+   * -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
+   * -projects/project/zones/zone/instances/instance
+   * 
+ * + * optional string source_instance = 13; + * + * @return The bytes for sourceInstance. + */ + com.google.protobuf.ByteString getSourceInstanceBytes(); + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Labels to apply to instances that are created from these properties.
+   * 
+ * + * map<string, string> labels = 14; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Indicates whether to perform a guest flush operation before
+   * taking a compute backup. When set to false, the system will create
+   * crash-consistent backups. Default value is false.
+   * 
+ * + * bool guest_flush = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + boolean getGuestFlush(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceDataSourceProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceDataSourceProperties.java new file mode 100644 index 000000000000..6a575ecdd6bf --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceDataSourceProperties.java @@ -0,0 +1,1183 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ComputeInstanceDataSourceProperties represents the properties of a
+ * ComputeEngine resource that are stored in the DataSource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties} + */ +@com.google.protobuf.Generated +public final class ComputeInstanceDataSourceProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + ComputeInstanceDataSourcePropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ComputeInstanceDataSourceProperties"); + } + + // Use ComputeInstanceDataSourceProperties.newBuilder() to construct. + private ComputeInstanceDataSourceProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ComputeInstanceDataSourceProperties() { + name_ = ""; + description_ = ""; + machineType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceDataSourceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceDataSourceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Name of the compute instance backed up by the datasource.
+   * 
+ * + * string name = 1; + * + * @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; + } + } + + /** + * + * + *
+   * Name of the compute instance backed up by the datasource.
+   * 
+ * + * string name = 1; + * + * @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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * The description of the Compute Engine instance.
+   * 
+ * + * string description = 2; + * + * @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; + } + } + + /** + * + * + *
+   * The description of the Compute Engine instance.
+   * 
+ * + * string description = 2; + * + * @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 MACHINE_TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineType_ = ""; + + /** + * + * + *
+   * The machine type of the instance.
+   * 
+ * + * string machine_type = 3; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + 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(); + machineType_ = s; + return s; + } + } + + /** + * + * + *
+   * The machine type of the instance.
+   * 
+ * + * string machine_type = 3; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_DISK_COUNT_FIELD_NUMBER = 4; + private long totalDiskCount_ = 0L; + + /** + * + * + *
+   * The total number of disks attached to the Instance.
+   * 
+ * + * int64 total_disk_count = 4; + * + * @return The totalDiskCount. + */ + @java.lang.Override + public long getTotalDiskCount() { + return totalDiskCount_; + } + + public static final int TOTAL_DISK_SIZE_GB_FIELD_NUMBER = 5; + private long totalDiskSizeGb_ = 0L; + + /** + * + * + *
+   * The sum of all the disk sizes.
+   * 
+ * + * int64 total_disk_size_gb = 5; + * + * @return The totalDiskSizeGb. + */ + @java.lang.Override + public long getTotalDiskSizeGb() { + return totalDiskSizeGb_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(machineType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, machineType_); + } + if (totalDiskCount_ != 0L) { + output.writeInt64(4, totalDiskCount_); + } + if (totalDiskSizeGb_ != 0L) { + output.writeInt64(5, totalDiskSizeGb_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(machineType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, machineType_); + } + if (totalDiskCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, totalDiskCount_); + } + if (totalDiskSizeGb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, totalDiskSizeGb_); + } + 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.backupdr.v1beta.ComputeInstanceDataSourceProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties other = + (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (getTotalDiskCount() != other.getTotalDiskCount()) return false; + if (getTotalDiskSizeGb() != other.getTotalDiskSizeGb()) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (37 * hash) + TOTAL_DISK_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalDiskCount()); + hash = (37 * hash) + TOTAL_DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalDiskSizeGb()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties 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.backupdr.v1beta.ComputeInstanceDataSourceProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties 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.backupdr.v1beta.ComputeInstanceDataSourceProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ComputeInstanceDataSourceProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ComputeInstanceDataSourceProperties represents the properties of a
+   * ComputeEngine resource that are stored in the DataSource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourcePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceDataSourceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceDataSourceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + machineType_ = ""; + totalDiskCount_ = 0L; + totalDiskSizeGb_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceDataSourceProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties build() { + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties buildPartial() { + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties result = + new com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.machineType_ = machineType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.totalDiskCount_ = totalDiskCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.totalDiskSizeGb_ = totalDiskSizeGb_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getTotalDiskCount() != 0L) { + setTotalDiskCount(other.getTotalDiskCount()); + } + if (other.getTotalDiskSizeGb() != 0L) { + setTotalDiskSizeGb(other.getTotalDiskSizeGb()); + } + 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 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + totalDiskCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + totalDiskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + 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_ = ""; + + /** + * + * + *
+     * Name of the compute instance backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + + /** + * + * + *
+     * Name of the compute instance backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + + /** + * + * + *
+     * Name of the compute instance backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @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; + } + + /** + * + * + *
+     * Name of the compute instance backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Name of the compute instance backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @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 java.lang.Object description_ = ""; + + /** + * + * + *
+     * The description of the Compute Engine instance.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + + /** + * + * + *
+     * The description of the Compute Engine instance.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + + /** + * + * + *
+     * The description of the Compute Engine instance.
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The description of the Compute Engine instance.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The description of the Compute Engine instance.
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + + /** + * + * + *
+     * The machine type of the instance.
+     * 
+ * + * string machine_type = 3; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The machine type of the instance.
+     * 
+ * + * string machine_type = 3; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The machine type of the instance.
+     * 
+ * + * string machine_type = 3; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The machine type of the instance.
+     * 
+ * + * string machine_type = 3; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + machineType_ = getDefaultInstance().getMachineType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The machine type of the instance.
+     * 
+ * + * string machine_type = 3; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long totalDiskCount_; + + /** + * + * + *
+     * The total number of disks attached to the Instance.
+     * 
+ * + * int64 total_disk_count = 4; + * + * @return The totalDiskCount. + */ + @java.lang.Override + public long getTotalDiskCount() { + return totalDiskCount_; + } + + /** + * + * + *
+     * The total number of disks attached to the Instance.
+     * 
+ * + * int64 total_disk_count = 4; + * + * @param value The totalDiskCount to set. + * @return This builder for chaining. + */ + public Builder setTotalDiskCount(long value) { + + totalDiskCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The total number of disks attached to the Instance.
+     * 
+ * + * int64 total_disk_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearTotalDiskCount() { + bitField0_ = (bitField0_ & ~0x00000008); + totalDiskCount_ = 0L; + onChanged(); + return this; + } + + private long totalDiskSizeGb_; + + /** + * + * + *
+     * The sum of all the disk sizes.
+     * 
+ * + * int64 total_disk_size_gb = 5; + * + * @return The totalDiskSizeGb. + */ + @java.lang.Override + public long getTotalDiskSizeGb() { + return totalDiskSizeGb_; + } + + /** + * + * + *
+     * The sum of all the disk sizes.
+     * 
+ * + * int64 total_disk_size_gb = 5; + * + * @param value The totalDiskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setTotalDiskSizeGb(long value) { + + totalDiskSizeGb_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The sum of all the disk sizes.
+     * 
+ * + * int64 total_disk_size_gb = 5; + * + * @return This builder for chaining. + */ + public Builder clearTotalDiskSizeGb() { + bitField0_ = (bitField0_ & ~0x00000010); + totalDiskSizeGb_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + private static final com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties(); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeInstanceDataSourceProperties 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.backupdr.v1beta.ComputeInstanceDataSourceProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceDataSourcePropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceDataSourcePropertiesOrBuilder.java new file mode 100644 index 000000000000..9f04ca63ca0c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceDataSourcePropertiesOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ComputeInstanceDataSourcePropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the compute instance backed up by the datasource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Name of the compute instance backed up by the datasource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The description of the Compute Engine instance.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * The description of the Compute Engine instance.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The machine type of the instance.
+   * 
+ * + * string machine_type = 3; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + + /** + * + * + *
+   * The machine type of the instance.
+   * 
+ * + * string machine_type = 3; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * The total number of disks attached to the Instance.
+   * 
+ * + * int64 total_disk_count = 4; + * + * @return The totalDiskCount. + */ + long getTotalDiskCount(); + + /** + * + * + *
+   * The sum of all the disk sizes.
+   * 
+ * + * int64 total_disk_size_gb = 5; + * + * @return The totalDiskSizeGb. + */ + long getTotalDiskSizeGb(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceRestoreProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceRestoreProperties.java new file mode 100644 index 000000000000..39cfa9f5d599 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceRestoreProperties.java @@ -0,0 +1,8843 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ComputeInstanceRestoreProperties represents Compute Engine instance
+ * properties to be overridden during restore.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties} + */ +@com.google.protobuf.Generated +public final class ComputeInstanceRestoreProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + ComputeInstanceRestorePropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ComputeInstanceRestoreProperties"); + } + + // Use ComputeInstanceRestoreProperties.newBuilder() to construct. + private ComputeInstanceRestoreProperties( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ComputeInstanceRestoreProperties() { + name_ = ""; + description_ = ""; + disks_ = java.util.Collections.emptyList(); + guestAccelerators_ = java.util.Collections.emptyList(); + hostname_ = ""; + keyRevocationActionType_ = 0; + machineType_ = ""; + minCpuPlatform_ = ""; + networkInterfaces_ = java.util.Collections.emptyList(); + privateIpv6GoogleAccess_ = 0; + resourcePolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + serviceAccounts_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceRestoreProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 13: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceRestoreProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.Builder.class); + } + + /** + * + * + *
+   * The private IPv6 google access type for the VMs.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess} + */ + public enum InstancePrivateIpv6GoogleAccess implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; + */ + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED(0), + /** + * + * + *
+     * Each network interface inherits PrivateIpv6GoogleAccess from its
+     * subnetwork.
+     * 
+ * + * INHERIT_FROM_SUBNETWORK = 1; + */ + INHERIT_FROM_SUBNETWORK(1), + /** + * + * + *
+     * Outbound private IPv6 access from VMs in this subnet to Google services.
+     * If specified, the subnetwork who is attached to the instance's default
+     * network interface will be assigned an internal IPv6 prefix if it doesn't
+     * have before.
+     * 
+ * + * ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2; + */ + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE(2), + /** + * + * + *
+     * Bidirectional private IPv6 access to/from Google services. If
+     * specified, the subnetwork who is attached to the instance's default
+     * network interface will be assigned an internal IPv6 prefix if it doesn't
+     * have before.
+     * 
+ * + * ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3; + */ + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InstancePrivateIpv6GoogleAccess"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; + */ + public static final int INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Each network interface inherits PrivateIpv6GoogleAccess from its
+     * subnetwork.
+     * 
+ * + * INHERIT_FROM_SUBNETWORK = 1; + */ + public static final int INHERIT_FROM_SUBNETWORK_VALUE = 1; + + /** + * + * + *
+     * Outbound private IPv6 access from VMs in this subnet to Google services.
+     * If specified, the subnetwork who is attached to the instance's default
+     * network interface will be assigned an internal IPv6 prefix if it doesn't
+     * have before.
+     * 
+ * + * ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2; + */ + public static final int ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE_VALUE = 2; + + /** + * + * + *
+     * Bidirectional private IPv6 access to/from Google services. If
+     * specified, the subnetwork who is attached to the instance's default
+     * network interface will be assigned an internal IPv6 prefix if it doesn't
+     * have before.
+     * 
+ * + * ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3; + */ + public static final int ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE_VALUE = 3; + + 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 InstancePrivateIpv6GoogleAccess 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 InstancePrivateIpv6GoogleAccess forNumber(int value) { + switch (value) { + case 0: + return INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED; + case 1: + return INHERIT_FROM_SUBNETWORK; + case 2: + return ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE; + case 3: + return ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE; + 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 InstancePrivateIpv6GoogleAccess findValueByNumber(int number) { + return InstancePrivateIpv6GoogleAccess.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final InstancePrivateIpv6GoogleAccess[] VALUES = values(); + + public static InstancePrivateIpv6GoogleAccess 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 InstancePrivateIpv6GoogleAccess(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the compute instance.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the name field is set. + */ + @java.lang.Override + public boolean hasName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Name of the compute instance.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Name of the compute instance.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 ADVANCED_MACHINE_FEATURES_FIELD_NUMBER = 2; + private com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures advancedMachineFeatures_; + + /** + * + * + *
+   * Optional. Controls for advanced machine-related behavior features.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedMachineFeatures field is set. + */ + @java.lang.Override + public boolean hasAdvancedMachineFeatures() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Controls for advanced machine-related behavior features.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedMachineFeatures. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures getAdvancedMachineFeatures() { + return advancedMachineFeatures_ == null + ? com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.getDefaultInstance() + : advancedMachineFeatures_; + } + + /** + * + * + *
+   * Optional. Controls for advanced machine-related behavior features.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AdvancedMachineFeaturesOrBuilder + getAdvancedMachineFeaturesOrBuilder() { + return advancedMachineFeatures_ == null + ? com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.getDefaultInstance() + : advancedMachineFeatures_; + } + + public static final int CAN_IP_FORWARD_FIELD_NUMBER = 3; + private boolean canIpForward_ = false; + + /** + * + * + *
+   * Optional. Allows this instance to send and receive packets with
+   * non-matching destination or source IPs.
+   * 
+ * + * optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the canIpForward field is set. + */ + @java.lang.Override + public boolean hasCanIpForward() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Allows this instance to send and receive packets with
+   * non-matching destination or source IPs.
+   * 
+ * + * optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + + public static final int CONFIDENTIAL_INSTANCE_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidentialInstanceConfig_; + + /** + * + * + *
+   * Optional. Controls Confidential compute options on the instance
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confidentialInstanceConfig field is set. + */ + @java.lang.Override + public boolean hasConfidentialInstanceConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Controls Confidential compute options on the instance
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confidentialInstanceConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig + getConfidentialInstanceConfig() { + return confidentialInstanceConfig_ == null + ? com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.getDefaultInstance() + : confidentialInstanceConfig_; + } + + /** + * + * + *
+   * Optional. Controls Confidential compute options on the instance
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfigOrBuilder + getConfidentialInstanceConfigOrBuilder() { + return confidentialInstanceConfig_ == null + ? com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.getDefaultInstance() + : confidentialInstanceConfig_; + } + + public static final int DELETION_PROTECTION_FIELD_NUMBER = 5; + private boolean deletionProtection_ = false; + + /** + * + * + *
+   * Optional. Whether the resource should be protected against deletion.
+   * 
+ * + * optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the deletionProtection field is set. + */ + @java.lang.Override + public boolean hasDeletionProtection() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Whether the resource should be protected against deletion.
+   * 
+ * + * optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deletionProtection. + */ + @java.lang.Override + public boolean getDeletionProtection() { + return deletionProtection_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 DISKS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List disks_; + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getDisksList() { + return disks_; + } + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getDisksOrBuilderList() { + return disks_; + } + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getDisksCount() { + return disks_.size(); + } + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDisk getDisks(int index) { + return disks_.get(index); + } + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder getDisksOrBuilder(int index) { + return disks_.get(index); + } + + public static final int DISPLAY_DEVICE_FIELD_NUMBER = 8; + private com.google.cloud.backupdr.v1beta.DisplayDevice displayDevice_; + + /** + * + * + *
+   * Optional. Enables display device for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the displayDevice field is set. + */ + @java.lang.Override + public boolean hasDisplayDevice() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. Enables display device for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The displayDevice. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DisplayDevice getDisplayDevice() { + return displayDevice_ == null + ? com.google.cloud.backupdr.v1beta.DisplayDevice.getDefaultInstance() + : displayDevice_; + } + + /** + * + * + *
+   * Optional. Enables display device for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DisplayDeviceOrBuilder getDisplayDeviceOrBuilder() { + return displayDevice_ == null + ? com.google.cloud.backupdr.v1beta.DisplayDevice.getDefaultInstance() + : displayDevice_; + } + + public static final int GUEST_ACCELERATORS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List guestAccelerators_; + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getGuestAcceleratorsList() { + return guestAccelerators_; + } + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getGuestAcceleratorsOrBuilderList() { + return guestAccelerators_; + } + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getGuestAcceleratorsCount() { + return guestAccelerators_.size(); + } + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AcceleratorConfig getGuestAccelerators(int index) { + return guestAccelerators_.get(index); + } + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder getGuestAcceleratorsOrBuilder( + int index) { + return guestAccelerators_.get(index); + } + + public static final int HOSTNAME_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object hostname_ = ""; + + /** + * + * + *
+   * Optional. Specifies the hostname of the instance. The specified hostname
+   * must be RFC1035 compliant. If hostname is not specified, the default
+   * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+   * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+   * DNS.
+   * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hostname field is set. + */ + @java.lang.Override + public boolean hasHostname() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the hostname of the instance. The specified hostname
+   * must be RFC1035 compliant. If hostname is not specified, the default
+   * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+   * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+   * DNS.
+   * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hostname. + */ + @java.lang.Override + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + 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(); + hostname_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Specifies the hostname of the instance. The specified hostname
+   * must be RFC1035 compliant. If hostname is not specified, the default
+   * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+   * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+   * DNS.
+   * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hostname. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_ENCRYPTION_KEY_FIELD_NUMBER = 11; + private com.google.cloud.backupdr.v1beta.CustomerEncryptionKey instanceEncryptionKey_; + + /** + * + * + *
+   * Optional. Encrypts suspended data for an instance with a
+   * customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instanceEncryptionKey field is set. + */ + @java.lang.Override + public boolean hasInstanceEncryptionKey() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. Encrypts suspended data for an instance with a
+   * customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instanceEncryptionKey. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getInstanceEncryptionKey() { + return instanceEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : instanceEncryptionKey_; + } + + /** + * + * + *
+   * Optional. Encrypts suspended data for an instance with a
+   * customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder + getInstanceEncryptionKeyOrBuilder() { + return instanceEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : instanceEncryptionKey_; + } + + public static final int KEY_REVOCATION_ACTION_TYPE_FIELD_NUMBER = 12; + private int keyRevocationActionType_ = 0; + + /** + * + * + *
+   * Optional. KeyRevocationActionType of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keyRevocationActionType field is set. + */ + @java.lang.Override + public boolean hasKeyRevocationActionType() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Optional. KeyRevocationActionType of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for keyRevocationActionType. + */ + @java.lang.Override + public int getKeyRevocationActionTypeValue() { + return keyRevocationActionType_; + } + + /** + * + * + *
+   * Optional. KeyRevocationActionType of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keyRevocationActionType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyRevocationActionType getKeyRevocationActionType() { + com.google.cloud.backupdr.v1beta.KeyRevocationActionType result = + com.google.cloud.backupdr.v1beta.KeyRevocationActionType.forNumber( + keyRevocationActionType_); + return result == null + ? com.google.cloud.backupdr.v1beta.KeyRevocationActionType.UNRECOGNIZED + : result; + } + + public static final int LABELS_FIELD_NUMBER = 13; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceRestoreProperties_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(); + } + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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 MACHINE_TYPE_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object machineType_ = ""; + + /** + * + * + *
+   * Optional. Full or partial URL of the machine type resource to use for this
+   * instance.
+   * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the machineType field is set. + */ + @java.lang.Override + public boolean hasMachineType() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+   * Optional. Full or partial URL of the machine type resource to use for this
+   * instance.
+   * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + 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(); + machineType_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Full or partial URL of the machine type resource to use for this
+   * instance.
+   * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 15; + private com.google.cloud.backupdr.v1beta.Metadata metadata_; + + /** + * + * + *
+   * Optional. This includes custom metadata and predefined keys.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+   * Optional. This includes custom metadata and predefined keys.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Metadata getMetadata() { + return metadata_ == null + ? com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance() + : metadata_; + } + + /** + * + * + *
+   * Optional. This includes custom metadata and predefined keys.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null + ? com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance() + : metadata_; + } + + public static final int MIN_CPU_PLATFORM_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private volatile java.lang.Object minCpuPlatform_ = ""; + + /** + * + * + *
+   * Optional. Minimum CPU platform to use for this instance.
+   * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minCpuPlatform field is set. + */ + @java.lang.Override + public boolean hasMinCpuPlatform() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+   * Optional. Minimum CPU platform to use for this instance.
+   * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minCpuPlatform. + */ + @java.lang.Override + public java.lang.String getMinCpuPlatform() { + java.lang.Object ref = minCpuPlatform_; + 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(); + minCpuPlatform_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Minimum CPU platform to use for this instance.
+   * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for minCpuPlatform. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMinCpuPlatformBytes() { + java.lang.Object ref = minCpuPlatform_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + minCpuPlatform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_INTERFACES_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private java.util.List networkInterfaces_; + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getNetworkInterfacesList() { + return networkInterfaces_; + } + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getNetworkInterfacesOrBuilderList() { + return networkInterfaces_; + } + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getNetworkInterfacesCount() { + return networkInterfaces_.size(); + } + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface getNetworkInterfaces(int index) { + return networkInterfaces_.get(index); + } + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder( + int index) { + return networkInterfaces_.get(index); + } + + public static final int NETWORK_PERFORMANCE_CONFIG_FIELD_NUMBER = 18; + private com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig networkPerformanceConfig_; + + /** + * + * + *
+   * Optional. Configure network performance such as egress bandwidth tier.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkPerformanceConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkPerformanceConfig() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+   * Optional. Configure network performance such as egress bandwidth tier.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkPerformanceConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig getNetworkPerformanceConfig() { + return networkPerformanceConfig_ == null + ? com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.getDefaultInstance() + : networkPerformanceConfig_; + } + + /** + * + * + *
+   * Optional. Configure network performance such as egress bandwidth tier.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfigOrBuilder + getNetworkPerformanceConfigOrBuilder() { + return networkPerformanceConfig_ == null + ? com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.getDefaultInstance() + : networkPerformanceConfig_; + } + + public static final int PARAMS_FIELD_NUMBER = 19; + private com.google.cloud.backupdr.v1beta.InstanceParams params_; + + /** + * + * + *
+   * Input only. Additional params passed with the request, but not persisted
+   * as part of resource payload.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the params field is set. + */ + @java.lang.Override + public boolean hasParams() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+   * Input only. Additional params passed with the request, but not persisted
+   * as part of resource payload.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The params. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InstanceParams getParams() { + return params_ == null + ? com.google.cloud.backupdr.v1beta.InstanceParams.getDefaultInstance() + : params_; + } + + /** + * + * + *
+   * Input only. Additional params passed with the request, but not persisted
+   * as part of resource payload.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InstanceParamsOrBuilder getParamsOrBuilder() { + return params_ == null + ? com.google.cloud.backupdr.v1beta.InstanceParams.getDefaultInstance() + : params_; + } + + public static final int PRIVATE_IPV6_GOOGLE_ACCESS_FIELD_NUMBER = 20; + private int privateIpv6GoogleAccess_ = 0; + + /** + * + * + *
+   * Optional. The private IPv6 google access type for the VM.
+   * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateIpv6GoogleAccess field is set. + */ + @java.lang.Override + public boolean hasPrivateIpv6GoogleAccess() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+   * Optional. The private IPv6 google access type for the VM.
+   * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for privateIpv6GoogleAccess. + */ + @java.lang.Override + public int getPrivateIpv6GoogleAccessValue() { + return privateIpv6GoogleAccess_; + } + + /** + * + * + *
+   * Optional. The private IPv6 google access type for the VM.
+   * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateIpv6GoogleAccess. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess + getPrivateIpv6GoogleAccess() { + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess + result = + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess.forNumber(privateIpv6GoogleAccess_); + return result == null + ? com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess.UNRECOGNIZED + : result; + } + + public static final int ALLOCATION_AFFINITY_FIELD_NUMBER = 21; + private com.google.cloud.backupdr.v1beta.AllocationAffinity allocationAffinity_; + + /** + * + * + *
+   * Optional. Specifies the reservations that this instance can consume from.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allocationAffinity field is set. + */ + @java.lang.Override + public boolean hasAllocationAffinity() { + return ((bitField0_ & 0x00010000) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the reservations that this instance can consume from.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allocationAffinity. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AllocationAffinity getAllocationAffinity() { + return allocationAffinity_ == null + ? com.google.cloud.backupdr.v1beta.AllocationAffinity.getDefaultInstance() + : allocationAffinity_; + } + + /** + * + * + *
+   * Optional. Specifies the reservations that this instance can consume from.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AllocationAffinityOrBuilder + getAllocationAffinityOrBuilder() { + return allocationAffinity_ == null + ? com.google.cloud.backupdr.v1beta.AllocationAffinity.getDefaultInstance() + : allocationAffinity_; + } + + public static final int RESOURCE_POLICIES_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList resourcePolicies_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Resource policies applied to this instance.
+   * By default, no resource policies will be applied.
+   * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the resourcePolicies. + */ + public com.google.protobuf.ProtocolStringList getResourcePoliciesList() { + return resourcePolicies_; + } + + /** + * + * + *
+   * Optional. Resource policies applied to this instance.
+   * By default, no resource policies will be applied.
+   * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of resourcePolicies. + */ + public int getResourcePoliciesCount() { + return resourcePolicies_.size(); + } + + /** + * + * + *
+   * Optional. Resource policies applied to this instance.
+   * By default, no resource policies will be applied.
+   * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The resourcePolicies at the given index. + */ + public java.lang.String getResourcePolicies(int index) { + return resourcePolicies_.get(index); + } + + /** + * + * + *
+   * Optional. Resource policies applied to this instance.
+   * By default, no resource policies will be applied.
+   * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the resourcePolicies at the given index. + */ + public com.google.protobuf.ByteString getResourcePoliciesBytes(int index) { + return resourcePolicies_.getByteString(index); + } + + public static final int SCHEDULING_FIELD_NUMBER = 23; + private com.google.cloud.backupdr.v1beta.Scheduling scheduling_; + + /** + * + * + *
+   * Optional. Sets the scheduling options for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduling field is set. + */ + @java.lang.Override + public boolean hasScheduling() { + return ((bitField0_ & 0x00020000) != 0); + } + + /** + * + * + *
+   * Optional. Sets the scheduling options for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduling. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling getScheduling() { + return scheduling_ == null + ? com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance() + : scheduling_; + } + + /** + * + * + *
+   * Optional. Sets the scheduling options for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.SchedulingOrBuilder getSchedulingOrBuilder() { + return scheduling_ == null + ? com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance() + : scheduling_; + } + + public static final int SERVICE_ACCOUNTS_FIELD_NUMBER = 24; + + @SuppressWarnings("serial") + private java.util.List serviceAccounts_; + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getServiceAccountsList() { + return serviceAccounts_; + } + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getServiceAccountsOrBuilderList() { + return serviceAccounts_; + } + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getServiceAccountsCount() { + return serviceAccounts_.size(); + } + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceAccount getServiceAccounts(int index) { + return serviceAccounts_.get(index); + } + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder getServiceAccountsOrBuilder( + int index) { + return serviceAccounts_.get(index); + } + + public static final int TAGS_FIELD_NUMBER = 26; + private com.google.cloud.backupdr.v1beta.Tags tags_; + + /** + * + * + *
+   * Optional. Tags to apply to this instance. Tags are used to identify valid
+   * sources or targets for network firewalls and are specified by the client
+   * during instance creation.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tags field is set. + */ + @java.lang.Override + public boolean hasTags() { + return ((bitField0_ & 0x00040000) != 0); + } + + /** + * + * + *
+   * Optional. Tags to apply to this instance. Tags are used to identify valid
+   * sources or targets for network firewalls and are specified by the client
+   * during instance creation.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tags. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Tags getTags() { + return tags_ == null ? com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance() : tags_; + } + + /** + * + * + *
+   * Optional. Tags to apply to this instance. Tags are used to identify valid
+   * sources or targets for network firewalls and are specified by the client
+   * during instance creation.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TagsOrBuilder getTagsOrBuilder() { + return tags_ == null ? com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance() : tags_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAdvancedMachineFeatures()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(3, canIpForward_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getConfidentialInstanceConfig()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeBool(5, deletionProtection_); + } + if (((bitField0_ & 0x00000020) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + for (int i = 0; i < disks_.size(); i++) { + output.writeMessage(7, disks_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(8, getDisplayDevice()); + } + for (int i = 0; i < guestAccelerators_.size(); i++) { + output.writeMessage(9, guestAccelerators_.get(i)); + } + if (((bitField0_ & 0x00000080) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, hostname_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(11, getInstanceEncryptionKey()); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeEnum(12, keyRevocationActionType_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 13); + if (((bitField0_ & 0x00000400) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, machineType_); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(15, getMetadata()); + } + if (((bitField0_ & 0x00001000) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 16, minCpuPlatform_); + } + for (int i = 0; i < networkInterfaces_.size(); i++) { + output.writeMessage(17, networkInterfaces_.get(i)); + } + if (((bitField0_ & 0x00002000) != 0)) { + output.writeMessage(18, getNetworkPerformanceConfig()); + } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeMessage(19, getParams()); + } + if (((bitField0_ & 0x00008000) != 0)) { + output.writeEnum(20, privateIpv6GoogleAccess_); + } + if (((bitField0_ & 0x00010000) != 0)) { + output.writeMessage(21, getAllocationAffinity()); + } + for (int i = 0; i < resourcePolicies_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 22, resourcePolicies_.getRaw(i)); + } + if (((bitField0_ & 0x00020000) != 0)) { + output.writeMessage(23, getScheduling()); + } + for (int i = 0; i < serviceAccounts_.size(); i++) { + output.writeMessage(24, serviceAccounts_.get(i)); + } + if (((bitField0_ & 0x00040000) != 0)) { + output.writeMessage(26, getTags()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAdvancedMachineFeatures()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, canIpForward_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getConfidentialInstanceConfig()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, deletionProtection_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + for (int i = 0; i < disks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, disks_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDisplayDevice()); + } + for (int i = 0; i < guestAccelerators_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, guestAccelerators_.get(i)); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, hostname_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, getInstanceEncryptionKey()); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, keyRevocationActionType_); + } + 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(13, labels__); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, machineType_); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getMetadata()); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(16, minCpuPlatform_); + } + for (int i = 0; i < networkInterfaces_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(17, networkInterfaces_.get(i)); + } + if (((bitField0_ & 0x00002000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getNetworkPerformanceConfig()); + } + if (((bitField0_ & 0x00004000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getParams()); + } + if (((bitField0_ & 0x00008000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, privateIpv6GoogleAccess_); + } + if (((bitField0_ & 0x00010000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getAllocationAffinity()); + } + { + int dataSize = 0; + for (int i = 0; i < resourcePolicies_.size(); i++) { + dataSize += computeStringSizeNoTag(resourcePolicies_.getRaw(i)); + } + size += dataSize; + size += 2 * getResourcePoliciesList().size(); + } + if (((bitField0_ & 0x00020000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getScheduling()); + } + for (int i = 0; i < serviceAccounts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, serviceAccounts_.get(i)); + } + if (((bitField0_ & 0x00040000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getTags()); + } + 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.backupdr.v1beta.ComputeInstanceRestoreProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties other = + (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) obj; + + if (hasName() != other.hasName()) return false; + if (hasName()) { + if (!getName().equals(other.getName())) return false; + } + if (hasAdvancedMachineFeatures() != other.hasAdvancedMachineFeatures()) return false; + if (hasAdvancedMachineFeatures()) { + if (!getAdvancedMachineFeatures().equals(other.getAdvancedMachineFeatures())) return false; + } + if (hasCanIpForward() != other.hasCanIpForward()) return false; + if (hasCanIpForward()) { + if (getCanIpForward() != other.getCanIpForward()) return false; + } + if (hasConfidentialInstanceConfig() != other.hasConfidentialInstanceConfig()) return false; + if (hasConfidentialInstanceConfig()) { + if (!getConfidentialInstanceConfig().equals(other.getConfidentialInstanceConfig())) + return false; + } + if (hasDeletionProtection() != other.hasDeletionProtection()) return false; + if (hasDeletionProtection()) { + if (getDeletionProtection() != other.getDeletionProtection()) return false; + } + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription().equals(other.getDescription())) return false; + } + if (!getDisksList().equals(other.getDisksList())) return false; + if (hasDisplayDevice() != other.hasDisplayDevice()) return false; + if (hasDisplayDevice()) { + if (!getDisplayDevice().equals(other.getDisplayDevice())) return false; + } + if (!getGuestAcceleratorsList().equals(other.getGuestAcceleratorsList())) return false; + if (hasHostname() != other.hasHostname()) return false; + if (hasHostname()) { + if (!getHostname().equals(other.getHostname())) return false; + } + if (hasInstanceEncryptionKey() != other.hasInstanceEncryptionKey()) return false; + if (hasInstanceEncryptionKey()) { + if (!getInstanceEncryptionKey().equals(other.getInstanceEncryptionKey())) return false; + } + if (hasKeyRevocationActionType() != other.hasKeyRevocationActionType()) return false; + if (hasKeyRevocationActionType()) { + if (keyRevocationActionType_ != other.keyRevocationActionType_) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasMachineType() != other.hasMachineType()) return false; + if (hasMachineType()) { + if (!getMachineType().equals(other.getMachineType())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (hasMinCpuPlatform() != other.hasMinCpuPlatform()) return false; + if (hasMinCpuPlatform()) { + if (!getMinCpuPlatform().equals(other.getMinCpuPlatform())) return false; + } + if (!getNetworkInterfacesList().equals(other.getNetworkInterfacesList())) return false; + if (hasNetworkPerformanceConfig() != other.hasNetworkPerformanceConfig()) return false; + if (hasNetworkPerformanceConfig()) { + if (!getNetworkPerformanceConfig().equals(other.getNetworkPerformanceConfig())) return false; + } + if (hasParams() != other.hasParams()) return false; + if (hasParams()) { + if (!getParams().equals(other.getParams())) return false; + } + if (hasPrivateIpv6GoogleAccess() != other.hasPrivateIpv6GoogleAccess()) return false; + if (hasPrivateIpv6GoogleAccess()) { + if (privateIpv6GoogleAccess_ != other.privateIpv6GoogleAccess_) return false; + } + if (hasAllocationAffinity() != other.hasAllocationAffinity()) return false; + if (hasAllocationAffinity()) { + if (!getAllocationAffinity().equals(other.getAllocationAffinity())) return false; + } + if (!getResourcePoliciesList().equals(other.getResourcePoliciesList())) return false; + if (hasScheduling() != other.hasScheduling()) return false; + if (hasScheduling()) { + if (!getScheduling().equals(other.getScheduling())) return false; + } + if (!getServiceAccountsList().equals(other.getServiceAccountsList())) return false; + if (hasTags() != other.hasTags()) return false; + if (hasTags()) { + if (!getTags().equals(other.getTags())) 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 (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + if (hasAdvancedMachineFeatures()) { + hash = (37 * hash) + ADVANCED_MACHINE_FEATURES_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedMachineFeatures().hashCode(); + } + if (hasCanIpForward()) { + hash = (37 * hash) + CAN_IP_FORWARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCanIpForward()); + } + if (hasConfidentialInstanceConfig()) { + hash = (37 * hash) + CONFIDENTIAL_INSTANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfidentialInstanceConfig().hashCode(); + } + if (hasDeletionProtection()) { + hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletionProtection()); + } + if (hasDescription()) { + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + } + if (getDisksCount() > 0) { + hash = (37 * hash) + DISKS_FIELD_NUMBER; + hash = (53 * hash) + getDisksList().hashCode(); + } + if (hasDisplayDevice()) { + hash = (37 * hash) + DISPLAY_DEVICE_FIELD_NUMBER; + hash = (53 * hash) + getDisplayDevice().hashCode(); + } + if (getGuestAcceleratorsCount() > 0) { + hash = (37 * hash) + GUEST_ACCELERATORS_FIELD_NUMBER; + hash = (53 * hash) + getGuestAcceleratorsList().hashCode(); + } + if (hasHostname()) { + hash = (37 * hash) + HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getHostname().hashCode(); + } + if (hasInstanceEncryptionKey()) { + hash = (37 * hash) + INSTANCE_ENCRYPTION_KEY_FIELD_NUMBER; + hash = (53 * hash) + getInstanceEncryptionKey().hashCode(); + } + if (hasKeyRevocationActionType()) { + hash = (37 * hash) + KEY_REVOCATION_ACTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + keyRevocationActionType_; + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasMachineType()) { + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (hasMinCpuPlatform()) { + hash = (37 * hash) + MIN_CPU_PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getMinCpuPlatform().hashCode(); + } + if (getNetworkInterfacesCount() > 0) { + hash = (37 * hash) + NETWORK_INTERFACES_FIELD_NUMBER; + hash = (53 * hash) + getNetworkInterfacesList().hashCode(); + } + if (hasNetworkPerformanceConfig()) { + hash = (37 * hash) + NETWORK_PERFORMANCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkPerformanceConfig().hashCode(); + } + if (hasParams()) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getParams().hashCode(); + } + if (hasPrivateIpv6GoogleAccess()) { + hash = (37 * hash) + PRIVATE_IPV6_GOOGLE_ACCESS_FIELD_NUMBER; + hash = (53 * hash) + privateIpv6GoogleAccess_; + } + if (hasAllocationAffinity()) { + hash = (37 * hash) + ALLOCATION_AFFINITY_FIELD_NUMBER; + hash = (53 * hash) + getAllocationAffinity().hashCode(); + } + if (getResourcePoliciesCount() > 0) { + hash = (37 * hash) + RESOURCE_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getResourcePoliciesList().hashCode(); + } + if (hasScheduling()) { + hash = (37 * hash) + SCHEDULING_FIELD_NUMBER; + hash = (53 * hash) + getScheduling().hashCode(); + } + if (getServiceAccountsCount() > 0) { + hash = (37 * hash) + SERVICE_ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountsList().hashCode(); + } + if (hasTags()) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTags().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties 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.backupdr.v1beta.ComputeInstanceRestoreProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties 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.backupdr.v1beta.ComputeInstanceRestoreProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ComputeInstanceRestoreProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ComputeInstanceRestoreProperties represents Compute Engine instance
+   * properties to be overridden during restore.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + com.google.cloud.backupdr.v1beta.ComputeInstanceRestorePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceRestoreProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 13: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 13: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceRestoreProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAdvancedMachineFeaturesFieldBuilder(); + internalGetConfidentialInstanceConfigFieldBuilder(); + internalGetDisksFieldBuilder(); + internalGetDisplayDeviceFieldBuilder(); + internalGetGuestAcceleratorsFieldBuilder(); + internalGetInstanceEncryptionKeyFieldBuilder(); + internalGetMetadataFieldBuilder(); + internalGetNetworkInterfacesFieldBuilder(); + internalGetNetworkPerformanceConfigFieldBuilder(); + internalGetParamsFieldBuilder(); + internalGetAllocationAffinityFieldBuilder(); + internalGetSchedulingFieldBuilder(); + internalGetServiceAccountsFieldBuilder(); + internalGetTagsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + advancedMachineFeatures_ = null; + if (advancedMachineFeaturesBuilder_ != null) { + advancedMachineFeaturesBuilder_.dispose(); + advancedMachineFeaturesBuilder_ = null; + } + canIpForward_ = false; + confidentialInstanceConfig_ = null; + if (confidentialInstanceConfigBuilder_ != null) { + confidentialInstanceConfigBuilder_.dispose(); + confidentialInstanceConfigBuilder_ = null; + } + deletionProtection_ = false; + description_ = ""; + if (disksBuilder_ == null) { + disks_ = java.util.Collections.emptyList(); + } else { + disks_ = null; + disksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + displayDevice_ = null; + if (displayDeviceBuilder_ != null) { + displayDeviceBuilder_.dispose(); + displayDeviceBuilder_ = null; + } + if (guestAcceleratorsBuilder_ == null) { + guestAccelerators_ = java.util.Collections.emptyList(); + } else { + guestAccelerators_ = null; + guestAcceleratorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + hostname_ = ""; + instanceEncryptionKey_ = null; + if (instanceEncryptionKeyBuilder_ != null) { + instanceEncryptionKeyBuilder_.dispose(); + instanceEncryptionKeyBuilder_ = null; + } + keyRevocationActionType_ = 0; + internalGetMutableLabels().clear(); + machineType_ = ""; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + minCpuPlatform_ = ""; + if (networkInterfacesBuilder_ == null) { + networkInterfaces_ = java.util.Collections.emptyList(); + } else { + networkInterfaces_ = null; + networkInterfacesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00010000); + networkPerformanceConfig_ = null; + if (networkPerformanceConfigBuilder_ != null) { + networkPerformanceConfigBuilder_.dispose(); + networkPerformanceConfigBuilder_ = null; + } + params_ = null; + if (paramsBuilder_ != null) { + paramsBuilder_.dispose(); + paramsBuilder_ = null; + } + privateIpv6GoogleAccess_ = 0; + allocationAffinity_ = null; + if (allocationAffinityBuilder_ != null) { + allocationAffinityBuilder_.dispose(); + allocationAffinityBuilder_ = null; + } + resourcePolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + scheduling_ = null; + if (schedulingBuilder_ != null) { + schedulingBuilder_.dispose(); + schedulingBuilder_ = null; + } + if (serviceAccountsBuilder_ == null) { + serviceAccounts_ = java.util.Collections.emptyList(); + } else { + serviceAccounts_ = null; + serviceAccountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00800000); + tags_ = null; + if (tagsBuilder_ != null) { + tagsBuilder_.dispose(); + tagsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceRestoreProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties build() { + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties buildPartial() { + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties result = + new com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties result) { + if (disksBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + disks_ = java.util.Collections.unmodifiableList(disks_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.disks_ = disks_; + } else { + result.disks_ = disksBuilder_.build(); + } + if (guestAcceleratorsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + guestAccelerators_ = java.util.Collections.unmodifiableList(guestAccelerators_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.guestAccelerators_ = guestAccelerators_; + } else { + result.guestAccelerators_ = guestAcceleratorsBuilder_.build(); + } + if (networkInterfacesBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0)) { + networkInterfaces_ = java.util.Collections.unmodifiableList(networkInterfaces_); + bitField0_ = (bitField0_ & ~0x00010000); + } + result.networkInterfaces_ = networkInterfaces_; + } else { + result.networkInterfaces_ = networkInterfacesBuilder_.build(); + } + if (serviceAccountsBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0)) { + serviceAccounts_ = java.util.Collections.unmodifiableList(serviceAccounts_); + bitField0_ = (bitField0_ & ~0x00800000); + } + result.serviceAccounts_ = serviceAccounts_; + } else { + result.serviceAccounts_ = serviceAccountsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.advancedMachineFeatures_ = + advancedMachineFeaturesBuilder_ == null + ? advancedMachineFeatures_ + : advancedMachineFeaturesBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.canIpForward_ = canIpForward_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.confidentialInstanceConfig_ = + confidentialInstanceConfigBuilder_ == null + ? confidentialInstanceConfig_ + : confidentialInstanceConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deletionProtection_ = deletionProtection_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.displayDevice_ = + displayDeviceBuilder_ == null ? displayDevice_ : displayDeviceBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.hostname_ = hostname_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.instanceEncryptionKey_ = + instanceEncryptionKeyBuilder_ == null + ? instanceEncryptionKey_ + : instanceEncryptionKeyBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.keyRevocationActionType_ = keyRevocationActionType_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.machineType_ = machineType_; + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.minCpuPlatform_ = minCpuPlatform_; + to_bitField0_ |= 0x00001000; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.networkPerformanceConfig_ = + networkPerformanceConfigBuilder_ == null + ? networkPerformanceConfig_ + : networkPerformanceConfigBuilder_.build(); + to_bitField0_ |= 0x00002000; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.params_ = paramsBuilder_ == null ? params_ : paramsBuilder_.build(); + to_bitField0_ |= 0x00004000; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.privateIpv6GoogleAccess_ = privateIpv6GoogleAccess_; + to_bitField0_ |= 0x00008000; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.allocationAffinity_ = + allocationAffinityBuilder_ == null + ? allocationAffinity_ + : allocationAffinityBuilder_.build(); + to_bitField0_ |= 0x00010000; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + resourcePolicies_.makeImmutable(); + result.resourcePolicies_ = resourcePolicies_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.scheduling_ = schedulingBuilder_ == null ? scheduling_ : schedulingBuilder_.build(); + to_bitField0_ |= 0x00020000; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.tags_ = tagsBuilder_ == null ? tags_ : tagsBuilder_.build(); + to_bitField0_ |= 0x00040000; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties other) { + if (other + == com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.getDefaultInstance()) + return this; + if (other.hasName()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAdvancedMachineFeatures()) { + mergeAdvancedMachineFeatures(other.getAdvancedMachineFeatures()); + } + if (other.hasCanIpForward()) { + setCanIpForward(other.getCanIpForward()); + } + if (other.hasConfidentialInstanceConfig()) { + mergeConfidentialInstanceConfig(other.getConfidentialInstanceConfig()); + } + if (other.hasDeletionProtection()) { + setDeletionProtection(other.getDeletionProtection()); + } + if (other.hasDescription()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (disksBuilder_ == null) { + if (!other.disks_.isEmpty()) { + if (disks_.isEmpty()) { + disks_ = other.disks_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureDisksIsMutable(); + disks_.addAll(other.disks_); + } + onChanged(); + } + } else { + if (!other.disks_.isEmpty()) { + if (disksBuilder_.isEmpty()) { + disksBuilder_.dispose(); + disksBuilder_ = null; + disks_ = other.disks_; + bitField0_ = (bitField0_ & ~0x00000040); + disksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDisksFieldBuilder() + : null; + } else { + disksBuilder_.addAllMessages(other.disks_); + } + } + } + if (other.hasDisplayDevice()) { + mergeDisplayDevice(other.getDisplayDevice()); + } + if (guestAcceleratorsBuilder_ == null) { + if (!other.guestAccelerators_.isEmpty()) { + if (guestAccelerators_.isEmpty()) { + guestAccelerators_ = other.guestAccelerators_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.addAll(other.guestAccelerators_); + } + onChanged(); + } + } else { + if (!other.guestAccelerators_.isEmpty()) { + if (guestAcceleratorsBuilder_.isEmpty()) { + guestAcceleratorsBuilder_.dispose(); + guestAcceleratorsBuilder_ = null; + guestAccelerators_ = other.guestAccelerators_; + bitField0_ = (bitField0_ & ~0x00000100); + guestAcceleratorsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGuestAcceleratorsFieldBuilder() + : null; + } else { + guestAcceleratorsBuilder_.addAllMessages(other.guestAccelerators_); + } + } + } + if (other.hasHostname()) { + hostname_ = other.hostname_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.hasInstanceEncryptionKey()) { + mergeInstanceEncryptionKey(other.getInstanceEncryptionKey()); + } + if (other.hasKeyRevocationActionType()) { + setKeyRevocationActionTypeValue(other.getKeyRevocationActionTypeValue()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00001000; + if (other.hasMachineType()) { + machineType_ = other.machineType_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.hasMinCpuPlatform()) { + minCpuPlatform_ = other.minCpuPlatform_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (networkInterfacesBuilder_ == null) { + if (!other.networkInterfaces_.isEmpty()) { + if (networkInterfaces_.isEmpty()) { + networkInterfaces_ = other.networkInterfaces_; + bitField0_ = (bitField0_ & ~0x00010000); + } else { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.addAll(other.networkInterfaces_); + } + onChanged(); + } + } else { + if (!other.networkInterfaces_.isEmpty()) { + if (networkInterfacesBuilder_.isEmpty()) { + networkInterfacesBuilder_.dispose(); + networkInterfacesBuilder_ = null; + networkInterfaces_ = other.networkInterfaces_; + bitField0_ = (bitField0_ & ~0x00010000); + networkInterfacesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetNetworkInterfacesFieldBuilder() + : null; + } else { + networkInterfacesBuilder_.addAllMessages(other.networkInterfaces_); + } + } + } + if (other.hasNetworkPerformanceConfig()) { + mergeNetworkPerformanceConfig(other.getNetworkPerformanceConfig()); + } + if (other.hasParams()) { + mergeParams(other.getParams()); + } + if (other.hasPrivateIpv6GoogleAccess()) { + setPrivateIpv6GoogleAccessValue(other.getPrivateIpv6GoogleAccessValue()); + } + if (other.hasAllocationAffinity()) { + mergeAllocationAffinity(other.getAllocationAffinity()); + } + if (!other.resourcePolicies_.isEmpty()) { + if (resourcePolicies_.isEmpty()) { + resourcePolicies_ = other.resourcePolicies_; + bitField0_ |= 0x00200000; + } else { + ensureResourcePoliciesIsMutable(); + resourcePolicies_.addAll(other.resourcePolicies_); + } + onChanged(); + } + if (other.hasScheduling()) { + mergeScheduling(other.getScheduling()); + } + if (serviceAccountsBuilder_ == null) { + if (!other.serviceAccounts_.isEmpty()) { + if (serviceAccounts_.isEmpty()) { + serviceAccounts_ = other.serviceAccounts_; + bitField0_ = (bitField0_ & ~0x00800000); + } else { + ensureServiceAccountsIsMutable(); + serviceAccounts_.addAll(other.serviceAccounts_); + } + onChanged(); + } + } else { + if (!other.serviceAccounts_.isEmpty()) { + if (serviceAccountsBuilder_.isEmpty()) { + serviceAccountsBuilder_.dispose(); + serviceAccountsBuilder_ = null; + serviceAccounts_ = other.serviceAccounts_; + bitField0_ = (bitField0_ & ~0x00800000); + serviceAccountsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetServiceAccountsFieldBuilder() + : null; + } else { + serviceAccountsBuilder_.addAllMessages(other.serviceAccounts_); + } + } + } + if (other.hasTags()) { + mergeTags(other.getTags()); + } + 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 18: + { + input.readMessage( + internalGetAdvancedMachineFeaturesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + canIpForward_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage( + internalGetConfidentialInstanceConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + deletionProtection_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.cloud.backupdr.v1beta.AttachedDisk m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AttachedDisk.parser(), extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetDisplayDeviceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + com.google.cloud.backupdr.v1beta.AcceleratorConfig m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AcceleratorConfig.parser(), + extensionRegistry); + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(m); + } else { + guestAcceleratorsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + hostname_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetInstanceEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: + { + keyRevocationActionType_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 106: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + input.readMessage( + internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: + { + minCpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: + { + com.google.cloud.backupdr.v1beta.NetworkInterface m = + input.readMessage( + com.google.cloud.backupdr.v1beta.NetworkInterface.parser(), + extensionRegistry); + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.add(m); + } else { + networkInterfacesBuilder_.addMessage(m); + } + break; + } // case 138 + case 146: + { + input.readMessage( + internalGetNetworkPerformanceConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + case 154: + { + input.readMessage(internalGetParamsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 160: + { + privateIpv6GoogleAccess_ = input.readEnum(); + bitField0_ |= 0x00080000; + break; + } // case 160 + case 170: + { + input.readMessage( + internalGetAllocationAffinityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 170 + case 178: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 178 + case 186: + { + input.readMessage( + internalGetSchedulingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 194: + { + com.google.cloud.backupdr.v1beta.ServiceAccount m = + input.readMessage( + com.google.cloud.backupdr.v1beta.ServiceAccount.parser(), + extensionRegistry); + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + serviceAccounts_.add(m); + } else { + serviceAccountsBuilder_.addMessage(m); + } + break; + } // case 194 + case 210: + { + input.readMessage(internalGetTagsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 210 + 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. Name of the compute instance.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the name field is set. + */ + public boolean hasName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Name of the compute instance.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Name of the compute instance.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Name of the compute instance.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Name of the compute instance.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the compute instance.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures advancedMachineFeatures_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures, + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.Builder, + com.google.cloud.backupdr.v1beta.AdvancedMachineFeaturesOrBuilder> + advancedMachineFeaturesBuilder_; + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedMachineFeatures field is set. + */ + public boolean hasAdvancedMachineFeatures() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedMachineFeatures. + */ + public com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures getAdvancedMachineFeatures() { + if (advancedMachineFeaturesBuilder_ == null) { + return advancedMachineFeatures_ == null + ? com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.getDefaultInstance() + : advancedMachineFeatures_; + } else { + return advancedMachineFeaturesBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvancedMachineFeatures( + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures value) { + if (advancedMachineFeaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedMachineFeatures_ = value; + } else { + advancedMachineFeaturesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvancedMachineFeatures( + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.Builder builderForValue) { + if (advancedMachineFeaturesBuilder_ == null) { + advancedMachineFeatures_ = builderForValue.build(); + } else { + advancedMachineFeaturesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAdvancedMachineFeatures( + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures value) { + if (advancedMachineFeaturesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && advancedMachineFeatures_ != null + && advancedMachineFeatures_ + != com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.getDefaultInstance()) { + getAdvancedMachineFeaturesBuilder().mergeFrom(value); + } else { + advancedMachineFeatures_ = value; + } + } else { + advancedMachineFeaturesBuilder_.mergeFrom(value); + } + if (advancedMachineFeatures_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdvancedMachineFeatures() { + bitField0_ = (bitField0_ & ~0x00000002); + advancedMachineFeatures_ = null; + if (advancedMachineFeaturesBuilder_ != null) { + advancedMachineFeaturesBuilder_.dispose(); + advancedMachineFeaturesBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.Builder + getAdvancedMachineFeaturesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetAdvancedMachineFeaturesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AdvancedMachineFeaturesOrBuilder + getAdvancedMachineFeaturesOrBuilder() { + if (advancedMachineFeaturesBuilder_ != null) { + return advancedMachineFeaturesBuilder_.getMessageOrBuilder(); + } else { + return advancedMachineFeatures_ == null + ? com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.getDefaultInstance() + : advancedMachineFeatures_; + } + } + + /** + * + * + *
+     * Optional. Controls for advanced machine-related behavior features.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures, + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.Builder, + com.google.cloud.backupdr.v1beta.AdvancedMachineFeaturesOrBuilder> + internalGetAdvancedMachineFeaturesFieldBuilder() { + if (advancedMachineFeaturesBuilder_ == null) { + advancedMachineFeaturesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures, + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures.Builder, + com.google.cloud.backupdr.v1beta.AdvancedMachineFeaturesOrBuilder>( + getAdvancedMachineFeatures(), getParentForChildren(), isClean()); + advancedMachineFeatures_ = null; + } + return advancedMachineFeaturesBuilder_; + } + + private boolean canIpForward_; + + /** + * + * + *
+     * Optional. Allows this instance to send and receive packets with
+     * non-matching destination or source IPs.
+     * 
+ * + * optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the canIpForward field is set. + */ + @java.lang.Override + public boolean hasCanIpForward() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Allows this instance to send and receive packets with
+     * non-matching destination or source IPs.
+     * 
+ * + * optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The canIpForward. + */ + @java.lang.Override + public boolean getCanIpForward() { + return canIpForward_; + } + + /** + * + * + *
+     * Optional. Allows this instance to send and receive packets with
+     * non-matching destination or source IPs.
+     * 
+ * + * optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The canIpForward to set. + * @return This builder for chaining. + */ + public Builder setCanIpForward(boolean value) { + + canIpForward_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Allows this instance to send and receive packets with
+     * non-matching destination or source IPs.
+     * 
+ * + * optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCanIpForward() { + bitField0_ = (bitField0_ & ~0x00000004); + canIpForward_ = false; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidentialInstanceConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig, + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.Builder, + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfigOrBuilder> + confidentialInstanceConfigBuilder_; + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confidentialInstanceConfig field is set. + */ + public boolean hasConfidentialInstanceConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confidentialInstanceConfig. + */ + public com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig + getConfidentialInstanceConfig() { + if (confidentialInstanceConfigBuilder_ == null) { + return confidentialInstanceConfig_ == null + ? com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.getDefaultInstance() + : confidentialInstanceConfig_; + } else { + return confidentialInstanceConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConfidentialInstanceConfig( + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig value) { + if (confidentialInstanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + confidentialInstanceConfig_ = value; + } else { + confidentialInstanceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConfidentialInstanceConfig( + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.Builder builderForValue) { + if (confidentialInstanceConfigBuilder_ == null) { + confidentialInstanceConfig_ = builderForValue.build(); + } else { + confidentialInstanceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeConfidentialInstanceConfig( + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig value) { + if (confidentialInstanceConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && confidentialInstanceConfig_ != null + && confidentialInstanceConfig_ + != com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig + .getDefaultInstance()) { + getConfidentialInstanceConfigBuilder().mergeFrom(value); + } else { + confidentialInstanceConfig_ = value; + } + } else { + confidentialInstanceConfigBuilder_.mergeFrom(value); + } + if (confidentialInstanceConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConfidentialInstanceConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + confidentialInstanceConfig_ = null; + if (confidentialInstanceConfigBuilder_ != null) { + confidentialInstanceConfigBuilder_.dispose(); + confidentialInstanceConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.Builder + getConfidentialInstanceConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetConfidentialInstanceConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfigOrBuilder + getConfidentialInstanceConfigOrBuilder() { + if (confidentialInstanceConfigBuilder_ != null) { + return confidentialInstanceConfigBuilder_.getMessageOrBuilder(); + } else { + return confidentialInstanceConfig_ == null + ? com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.getDefaultInstance() + : confidentialInstanceConfig_; + } + } + + /** + * + * + *
+     * Optional. Controls Confidential compute options on the instance
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig, + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.Builder, + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfigOrBuilder> + internalGetConfidentialInstanceConfigFieldBuilder() { + if (confidentialInstanceConfigBuilder_ == null) { + confidentialInstanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig, + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.Builder, + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfigOrBuilder>( + getConfidentialInstanceConfig(), getParentForChildren(), isClean()); + confidentialInstanceConfig_ = null; + } + return confidentialInstanceConfigBuilder_; + } + + private boolean deletionProtection_; + + /** + * + * + *
+     * Optional. Whether the resource should be protected against deletion.
+     * 
+ * + * optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the deletionProtection field is set. + */ + @java.lang.Override + public boolean hasDeletionProtection() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. Whether the resource should be protected against deletion.
+     * 
+ * + * optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deletionProtection. + */ + @java.lang.Override + public boolean getDeletionProtection() { + return deletionProtection_; + } + + /** + * + * + *
+     * Optional. Whether the resource should be protected against deletion.
+     * 
+ * + * optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The deletionProtection to set. + * @return This builder for chaining. + */ + public Builder setDeletionProtection(boolean value) { + + deletionProtection_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether the resource should be protected against deletion.
+     * 
+ * + * optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDeletionProtection() { + bitField0_ = (bitField0_ & ~0x00000010); + deletionProtection_ = false; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List disks_ = + java.util.Collections.emptyList(); + + private void ensureDisksIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + disks_ = new java.util.ArrayList(disks_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk, + com.google.cloud.backupdr.v1beta.AttachedDisk.Builder, + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder> + disksBuilder_; + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getDisksList() { + if (disksBuilder_ == null) { + return java.util.Collections.unmodifiableList(disks_); + } else { + return disksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getDisksCount() { + if (disksBuilder_ == null) { + return disks_.size(); + } else { + return disksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk getDisks(int index) { + if (disksBuilder_ == null) { + return disks_.get(index); + } else { + return disksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDisks(int index, com.google.cloud.backupdr.v1beta.AttachedDisk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.set(index, value); + onChanged(); + } else { + disksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDisks( + int index, com.google.cloud.backupdr.v1beta.AttachedDisk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.set(index, builderForValue.build()); + onChanged(); + } else { + disksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDisks(com.google.cloud.backupdr.v1beta.AttachedDisk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.add(value); + onChanged(); + } else { + disksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDisks(int index, com.google.cloud.backupdr.v1beta.AttachedDisk value) { + if (disksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDisksIsMutable(); + disks_.add(index, value); + onChanged(); + } else { + disksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDisks(com.google.cloud.backupdr.v1beta.AttachedDisk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(builderForValue.build()); + onChanged(); + } else { + disksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDisks( + int index, com.google.cloud.backupdr.v1beta.AttachedDisk.Builder builderForValue) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(index, builderForValue.build()); + onChanged(); + } else { + disksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllDisks( + java.lang.Iterable values) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, disks_); + onChanged(); + } else { + disksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDisks() { + if (disksBuilder_ == null) { + disks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + disksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeDisks(int index) { + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.remove(index); + onChanged(); + } else { + disksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.Builder getDisksBuilder(int index) { + return internalGetDisksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder getDisksOrBuilder(int index) { + if (disksBuilder_ == null) { + return disks_.get(index); + } else { + return disksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDisksOrBuilderList() { + if (disksBuilder_ != null) { + return disksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(disks_); + } + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.Builder addDisksBuilder() { + return internalGetDisksFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AttachedDisk.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AttachedDisk.Builder addDisksBuilder(int index) { + return internalGetDisksFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.AttachedDisk.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Array of disks associated with this instance. Persistent disks
+     * must be created before you can assign them. Source regional persistent
+     * disks will be restored with default replica zones if not specified.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDisksBuilderList() { + return internalGetDisksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk, + com.google.cloud.backupdr.v1beta.AttachedDisk.Builder, + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder> + internalGetDisksFieldBuilder() { + if (disksBuilder_ == null) { + disksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AttachedDisk, + com.google.cloud.backupdr.v1beta.AttachedDisk.Builder, + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder>( + disks_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + disks_ = null; + } + return disksBuilder_; + } + + private com.google.cloud.backupdr.v1beta.DisplayDevice displayDevice_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DisplayDevice, + com.google.cloud.backupdr.v1beta.DisplayDevice.Builder, + com.google.cloud.backupdr.v1beta.DisplayDeviceOrBuilder> + displayDeviceBuilder_; + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the displayDevice field is set. + */ + public boolean hasDisplayDevice() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The displayDevice. + */ + public com.google.cloud.backupdr.v1beta.DisplayDevice getDisplayDevice() { + if (displayDeviceBuilder_ == null) { + return displayDevice_ == null + ? com.google.cloud.backupdr.v1beta.DisplayDevice.getDefaultInstance() + : displayDevice_; + } else { + return displayDeviceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDisplayDevice(com.google.cloud.backupdr.v1beta.DisplayDevice value) { + if (displayDeviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + displayDevice_ = value; + } else { + displayDeviceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDisplayDevice( + com.google.cloud.backupdr.v1beta.DisplayDevice.Builder builderForValue) { + if (displayDeviceBuilder_ == null) { + displayDevice_ = builderForValue.build(); + } else { + displayDeviceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDisplayDevice(com.google.cloud.backupdr.v1beta.DisplayDevice value) { + if (displayDeviceBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && displayDevice_ != null + && displayDevice_ + != com.google.cloud.backupdr.v1beta.DisplayDevice.getDefaultInstance()) { + getDisplayDeviceBuilder().mergeFrom(value); + } else { + displayDevice_ = value; + } + } else { + displayDeviceBuilder_.mergeFrom(value); + } + if (displayDevice_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDisplayDevice() { + bitField0_ = (bitField0_ & ~0x00000080); + displayDevice_ = null; + if (displayDeviceBuilder_ != null) { + displayDeviceBuilder_.dispose(); + displayDeviceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.DisplayDevice.Builder getDisplayDeviceBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetDisplayDeviceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.DisplayDeviceOrBuilder getDisplayDeviceOrBuilder() { + if (displayDeviceBuilder_ != null) { + return displayDeviceBuilder_.getMessageOrBuilder(); + } else { + return displayDevice_ == null + ? com.google.cloud.backupdr.v1beta.DisplayDevice.getDefaultInstance() + : displayDevice_; + } + } + + /** + * + * + *
+     * Optional. Enables display device for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DisplayDevice, + com.google.cloud.backupdr.v1beta.DisplayDevice.Builder, + com.google.cloud.backupdr.v1beta.DisplayDeviceOrBuilder> + internalGetDisplayDeviceFieldBuilder() { + if (displayDeviceBuilder_ == null) { + displayDeviceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DisplayDevice, + com.google.cloud.backupdr.v1beta.DisplayDevice.Builder, + com.google.cloud.backupdr.v1beta.DisplayDeviceOrBuilder>( + getDisplayDevice(), getParentForChildren(), isClean()); + displayDevice_ = null; + } + return displayDeviceBuilder_; + } + + private java.util.List guestAccelerators_ = + java.util.Collections.emptyList(); + + private void ensureGuestAcceleratorsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + guestAccelerators_ = + new java.util.ArrayList( + guestAccelerators_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AcceleratorConfig, + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder, + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder> + guestAcceleratorsBuilder_; + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGuestAcceleratorsList() { + if (guestAcceleratorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestAccelerators_); + } else { + return guestAcceleratorsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getGuestAcceleratorsCount() { + if (guestAcceleratorsBuilder_ == null) { + return guestAccelerators_.size(); + } else { + return guestAcceleratorsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfig getGuestAccelerators(int index) { + if (guestAcceleratorsBuilder_ == null) { + return guestAccelerators_.get(index); + } else { + return guestAcceleratorsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGuestAccelerators( + int index, com.google.cloud.backupdr.v1beta.AcceleratorConfig value) { + if (guestAcceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.set(index, value); + onChanged(); + } else { + guestAcceleratorsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGuestAccelerators( + int index, com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder builderForValue) { + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.set(index, builderForValue.build()); + onChanged(); + } else { + guestAcceleratorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestAccelerators(com.google.cloud.backupdr.v1beta.AcceleratorConfig value) { + if (guestAcceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(value); + onChanged(); + } else { + guestAcceleratorsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestAccelerators( + int index, com.google.cloud.backupdr.v1beta.AcceleratorConfig value) { + if (guestAcceleratorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(index, value); + onChanged(); + } else { + guestAcceleratorsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestAccelerators( + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder builderForValue) { + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(builderForValue.build()); + onChanged(); + } else { + guestAcceleratorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestAccelerators( + int index, com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder builderForValue) { + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(index, builderForValue.build()); + onChanged(); + } else { + guestAcceleratorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllGuestAccelerators( + java.lang.Iterable values) { + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestAccelerators_); + onChanged(); + } else { + guestAcceleratorsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGuestAccelerators() { + if (guestAcceleratorsBuilder_ == null) { + guestAccelerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + guestAcceleratorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeGuestAccelerators(int index) { + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.remove(index); + onChanged(); + } else { + guestAcceleratorsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder getGuestAcceleratorsBuilder( + int index) { + return internalGetGuestAcceleratorsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder + getGuestAcceleratorsOrBuilder(int index) { + if (guestAcceleratorsBuilder_ == null) { + return guestAccelerators_.get(index); + } else { + return guestAcceleratorsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGuestAcceleratorsOrBuilderList() { + if (guestAcceleratorsBuilder_ != null) { + return guestAcceleratorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestAccelerators_); + } + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder + addGuestAcceleratorsBuilder() { + return internalGetGuestAcceleratorsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AcceleratorConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder addGuestAcceleratorsBuilder( + int index) { + return internalGetGuestAcceleratorsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.AcceleratorConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of the type and count of accelerator cards attached to the
+     * instance.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGuestAcceleratorsBuilderList() { + return internalGetGuestAcceleratorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AcceleratorConfig, + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder, + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder> + internalGetGuestAcceleratorsFieldBuilder() { + if (guestAcceleratorsBuilder_ == null) { + guestAcceleratorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AcceleratorConfig, + com.google.cloud.backupdr.v1beta.AcceleratorConfig.Builder, + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder>( + guestAccelerators_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + guestAccelerators_ = null; + } + return guestAcceleratorsBuilder_; + } + + private java.lang.Object hostname_ = ""; + + /** + * + * + *
+     * Optional. Specifies the hostname of the instance. The specified hostname
+     * must be RFC1035 compliant. If hostname is not specified, the default
+     * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+     * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+     * DNS.
+     * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hostname field is set. + */ + public boolean hasHostname() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the hostname of the instance. The specified hostname
+     * must be RFC1035 compliant. If hostname is not specified, the default
+     * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+     * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+     * DNS.
+     * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hostname. + */ + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Specifies the hostname of the instance. The specified hostname
+     * must be RFC1035 compliant. If hostname is not specified, the default
+     * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+     * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+     * DNS.
+     * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hostname. + */ + public com.google.protobuf.ByteString getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Specifies the hostname of the instance. The specified hostname
+     * must be RFC1035 compliant. If hostname is not specified, the default
+     * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+     * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+     * DNS.
+     * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The hostname to set. + * @return This builder for chaining. + */ + public Builder setHostname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hostname_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the hostname of the instance. The specified hostname
+     * must be RFC1035 compliant. If hostname is not specified, the default
+     * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+     * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+     * DNS.
+     * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHostname() { + hostname_ = getDefaultInstance().getHostname(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the hostname of the instance. The specified hostname
+     * must be RFC1035 compliant. If hostname is not specified, the default
+     * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+     * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+     * DNS.
+     * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for hostname to set. + * @return This builder for chaining. + */ + public Builder setHostnameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hostname_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.CustomerEncryptionKey instanceEncryptionKey_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder> + instanceEncryptionKeyBuilder_; + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instanceEncryptionKey field is set. + */ + public boolean hasInstanceEncryptionKey() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instanceEncryptionKey. + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getInstanceEncryptionKey() { + if (instanceEncryptionKeyBuilder_ == null) { + return instanceEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : instanceEncryptionKey_; + } else { + return instanceEncryptionKeyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstanceEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey value) { + if (instanceEncryptionKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceEncryptionKey_ = value; + } else { + instanceEncryptionKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInstanceEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder builderForValue) { + if (instanceEncryptionKeyBuilder_ == null) { + instanceEncryptionKey_ = builderForValue.build(); + } else { + instanceEncryptionKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInstanceEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey value) { + if (instanceEncryptionKeyBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && instanceEncryptionKey_ != null + && instanceEncryptionKey_ + != com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance()) { + getInstanceEncryptionKeyBuilder().mergeFrom(value); + } else { + instanceEncryptionKey_ = value; + } + } else { + instanceEncryptionKeyBuilder_.mergeFrom(value); + } + if (instanceEncryptionKey_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInstanceEncryptionKey() { + bitField0_ = (bitField0_ & ~0x00000400); + instanceEncryptionKey_ = null; + if (instanceEncryptionKeyBuilder_ != null) { + instanceEncryptionKeyBuilder_.dispose(); + instanceEncryptionKeyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder + getInstanceEncryptionKeyBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetInstanceEncryptionKeyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder + getInstanceEncryptionKeyOrBuilder() { + if (instanceEncryptionKeyBuilder_ != null) { + return instanceEncryptionKeyBuilder_.getMessageOrBuilder(); + } else { + return instanceEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : instanceEncryptionKey_; + } + } + + /** + * + * + *
+     * Optional. Encrypts suspended data for an instance with a
+     * customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder> + internalGetInstanceEncryptionKeyFieldBuilder() { + if (instanceEncryptionKeyBuilder_ == null) { + instanceEncryptionKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder>( + getInstanceEncryptionKey(), getParentForChildren(), isClean()); + instanceEncryptionKey_ = null; + } + return instanceEncryptionKeyBuilder_; + } + + private int keyRevocationActionType_ = 0; + + /** + * + * + *
+     * Optional. KeyRevocationActionType of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keyRevocationActionType field is set. + */ + @java.lang.Override + public boolean hasKeyRevocationActionType() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Optional. KeyRevocationActionType of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for keyRevocationActionType. + */ + @java.lang.Override + public int getKeyRevocationActionTypeValue() { + return keyRevocationActionType_; + } + + /** + * + * + *
+     * Optional. KeyRevocationActionType of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for keyRevocationActionType to set. + * @return This builder for chaining. + */ + public Builder setKeyRevocationActionTypeValue(int value) { + keyRevocationActionType_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. KeyRevocationActionType of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keyRevocationActionType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyRevocationActionType getKeyRevocationActionType() { + com.google.cloud.backupdr.v1beta.KeyRevocationActionType result = + com.google.cloud.backupdr.v1beta.KeyRevocationActionType.forNumber( + keyRevocationActionType_); + return result == null + ? com.google.cloud.backupdr.v1beta.KeyRevocationActionType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. KeyRevocationActionType of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The keyRevocationActionType to set. + * @return This builder for chaining. + */ + public Builder setKeyRevocationActionType( + com.google.cloud.backupdr.v1beta.KeyRevocationActionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + keyRevocationActionType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. KeyRevocationActionType of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearKeyRevocationActionType() { + bitField0_ = (bitField0_ & ~0x00000800); + keyRevocationActionType_ = 0; + 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_ |= 0x00001000; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels to apply to this instance.
+     * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+     * Optional. Labels to apply to this instance.
+     * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels to apply to this instance.
+     * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Labels to apply to this instance.
+     * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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_ & ~0x00001000); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels to apply to this instance.
+     * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00001000; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels to apply to this instance.
+     * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00001000; + return this; + } + + /** + * + * + *
+     * Optional. Labels to apply to this instance.
+     * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00001000; + return this; + } + + private java.lang.Object machineType_ = ""; + + /** + * + * + *
+     * Optional. Full or partial URL of the machine type resource to use for this
+     * instance.
+     * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the machineType field is set. + */ + public boolean hasMachineType() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+     * Optional. Full or partial URL of the machine type resource to use for this
+     * instance.
+     * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Full or partial URL of the machine type resource to use for this
+     * instance.
+     * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Full or partial URL of the machine type resource to use for this
+     * instance.
+     * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + machineType_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Full or partial URL of the machine type resource to use for this
+     * instance.
+     * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + machineType_ = getDefaultInstance().getMachineType(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Full or partial URL of the machine type resource to use for this
+     * instance.
+     * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + machineType_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Metadata, + com.google.cloud.backupdr.v1beta.Metadata.Builder, + com.google.cloud.backupdr.v1beta.MetadataOrBuilder> + metadataBuilder_; + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + public com.google.cloud.backupdr.v1beta.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetadata(com.google.cloud.backupdr.v1beta.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetadata(com.google.cloud.backupdr.v1beta.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMetadata(com.google.cloud.backupdr.v1beta.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && metadata_ != null + && metadata_ != com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00004000); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return internalGetMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance() + : metadata_; + } + } + + /** + * + * + *
+     * Optional. This includes custom metadata and predefined keys.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Metadata, + com.google.cloud.backupdr.v1beta.Metadata.Builder, + com.google.cloud.backupdr.v1beta.MetadataOrBuilder> + internalGetMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Metadata, + com.google.cloud.backupdr.v1beta.Metadata.Builder, + com.google.cloud.backupdr.v1beta.MetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private java.lang.Object minCpuPlatform_ = ""; + + /** + * + * + *
+     * Optional. Minimum CPU platform to use for this instance.
+     * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minCpuPlatform field is set. + */ + public boolean hasMinCpuPlatform() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+     * Optional. Minimum CPU platform to use for this instance.
+     * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minCpuPlatform. + */ + public java.lang.String getMinCpuPlatform() { + java.lang.Object ref = minCpuPlatform_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + minCpuPlatform_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Minimum CPU platform to use for this instance.
+     * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for minCpuPlatform. + */ + public com.google.protobuf.ByteString getMinCpuPlatformBytes() { + java.lang.Object ref = minCpuPlatform_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + minCpuPlatform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Minimum CPU platform to use for this instance.
+     * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minCpuPlatform to set. + * @return This builder for chaining. + */ + public Builder setMinCpuPlatform(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + minCpuPlatform_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Minimum CPU platform to use for this instance.
+     * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinCpuPlatform() { + minCpuPlatform_ = getDefaultInstance().getMinCpuPlatform(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Minimum CPU platform to use for this instance.
+     * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for minCpuPlatform to set. + * @return This builder for chaining. + */ + public Builder setMinCpuPlatformBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + minCpuPlatform_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private java.util.List networkInterfaces_ = + java.util.Collections.emptyList(); + + private void ensureNetworkInterfacesIsMutable() { + if (!((bitField0_ & 0x00010000) != 0)) { + networkInterfaces_ = + new java.util.ArrayList( + networkInterfaces_); + bitField0_ |= 0x00010000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkInterface, + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder, + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder> + networkInterfacesBuilder_; + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getNetworkInterfacesList() { + if (networkInterfacesBuilder_ == null) { + return java.util.Collections.unmodifiableList(networkInterfaces_); + } else { + return networkInterfacesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getNetworkInterfacesCount() { + if (networkInterfacesBuilder_ == null) { + return networkInterfaces_.size(); + } else { + return networkInterfacesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkInterface getNetworkInterfaces(int index) { + if (networkInterfacesBuilder_ == null) { + return networkInterfaces_.get(index); + } else { + return networkInterfacesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkInterfaces( + int index, com.google.cloud.backupdr.v1beta.NetworkInterface value) { + if (networkInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.set(index, value); + onChanged(); + } else { + networkInterfacesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkInterfaces( + int index, com.google.cloud.backupdr.v1beta.NetworkInterface.Builder builderForValue) { + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.set(index, builderForValue.build()); + onChanged(); + } else { + networkInterfacesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNetworkInterfaces(com.google.cloud.backupdr.v1beta.NetworkInterface value) { + if (networkInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.add(value); + onChanged(); + } else { + networkInterfacesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNetworkInterfaces( + int index, com.google.cloud.backupdr.v1beta.NetworkInterface value) { + if (networkInterfacesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.add(index, value); + onChanged(); + } else { + networkInterfacesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNetworkInterfaces( + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder builderForValue) { + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.add(builderForValue.build()); + onChanged(); + } else { + networkInterfacesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNetworkInterfaces( + int index, com.google.cloud.backupdr.v1beta.NetworkInterface.Builder builderForValue) { + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.add(index, builderForValue.build()); + onChanged(); + } else { + networkInterfacesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllNetworkInterfaces( + java.lang.Iterable values) { + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkInterfaces_); + onChanged(); + } else { + networkInterfacesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNetworkInterfaces() { + if (networkInterfacesBuilder_ == null) { + networkInterfaces_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + } else { + networkInterfacesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeNetworkInterfaces(int index) { + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.remove(index); + onChanged(); + } else { + networkInterfacesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkInterface.Builder getNetworkInterfacesBuilder( + int index) { + return internalGetNetworkInterfacesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder( + int index) { + if (networkInterfacesBuilder_ == null) { + return networkInterfaces_.get(index); + } else { + return networkInterfacesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getNetworkInterfacesOrBuilderList() { + if (networkInterfacesBuilder_ != null) { + return networkInterfacesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(networkInterfaces_); + } + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkInterface.Builder addNetworkInterfacesBuilder() { + return internalGetNetworkInterfacesFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.NetworkInterface.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkInterface.Builder addNetworkInterfacesBuilder( + int index) { + return internalGetNetworkInterfacesFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.NetworkInterface.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. An array of network configurations for this instance. These
+     * specify how interfaces are configured to interact with other network
+     * services, such as connecting to the internet. Multiple interfaces are
+     * supported per instance. Required to restore in different project or region.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getNetworkInterfacesBuilderList() { + return internalGetNetworkInterfacesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkInterface, + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder, + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder> + internalGetNetworkInterfacesFieldBuilder() { + if (networkInterfacesBuilder_ == null) { + networkInterfacesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkInterface, + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder, + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder>( + networkInterfaces_, + ((bitField0_ & 0x00010000) != 0), + getParentForChildren(), + isClean()); + networkInterfaces_ = null; + } + return networkInterfacesBuilder_; + } + + private com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig networkPerformanceConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig, + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Builder, + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfigOrBuilder> + networkPerformanceConfigBuilder_; + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkPerformanceConfig field is set. + */ + public boolean hasNetworkPerformanceConfig() { + return ((bitField0_ & 0x00020000) != 0); + } + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkPerformanceConfig. + */ + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig getNetworkPerformanceConfig() { + if (networkPerformanceConfigBuilder_ == null) { + return networkPerformanceConfig_ == null + ? com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.getDefaultInstance() + : networkPerformanceConfig_; + } else { + return networkPerformanceConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkPerformanceConfig( + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig value) { + if (networkPerformanceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkPerformanceConfig_ = value; + } else { + networkPerformanceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkPerformanceConfig( + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Builder builderForValue) { + if (networkPerformanceConfigBuilder_ == null) { + networkPerformanceConfig_ = builderForValue.build(); + } else { + networkPerformanceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNetworkPerformanceConfig( + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig value) { + if (networkPerformanceConfigBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && networkPerformanceConfig_ != null + && networkPerformanceConfig_ + != com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.getDefaultInstance()) { + getNetworkPerformanceConfigBuilder().mergeFrom(value); + } else { + networkPerformanceConfig_ = value; + } + } else { + networkPerformanceConfigBuilder_.mergeFrom(value); + } + if (networkPerformanceConfig_ != null) { + bitField0_ |= 0x00020000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNetworkPerformanceConfig() { + bitField0_ = (bitField0_ & ~0x00020000); + networkPerformanceConfig_ = null; + if (networkPerformanceConfigBuilder_ != null) { + networkPerformanceConfigBuilder_.dispose(); + networkPerformanceConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Builder + getNetworkPerformanceConfigBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return internalGetNetworkPerformanceConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfigOrBuilder + getNetworkPerformanceConfigOrBuilder() { + if (networkPerformanceConfigBuilder_ != null) { + return networkPerformanceConfigBuilder_.getMessageOrBuilder(); + } else { + return networkPerformanceConfig_ == null + ? com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.getDefaultInstance() + : networkPerformanceConfig_; + } + } + + /** + * + * + *
+     * Optional. Configure network performance such as egress bandwidth tier.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig, + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Builder, + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfigOrBuilder> + internalGetNetworkPerformanceConfigFieldBuilder() { + if (networkPerformanceConfigBuilder_ == null) { + networkPerformanceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig, + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Builder, + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfigOrBuilder>( + getNetworkPerformanceConfig(), getParentForChildren(), isClean()); + networkPerformanceConfig_ = null; + } + return networkPerformanceConfigBuilder_; + } + + private com.google.cloud.backupdr.v1beta.InstanceParams params_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.InstanceParams, + com.google.cloud.backupdr.v1beta.InstanceParams.Builder, + com.google.cloud.backupdr.v1beta.InstanceParamsOrBuilder> + paramsBuilder_; + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the params field is set. + */ + public boolean hasParams() { + return ((bitField0_ & 0x00040000) != 0); + } + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The params. + */ + public com.google.cloud.backupdr.v1beta.InstanceParams getParams() { + if (paramsBuilder_ == null) { + return params_ == null + ? com.google.cloud.backupdr.v1beta.InstanceParams.getDefaultInstance() + : params_; + } else { + return paramsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setParams(com.google.cloud.backupdr.v1beta.InstanceParams value) { + if (paramsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + params_ = value; + } else { + paramsBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setParams( + com.google.cloud.backupdr.v1beta.InstanceParams.Builder builderForValue) { + if (paramsBuilder_ == null) { + params_ = builderForValue.build(); + } else { + paramsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeParams(com.google.cloud.backupdr.v1beta.InstanceParams value) { + if (paramsBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && params_ != null + && params_ != com.google.cloud.backupdr.v1beta.InstanceParams.getDefaultInstance()) { + getParamsBuilder().mergeFrom(value); + } else { + params_ = value; + } + } else { + paramsBuilder_.mergeFrom(value); + } + if (params_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearParams() { + bitField0_ = (bitField0_ & ~0x00040000); + params_ = null; + if (paramsBuilder_ != null) { + paramsBuilder_.dispose(); + paramsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.InstanceParams.Builder getParamsBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return internalGetParamsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.InstanceParamsOrBuilder getParamsOrBuilder() { + if (paramsBuilder_ != null) { + return paramsBuilder_.getMessageOrBuilder(); + } else { + return params_ == null + ? com.google.cloud.backupdr.v1beta.InstanceParams.getDefaultInstance() + : params_; + } + } + + /** + * + * + *
+     * Input only. Additional params passed with the request, but not persisted
+     * as part of resource payload.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.InstanceParams, + com.google.cloud.backupdr.v1beta.InstanceParams.Builder, + com.google.cloud.backupdr.v1beta.InstanceParamsOrBuilder> + internalGetParamsFieldBuilder() { + if (paramsBuilder_ == null) { + paramsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.InstanceParams, + com.google.cloud.backupdr.v1beta.InstanceParams.Builder, + com.google.cloud.backupdr.v1beta.InstanceParamsOrBuilder>( + getParams(), getParentForChildren(), isClean()); + params_ = null; + } + return paramsBuilder_; + } + + private int privateIpv6GoogleAccess_ = 0; + + /** + * + * + *
+     * Optional. The private IPv6 google access type for the VM.
+     * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateIpv6GoogleAccess field is set. + */ + @java.lang.Override + public boolean hasPrivateIpv6GoogleAccess() { + return ((bitField0_ & 0x00080000) != 0); + } + + /** + * + * + *
+     * Optional. The private IPv6 google access type for the VM.
+     * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for privateIpv6GoogleAccess. + */ + @java.lang.Override + public int getPrivateIpv6GoogleAccessValue() { + return privateIpv6GoogleAccess_; + } + + /** + * + * + *
+     * Optional. The private IPv6 google access type for the VM.
+     * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for privateIpv6GoogleAccess to set. + * @return This builder for chaining. + */ + public Builder setPrivateIpv6GoogleAccessValue(int value) { + privateIpv6GoogleAccess_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The private IPv6 google access type for the VM.
+     * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateIpv6GoogleAccess. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess + getPrivateIpv6GoogleAccess() { + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess + result = + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess.forNumber(privateIpv6GoogleAccess_); + return result == null + ? com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The private IPv6 google access type for the VM.
+     * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The privateIpv6GoogleAccess to set. + * @return This builder for chaining. + */ + public Builder setPrivateIpv6GoogleAccess( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .InstancePrivateIpv6GoogleAccess + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00080000; + privateIpv6GoogleAccess_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The private IPv6 google access type for the VM.
+     * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPrivateIpv6GoogleAccess() { + bitField0_ = (bitField0_ & ~0x00080000); + privateIpv6GoogleAccess_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.AllocationAffinity allocationAffinity_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AllocationAffinity, + com.google.cloud.backupdr.v1beta.AllocationAffinity.Builder, + com.google.cloud.backupdr.v1beta.AllocationAffinityOrBuilder> + allocationAffinityBuilder_; + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allocationAffinity field is set. + */ + public boolean hasAllocationAffinity() { + return ((bitField0_ & 0x00100000) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allocationAffinity. + */ + public com.google.cloud.backupdr.v1beta.AllocationAffinity getAllocationAffinity() { + if (allocationAffinityBuilder_ == null) { + return allocationAffinity_ == null + ? com.google.cloud.backupdr.v1beta.AllocationAffinity.getDefaultInstance() + : allocationAffinity_; + } else { + return allocationAffinityBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllocationAffinity( + com.google.cloud.backupdr.v1beta.AllocationAffinity value) { + if (allocationAffinityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + allocationAffinity_ = value; + } else { + allocationAffinityBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAllocationAffinity( + com.google.cloud.backupdr.v1beta.AllocationAffinity.Builder builderForValue) { + if (allocationAffinityBuilder_ == null) { + allocationAffinity_ = builderForValue.build(); + } else { + allocationAffinityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAllocationAffinity( + com.google.cloud.backupdr.v1beta.AllocationAffinity value) { + if (allocationAffinityBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) + && allocationAffinity_ != null + && allocationAffinity_ + != com.google.cloud.backupdr.v1beta.AllocationAffinity.getDefaultInstance()) { + getAllocationAffinityBuilder().mergeFrom(value); + } else { + allocationAffinity_ = value; + } + } else { + allocationAffinityBuilder_.mergeFrom(value); + } + if (allocationAffinity_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAllocationAffinity() { + bitField0_ = (bitField0_ & ~0x00100000); + allocationAffinity_ = null; + if (allocationAffinityBuilder_ != null) { + allocationAffinityBuilder_.dispose(); + allocationAffinityBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AllocationAffinity.Builder + getAllocationAffinityBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return internalGetAllocationAffinityFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AllocationAffinityOrBuilder + getAllocationAffinityOrBuilder() { + if (allocationAffinityBuilder_ != null) { + return allocationAffinityBuilder_.getMessageOrBuilder(); + } else { + return allocationAffinity_ == null + ? com.google.cloud.backupdr.v1beta.AllocationAffinity.getDefaultInstance() + : allocationAffinity_; + } + } + + /** + * + * + *
+     * Optional. Specifies the reservations that this instance can consume from.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AllocationAffinity, + com.google.cloud.backupdr.v1beta.AllocationAffinity.Builder, + com.google.cloud.backupdr.v1beta.AllocationAffinityOrBuilder> + internalGetAllocationAffinityFieldBuilder() { + if (allocationAffinityBuilder_ == null) { + allocationAffinityBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AllocationAffinity, + com.google.cloud.backupdr.v1beta.AllocationAffinity.Builder, + com.google.cloud.backupdr.v1beta.AllocationAffinityOrBuilder>( + getAllocationAffinity(), getParentForChildren(), isClean()); + allocationAffinity_ = null; + } + return allocationAffinityBuilder_; + } + + private com.google.protobuf.LazyStringArrayList resourcePolicies_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureResourcePoliciesIsMutable() { + if (!resourcePolicies_.isModifiable()) { + resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(resourcePolicies_); + } + bitField0_ |= 0x00200000; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the resourcePolicies. + */ + public com.google.protobuf.ProtocolStringList getResourcePoliciesList() { + resourcePolicies_.makeImmutable(); + return resourcePolicies_; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of resourcePolicies. + */ + public int getResourcePoliciesCount() { + return resourcePolicies_.size(); + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The resourcePolicies at the given index. + */ + public java.lang.String getResourcePolicies(int index) { + return resourcePolicies_.get(index); + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the resourcePolicies at the given index. + */ + public com.google.protobuf.ByteString getResourcePoliciesBytes(int index) { + return resourcePolicies_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The resourcePolicies to set. + * @return This builder for chaining. + */ + public Builder setResourcePolicies(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcePoliciesIsMutable(); + resourcePolicies_.set(index, value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The resourcePolicies to add. + * @return This builder for chaining. + */ + public Builder addResourcePolicies(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The resourcePolicies to add. + * @return This builder for chaining. + */ + public Builder addAllResourcePolicies(java.lang.Iterable values) { + ensureResourcePoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourcePolicies_); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearResourcePolicies() { + resourcePolicies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00200000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this instance.
+     * By default, no resource policies will be applied.
+     * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the resourcePolicies to add. + * @return This builder for chaining. + */ + public Builder addResourcePoliciesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.Scheduling scheduling_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling, + com.google.cloud.backupdr.v1beta.Scheduling.Builder, + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder> + schedulingBuilder_; + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduling field is set. + */ + public boolean hasScheduling() { + return ((bitField0_ & 0x00400000) != 0); + } + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduling. + */ + public com.google.cloud.backupdr.v1beta.Scheduling getScheduling() { + if (schedulingBuilder_ == null) { + return scheduling_ == null + ? com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance() + : scheduling_; + } else { + return schedulingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setScheduling(com.google.cloud.backupdr.v1beta.Scheduling value) { + if (schedulingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduling_ = value; + } else { + schedulingBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setScheduling( + com.google.cloud.backupdr.v1beta.Scheduling.Builder builderForValue) { + if (schedulingBuilder_ == null) { + scheduling_ = builderForValue.build(); + } else { + schedulingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeScheduling(com.google.cloud.backupdr.v1beta.Scheduling value) { + if (schedulingBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) + && scheduling_ != null + && scheduling_ != com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance()) { + getSchedulingBuilder().mergeFrom(value); + } else { + scheduling_ = value; + } + } else { + schedulingBuilder_.mergeFrom(value); + } + if (scheduling_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearScheduling() { + bitField0_ = (bitField0_ & ~0x00400000); + scheduling_ = null; + if (schedulingBuilder_ != null) { + schedulingBuilder_.dispose(); + schedulingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Scheduling.Builder getSchedulingBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return internalGetSchedulingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.SchedulingOrBuilder getSchedulingOrBuilder() { + if (schedulingBuilder_ != null) { + return schedulingBuilder_.getMessageOrBuilder(); + } else { + return scheduling_ == null + ? com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance() + : scheduling_; + } + } + + /** + * + * + *
+     * Optional. Sets the scheduling options for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling, + com.google.cloud.backupdr.v1beta.Scheduling.Builder, + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder> + internalGetSchedulingFieldBuilder() { + if (schedulingBuilder_ == null) { + schedulingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling, + com.google.cloud.backupdr.v1beta.Scheduling.Builder, + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder>( + getScheduling(), getParentForChildren(), isClean()); + scheduling_ = null; + } + return schedulingBuilder_; + } + + private java.util.List serviceAccounts_ = + java.util.Collections.emptyList(); + + private void ensureServiceAccountsIsMutable() { + if (!((bitField0_ & 0x00800000) != 0)) { + serviceAccounts_ = + new java.util.ArrayList( + serviceAccounts_); + bitField0_ |= 0x00800000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceAccount, + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder, + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder> + serviceAccountsBuilder_; + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getServiceAccountsList() { + if (serviceAccountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceAccounts_); + } else { + return serviceAccountsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getServiceAccountsCount() { + if (serviceAccountsBuilder_ == null) { + return serviceAccounts_.size(); + } else { + return serviceAccountsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.ServiceAccount getServiceAccounts(int index) { + if (serviceAccountsBuilder_ == null) { + return serviceAccounts_.get(index); + } else { + return serviceAccountsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceAccounts( + int index, com.google.cloud.backupdr.v1beta.ServiceAccount value) { + if (serviceAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountsIsMutable(); + serviceAccounts_.set(index, value); + onChanged(); + } else { + serviceAccountsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceAccounts( + int index, com.google.cloud.backupdr.v1beta.ServiceAccount.Builder builderForValue) { + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + serviceAccounts_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addServiceAccounts(com.google.cloud.backupdr.v1beta.ServiceAccount value) { + if (serviceAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountsIsMutable(); + serviceAccounts_.add(value); + onChanged(); + } else { + serviceAccountsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addServiceAccounts( + int index, com.google.cloud.backupdr.v1beta.ServiceAccount value) { + if (serviceAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountsIsMutable(); + serviceAccounts_.add(index, value); + onChanged(); + } else { + serviceAccountsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addServiceAccounts( + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder builderForValue) { + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + serviceAccounts_.add(builderForValue.build()); + onChanged(); + } else { + serviceAccountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addServiceAccounts( + int index, com.google.cloud.backupdr.v1beta.ServiceAccount.Builder builderForValue) { + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + serviceAccounts_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllServiceAccounts( + java.lang.Iterable values) { + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceAccounts_); + onChanged(); + } else { + serviceAccountsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearServiceAccounts() { + if (serviceAccountsBuilder_ == null) { + serviceAccounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000); + onChanged(); + } else { + serviceAccountsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeServiceAccounts(int index) { + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + serviceAccounts_.remove(index); + onChanged(); + } else { + serviceAccountsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.ServiceAccount.Builder getServiceAccountsBuilder( + int index) { + return internalGetServiceAccountsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder getServiceAccountsOrBuilder( + int index) { + if (serviceAccountsBuilder_ == null) { + return serviceAccounts_.get(index); + } else { + return serviceAccountsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getServiceAccountsOrBuilderList() { + if (serviceAccountsBuilder_ != null) { + return serviceAccountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceAccounts_); + } + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.ServiceAccount.Builder addServiceAccountsBuilder() { + return internalGetServiceAccountsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.ServiceAccount.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.ServiceAccount.Builder addServiceAccountsBuilder( + int index) { + return internalGetServiceAccountsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.ServiceAccount.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of service accounts, with their specified scopes,
+     * authorized for this instance. Only one service account per VM instance is
+     * supported.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getServiceAccountsBuilderList() { + return internalGetServiceAccountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceAccount, + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder, + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder> + internalGetServiceAccountsFieldBuilder() { + if (serviceAccountsBuilder_ == null) { + serviceAccountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ServiceAccount, + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder, + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder>( + serviceAccounts_, + ((bitField0_ & 0x00800000) != 0), + getParentForChildren(), + isClean()); + serviceAccounts_ = null; + } + return serviceAccountsBuilder_; + } + + private com.google.cloud.backupdr.v1beta.Tags tags_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Tags, + com.google.cloud.backupdr.v1beta.Tags.Builder, + com.google.cloud.backupdr.v1beta.TagsOrBuilder> + tagsBuilder_; + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tags field is set. + */ + public boolean hasTags() { + return ((bitField0_ & 0x01000000) != 0); + } + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tags. + */ + public com.google.cloud.backupdr.v1beta.Tags getTags() { + if (tagsBuilder_ == null) { + return tags_ == null ? com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance() : tags_; + } else { + return tagsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTags(com.google.cloud.backupdr.v1beta.Tags value) { + if (tagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tags_ = value; + } else { + tagsBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTags(com.google.cloud.backupdr.v1beta.Tags.Builder builderForValue) { + if (tagsBuilder_ == null) { + tags_ = builderForValue.build(); + } else { + tagsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTags(com.google.cloud.backupdr.v1beta.Tags value) { + if (tagsBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) + && tags_ != null + && tags_ != com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance()) { + getTagsBuilder().mergeFrom(value); + } else { + tags_ = value; + } + } else { + tagsBuilder_.mergeFrom(value); + } + if (tags_ != null) { + bitField0_ |= 0x01000000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x01000000); + tags_ = null; + if (tagsBuilder_ != null) { + tagsBuilder_.dispose(); + tagsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Tags.Builder getTagsBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return internalGetTagsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.TagsOrBuilder getTagsOrBuilder() { + if (tagsBuilder_ != null) { + return tagsBuilder_.getMessageOrBuilder(); + } else { + return tags_ == null ? com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance() : tags_; + } + } + + /** + * + * + *
+     * Optional. Tags to apply to this instance. Tags are used to identify valid
+     * sources or targets for network firewalls and are specified by the client
+     * during instance creation.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Tags, + com.google.cloud.backupdr.v1beta.Tags.Builder, + com.google.cloud.backupdr.v1beta.TagsOrBuilder> + internalGetTagsFieldBuilder() { + if (tagsBuilder_ == null) { + tagsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Tags, + com.google.cloud.backupdr.v1beta.Tags.Builder, + com.google.cloud.backupdr.v1beta.TagsOrBuilder>( + getTags(), getParentForChildren(), isClean()); + tags_ = null; + } + return tagsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + private static final com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties(); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeInstanceRestoreProperties 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.backupdr.v1beta.ComputeInstanceRestoreProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceRestorePropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceRestorePropertiesOrBuilder.java new file mode 100644 index 000000000000..dec2e3f4792f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceRestorePropertiesOrBuilder.java @@ -0,0 +1,1262 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ComputeInstanceRestorePropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the compute instance.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the name field is set. + */ + boolean hasName(); + + /** + * + * + *
+   * Required. Name of the compute instance.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the compute instance.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Controls for advanced machine-related behavior features.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedMachineFeatures field is set. + */ + boolean hasAdvancedMachineFeatures(); + + /** + * + * + *
+   * Optional. Controls for advanced machine-related behavior features.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedMachineFeatures. + */ + com.google.cloud.backupdr.v1beta.AdvancedMachineFeatures getAdvancedMachineFeatures(); + + /** + * + * + *
+   * Optional. Controls for advanced machine-related behavior features.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AdvancedMachineFeatures advanced_machine_features = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AdvancedMachineFeaturesOrBuilder + getAdvancedMachineFeaturesOrBuilder(); + + /** + * + * + *
+   * Optional. Allows this instance to send and receive packets with
+   * non-matching destination or source IPs.
+   * 
+ * + * optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the canIpForward field is set. + */ + boolean hasCanIpForward(); + + /** + * + * + *
+   * Optional. Allows this instance to send and receive packets with
+   * non-matching destination or source IPs.
+   * 
+ * + * optional bool can_ip_forward = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The canIpForward. + */ + boolean getCanIpForward(); + + /** + * + * + *
+   * Optional. Controls Confidential compute options on the instance
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the confidentialInstanceConfig field is set. + */ + boolean hasConfidentialInstanceConfig(); + + /** + * + * + *
+   * Optional. Controls Confidential compute options on the instance
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The confidentialInstanceConfig. + */ + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig getConfidentialInstanceConfig(); + + /** + * + * + *
+   * Optional. Controls Confidential compute options on the instance
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ConfidentialInstanceConfig confidential_instance_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfigOrBuilder + getConfidentialInstanceConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Whether the resource should be protected against deletion.
+   * 
+ * + * optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the deletionProtection field is set. + */ + boolean hasDeletionProtection(); + + /** + * + * + *
+   * Optional. Whether the resource should be protected against deletion.
+   * 
+ * + * optional bool deletion_protection = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The deletionProtection. + */ + boolean getDeletionProtection(); + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + boolean hasDescription(); + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getDisksList(); + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AttachedDisk getDisks(int index); + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getDisksCount(); + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getDisksOrBuilderList(); + + /** + * + * + *
+   * Optional. Array of disks associated with this instance. Persistent disks
+   * must be created before you can assign them. Source regional persistent
+   * disks will be restored with default replica zones if not specified.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AttachedDisk disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AttachedDiskOrBuilder getDisksOrBuilder(int index); + + /** + * + * + *
+   * Optional. Enables display device for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the displayDevice field is set. + */ + boolean hasDisplayDevice(); + + /** + * + * + *
+   * Optional. Enables display device for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The displayDevice. + */ + com.google.cloud.backupdr.v1beta.DisplayDevice getDisplayDevice(); + + /** + * + * + *
+   * Optional. Enables display device for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DisplayDevice display_device = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.DisplayDeviceOrBuilder getDisplayDeviceOrBuilder(); + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getGuestAcceleratorsList(); + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AcceleratorConfig getGuestAccelerators(int index); + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getGuestAcceleratorsCount(); + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getGuestAcceleratorsOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of the type and count of accelerator cards attached to the
+   * instance.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AcceleratorConfig guest_accelerators = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AcceleratorConfigOrBuilder getGuestAcceleratorsOrBuilder( + int index); + + /** + * + * + *
+   * Optional. Specifies the hostname of the instance. The specified hostname
+   * must be RFC1035 compliant. If hostname is not specified, the default
+   * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+   * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+   * DNS.
+   * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the hostname field is set. + */ + boolean hasHostname(); + + /** + * + * + *
+   * Optional. Specifies the hostname of the instance. The specified hostname
+   * must be RFC1035 compliant. If hostname is not specified, the default
+   * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+   * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+   * DNS.
+   * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hostname. + */ + java.lang.String getHostname(); + + /** + * + * + *
+   * Optional. Specifies the hostname of the instance. The specified hostname
+   * must be RFC1035 compliant. If hostname is not specified, the default
+   * hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global
+   * DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal
+   * DNS.
+   * 
+ * + * optional string hostname = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for hostname. + */ + com.google.protobuf.ByteString getHostnameBytes(); + + /** + * + * + *
+   * Optional. Encrypts suspended data for an instance with a
+   * customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instanceEncryptionKey field is set. + */ + boolean hasInstanceEncryptionKey(); + + /** + * + * + *
+   * Optional. Encrypts suspended data for an instance with a
+   * customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instanceEncryptionKey. + */ + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getInstanceEncryptionKey(); + + /** + * + * + *
+   * Optional. Encrypts suspended data for an instance with a
+   * customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey instance_encryption_key = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder + getInstanceEncryptionKeyOrBuilder(); + + /** + * + * + *
+   * Optional. KeyRevocationActionType of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keyRevocationActionType field is set. + */ + boolean hasKeyRevocationActionType(); + + /** + * + * + *
+   * Optional. KeyRevocationActionType of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for keyRevocationActionType. + */ + int getKeyRevocationActionTypeValue(); + + /** + * + * + *
+   * Optional. KeyRevocationActionType of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.KeyRevocationActionType key_revocation_action_type = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keyRevocationActionType. + */ + com.google.cloud.backupdr.v1beta.KeyRevocationActionType getKeyRevocationActionType(); + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels to apply to this instance.
+   * 
+ * + * map<string, string> labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Full or partial URL of the machine type resource to use for this
+   * instance.
+   * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the machineType field is set. + */ + boolean hasMachineType(); + + /** + * + * + *
+   * Optional. Full or partial URL of the machine type resource to use for this
+   * instance.
+   * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + + /** + * + * + *
+   * Optional. Full or partial URL of the machine type resource to use for this
+   * instance.
+   * 
+ * + * optional string machine_type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * Optional. This includes custom metadata and predefined keys.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
+   * Optional. This includes custom metadata and predefined keys.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + com.google.cloud.backupdr.v1beta.Metadata getMetadata(); + + /** + * + * + *
+   * Optional. This includes custom metadata and predefined keys.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Metadata metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.MetadataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * Optional. Minimum CPU platform to use for this instance.
+   * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minCpuPlatform field is set. + */ + boolean hasMinCpuPlatform(); + + /** + * + * + *
+   * Optional. Minimum CPU platform to use for this instance.
+   * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minCpuPlatform. + */ + java.lang.String getMinCpuPlatform(); + + /** + * + * + *
+   * Optional. Minimum CPU platform to use for this instance.
+   * 
+ * + * optional string min_cpu_platform = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for minCpuPlatform. + */ + com.google.protobuf.ByteString getMinCpuPlatformBytes(); + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getNetworkInterfacesList(); + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.NetworkInterface getNetworkInterfaces(int index); + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getNetworkInterfacesCount(); + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getNetworkInterfacesOrBuilderList(); + + /** + * + * + *
+   * Optional. An array of network configurations for this instance. These
+   * specify how interfaces are configured to interact with other network
+   * services, such as connecting to the internet. Multiple interfaces are
+   * supported per instance. Required to restore in different project or region.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkInterface network_interfaces = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder( + int index); + + /** + * + * + *
+   * Optional. Configure network performance such as egress bandwidth tier.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkPerformanceConfig field is set. + */ + boolean hasNetworkPerformanceConfig(); + + /** + * + * + *
+   * Optional. Configure network performance such as egress bandwidth tier.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkPerformanceConfig. + */ + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig getNetworkPerformanceConfig(); + + /** + * + * + *
+   * Optional. Configure network performance such as egress bandwidth tier.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig network_performance_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfigOrBuilder + getNetworkPerformanceConfigOrBuilder(); + + /** + * + * + *
+   * Input only. Additional params passed with the request, but not persisted
+   * as part of resource payload.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the params field is set. + */ + boolean hasParams(); + + /** + * + * + *
+   * Input only. Additional params passed with the request, but not persisted
+   * as part of resource payload.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The params. + */ + com.google.cloud.backupdr.v1beta.InstanceParams getParams(); + + /** + * + * + *
+   * Input only. Additional params passed with the request, but not persisted
+   * as part of resource payload.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.InstanceParams params = 19 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.InstanceParamsOrBuilder getParamsOrBuilder(); + + /** + * + * + *
+   * Optional. The private IPv6 google access type for the VM.
+   * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateIpv6GoogleAccess field is set. + */ + boolean hasPrivateIpv6GoogleAccess(); + + /** + * + * + *
+   * Optional. The private IPv6 google access type for the VM.
+   * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for privateIpv6GoogleAccess. + */ + int getPrivateIpv6GoogleAccessValue(); + + /** + * + * + *
+   * Optional. The private IPv6 google access type for the VM.
+   * If not specified, use INHERIT_FROM_SUBNETWORK as default.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateIpv6GoogleAccess. + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess + getPrivateIpv6GoogleAccess(); + + /** + * + * + *
+   * Optional. Specifies the reservations that this instance can consume from.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the allocationAffinity field is set. + */ + boolean hasAllocationAffinity(); + + /** + * + * + *
+   * Optional. Specifies the reservations that this instance can consume from.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The allocationAffinity. + */ + com.google.cloud.backupdr.v1beta.AllocationAffinity getAllocationAffinity(); + + /** + * + * + *
+   * Optional. Specifies the reservations that this instance can consume from.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.AllocationAffinity allocation_affinity = 21 [json_name = "reservationAffinity", (.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AllocationAffinityOrBuilder getAllocationAffinityOrBuilder(); + + /** + * + * + *
+   * Optional. Resource policies applied to this instance.
+   * By default, no resource policies will be applied.
+   * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the resourcePolicies. + */ + java.util.List getResourcePoliciesList(); + + /** + * + * + *
+   * Optional. Resource policies applied to this instance.
+   * By default, no resource policies will be applied.
+   * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of resourcePolicies. + */ + int getResourcePoliciesCount(); + + /** + * + * + *
+   * Optional. Resource policies applied to this instance.
+   * By default, no resource policies will be applied.
+   * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The resourcePolicies at the given index. + */ + java.lang.String getResourcePolicies(int index); + + /** + * + * + *
+   * Optional. Resource policies applied to this instance.
+   * By default, no resource policies will be applied.
+   * 
+ * + * repeated string resource_policies = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the resourcePolicies at the given index. + */ + com.google.protobuf.ByteString getResourcePoliciesBytes(int index); + + /** + * + * + *
+   * Optional. Sets the scheduling options for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduling field is set. + */ + boolean hasScheduling(); + + /** + * + * + *
+   * Optional. Sets the scheduling options for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduling. + */ + com.google.cloud.backupdr.v1beta.Scheduling getScheduling(); + + /** + * + * + *
+   * Optional. Sets the scheduling options for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling scheduling = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder getSchedulingOrBuilder(); + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getServiceAccountsList(); + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.ServiceAccount getServiceAccounts(int index); + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getServiceAccountsCount(); + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getServiceAccountsOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of service accounts, with their specified scopes,
+   * authorized for this instance. Only one service account per VM instance is
+   * supported.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ServiceAccount service_accounts = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder getServiceAccountsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Tags to apply to this instance. Tags are used to identify valid
+   * sources or targets for network firewalls and are specified by the client
+   * during instance creation.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tags field is set. + */ + boolean hasTags(); + + /** + * + * + *
+   * Optional. Tags to apply to this instance. Tags are used to identify valid
+   * sources or targets for network firewalls and are specified by the client
+   * during instance creation.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tags. + */ + com.google.cloud.backupdr.v1beta.Tags getTags(); + + /** + * + * + *
+   * Optional. Tags to apply to this instance. Tags are used to identify valid
+   * sources or targets for network firewalls and are specified by the client
+   * during instance creation.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Tags tags = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.TagsOrBuilder getTagsOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceTargetEnvironment.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceTargetEnvironment.java new file mode 100644 index 000000000000..ccf036f1e938 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceTargetEnvironment.java @@ -0,0 +1,952 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ComputeInstanceTargetEnvironment represents Compute Engine target
+ * environment to be used during restore.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment} + */ +@com.google.protobuf.Generated +public final class ComputeInstanceTargetEnvironment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + ComputeInstanceTargetEnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ComputeInstanceTargetEnvironment"); + } + + // Use ComputeInstanceTargetEnvironment.newBuilder() to construct. + private ComputeInstanceTargetEnvironment( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ComputeInstanceTargetEnvironment() { + project_ = ""; + zone_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceTargetEnvironment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceTargetEnvironment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object project_ = ""; + + /** + * + * + *
+   * Required. Target project for the Compute Engine instance.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + 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(); + project_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Target project for the Compute Engine instance.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + + /** + * + * + *
+   * Required. The zone of the Compute Engine instance.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + 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(); + zone_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The zone of the Compute Engine instance.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USE_PROJECT_SERVICE_ACCOUNT_FIELD_NUMBER = 3; + private boolean useProjectServiceAccount_ = false; + + /** + * + * + *
+   * Optional. Whether to use the project service account for the Compute Engine
+   * instance restore.
+   * 
+ * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + @java.lang.Override + public boolean hasUseProjectServiceAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Whether to use the project service account for the Compute Engine
+   * instance restore.
+   * 
+ * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + @java.lang.Override + public boolean getUseProjectServiceAccount() { + return useProjectServiceAccount_; + } + + 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.GeneratedMessage.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, project_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, zone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(3, useProjectServiceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, project_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, zone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, useProjectServiceAccount_); + } + 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.backupdr.v1beta.ComputeInstanceTargetEnvironment)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment other = + (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) obj; + + if (!getProject().equals(other.getProject())) return false; + if (!getZone().equals(other.getZone())) return false; + if (hasUseProjectServiceAccount() != other.hasUseProjectServiceAccount()) return false; + if (hasUseProjectServiceAccount()) { + if (getUseProjectServiceAccount() != other.getUseProjectServiceAccount()) 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) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + if (hasUseProjectServiceAccount()) { + hash = (37 * hash) + USE_PROJECT_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseProjectServiceAccount()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment 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.backupdr.v1beta.ComputeInstanceTargetEnvironment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment 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.backupdr.v1beta.ComputeInstanceTargetEnvironment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ComputeInstanceTargetEnvironment 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ComputeInstanceTargetEnvironment represents Compute Engine target
+   * environment to be used during restore.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceTargetEnvironment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceTargetEnvironment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.class, + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + project_ = ""; + zone_ = ""; + useProjectServiceAccount_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ComputeInstanceTargetEnvironment_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment build() { + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment buildPartial() { + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment result = + new com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.project_ = project_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.zone_ = zone_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.useProjectServiceAccount_ = useProjectServiceAccount_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment other) { + if (other + == com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.getDefaultInstance()) + return this; + if (!other.getProject().isEmpty()) { + project_ = other.project_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasUseProjectServiceAccount()) { + setUseProjectServiceAccount(other.getUseProjectServiceAccount()); + } + 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: + { + project_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + useProjectServiceAccount_ = 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 java.lang.Object project_ = ""; + + /** + * + * + *
+     * Required. Target project for the Compute Engine instance.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Target project for the Compute Engine instance.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Target project for the Compute Engine instance.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target project for the Compute Engine instance.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProject() { + project_ = getDefaultInstance().getProject(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target project for the Compute Engine instance.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + + /** + * + * + *
+     * Required. The zone of the Compute Engine instance.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The zone of the Compute Engine instance.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The zone of the Compute Engine instance.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The zone of the Compute Engine instance.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The zone of the Compute Engine instance.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean useProjectServiceAccount_; + + /** + * + * + *
+     * Optional. Whether to use the project service account for the Compute Engine
+     * instance restore.
+     * 
+ * + * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + @java.lang.Override + public boolean hasUseProjectServiceAccount() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the Compute Engine
+     * instance restore.
+     * 
+ * + * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + @java.lang.Override + public boolean getUseProjectServiceAccount() { + return useProjectServiceAccount_; + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the Compute Engine
+     * instance restore.
+     * 
+ * + * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The useProjectServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setUseProjectServiceAccount(boolean value) { + + useProjectServiceAccount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the Compute Engine
+     * instance restore.
+     * 
+ * + * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearUseProjectServiceAccount() { + bitField0_ = (bitField0_ & ~0x00000004); + useProjectServiceAccount_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + private static final com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment(); + } + + public static com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ComputeInstanceTargetEnvironment 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.backupdr.v1beta.ComputeInstanceTargetEnvironment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceTargetEnvironmentOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceTargetEnvironmentOrBuilder.java new file mode 100644 index 000000000000..73dc3d39b9dc --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ComputeInstanceTargetEnvironmentOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ComputeInstanceTargetEnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Target project for the Compute Engine instance.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + java.lang.String getProject(); + + /** + * + * + *
+   * Required. Target project for the Compute Engine instance.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * Required. The zone of the Compute Engine instance.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + java.lang.String getZone(); + + /** + * + * + *
+   * Required. The zone of the Compute Engine instance.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Optional. Whether to use the project service account for the Compute Engine
+   * instance restore.
+   * 
+ * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + boolean hasUseProjectServiceAccount(); + + /** + * + * + *
+   * Optional. Whether to use the project service account for the Compute Engine
+   * instance restore.
+   * 
+ * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + boolean getUseProjectServiceAccount(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ConfidentialInstanceConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ConfidentialInstanceConfig.java new file mode 100644 index 000000000000..25cb6408e313 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ConfidentialInstanceConfig.java @@ -0,0 +1,561 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A set of Confidential Instance options.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ConfidentialInstanceConfig} + */ +@com.google.protobuf.Generated +public final class ConfidentialInstanceConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ConfidentialInstanceConfig) + ConfidentialInstanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ConfidentialInstanceConfig"); + } + + // Use ConfidentialInstanceConfig.newBuilder() to construct. + private ConfidentialInstanceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ConfidentialInstanceConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ConfidentialInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ConfidentialInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.class, + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.Builder.class); + } + + private int bitField0_; + public static final int ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER = 1; + private boolean enableConfidentialCompute_ = false; + + /** + * + * + *
+   * Optional. Defines whether the instance should have confidential compute
+   * enabled.
+   * 
+ * + * optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableConfidentialCompute field is set. + */ + @java.lang.Override + public boolean hasEnableConfidentialCompute() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Defines whether the instance should have confidential compute
+   * enabled.
+   * 
+ * + * optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableConfidentialCompute. + */ + @java.lang.Override + public boolean getEnableConfidentialCompute() { + return enableConfidentialCompute_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(1, enableConfidentialCompute_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableConfidentialCompute_); + } + 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.backupdr.v1beta.ConfidentialInstanceConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig other = + (com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig) obj; + + if (hasEnableConfidentialCompute() != other.hasEnableConfidentialCompute()) return false; + if (hasEnableConfidentialCompute()) { + if (getEnableConfidentialCompute() != other.getEnableConfidentialCompute()) 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 (hasEnableConfidentialCompute()) { + hash = (37 * hash) + ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableConfidentialCompute()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig 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.backupdr.v1beta.ConfidentialInstanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig 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.backupdr.v1beta.ConfidentialInstanceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ConfidentialInstanceConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A set of Confidential Instance options.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ConfidentialInstanceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ConfidentialInstanceConfig) + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ConfidentialInstanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ConfidentialInstanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.class, + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableConfidentialCompute_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ConfidentialInstanceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig build() { + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig buildPartial() { + com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig result = + new com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableConfidentialCompute_ = enableConfidentialCompute_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig other) { + if (other == com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig.getDefaultInstance()) + return this; + if (other.hasEnableConfidentialCompute()) { + setEnableConfidentialCompute(other.getEnableConfidentialCompute()); + } + 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 8: + { + enableConfidentialCompute_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 boolean enableConfidentialCompute_; + + /** + * + * + *
+     * Optional. Defines whether the instance should have confidential compute
+     * enabled.
+     * 
+ * + * + * optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableConfidentialCompute field is set. + */ + @java.lang.Override + public boolean hasEnableConfidentialCompute() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Defines whether the instance should have confidential compute
+     * enabled.
+     * 
+ * + * + * optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableConfidentialCompute. + */ + @java.lang.Override + public boolean getEnableConfidentialCompute() { + return enableConfidentialCompute_; + } + + /** + * + * + *
+     * Optional. Defines whether the instance should have confidential compute
+     * enabled.
+     * 
+ * + * + * optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableConfidentialCompute to set. + * @return This builder for chaining. + */ + public Builder setEnableConfidentialCompute(boolean value) { + + enableConfidentialCompute_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Defines whether the instance should have confidential compute
+     * enabled.
+     * 
+ * + * + * optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableConfidentialCompute() { + bitField0_ = (bitField0_ & ~0x00000001); + enableConfidentialCompute_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ConfidentialInstanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ConfidentialInstanceConfig) + private static final com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig(); + } + + public static com.google.cloud.backupdr.v1beta.ConfidentialInstanceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfidentialInstanceConfig 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.backupdr.v1beta.ConfidentialInstanceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ConfidentialInstanceConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ConfidentialInstanceConfigOrBuilder.java new file mode 100644 index 000000000000..8708e64bf049 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ConfidentialInstanceConfigOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ConfidentialInstanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ConfidentialInstanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Defines whether the instance should have confidential compute
+   * enabled.
+   * 
+ * + * optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableConfidentialCompute field is set. + */ + boolean hasEnableConfidentialCompute(); + + /** + * + * + *
+   * Optional. Defines whether the instance should have confidential compute
+   * enabled.
+   * 
+ * + * optional bool enable_confidential_compute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableConfidentialCompute. + */ + boolean getEnableConfidentialCompute(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyBindingRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyBindingRequest.java new file mode 100644 index 000000000000..fc53daf2eea4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyBindingRequest.java @@ -0,0 +1,1184 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for creating an AutoProtectionPolicyBinding.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class CreateAutoProtectionPolicyBindingRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) + CreateAutoProtectionPolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateAutoProtectionPolicyBindingRequest"); + } + + // Use CreateAutoProtectionPolicyBindingRequest.newBuilder() to construct. + private CreateAutoProtectionPolicyBindingRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateAutoProtectionPolicyBindingRequest() { + parent_ = ""; + autoProtectionPolicyBindingId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.class, + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.Builder + .class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this binding will be created.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * 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 parent resource where this binding will be created.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * 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 AUTO_PROTECTION_POLICY_BINDING_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object autoProtectionPolicyBindingId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the binding.
+   * This will become the final component of the binding's resource name.
+   * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicyBindingId. + */ + @java.lang.Override + public java.lang.String getAutoProtectionPolicyBindingId() { + java.lang.Object ref = autoProtectionPolicyBindingId_; + 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(); + autoProtectionPolicyBindingId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the binding.
+   * This will become the final component of the binding's resource name.
+   * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for autoProtectionPolicyBindingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutoProtectionPolicyBindingIdBytes() { + java.lang.Object ref = autoProtectionPolicyBindingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTO_PROTECTION_POLICY_BINDING_FIELD_NUMBER = 3; + private com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding autoProtectionPolicyBinding_; + + /** + * + * + *
+   * Required. The AutoProtectionPolicyBinding resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicyBinding field is set. + */ + @java.lang.Override + public boolean hasAutoProtectionPolicyBinding() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The AutoProtectionPolicyBinding resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicyBinding. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + getAutoProtectionPolicyBinding() { + return autoProtectionPolicyBinding_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.getDefaultInstance() + : autoProtectionPolicyBinding_; + } + + /** + * + * + *
+   * Required. The AutoProtectionPolicyBinding resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder + getAutoProtectionPolicyBindingOrBuilder() { + return autoProtectionPolicyBinding_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.getDefaultInstance() + : autoProtectionPolicyBinding_; + } + + 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyBindingId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, autoProtectionPolicyBindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAutoProtectionPolicyBinding()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyBindingId_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(2, autoProtectionPolicyBindingId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getAutoProtectionPolicyBinding()); + } + 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.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest other = + (com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAutoProtectionPolicyBindingId().equals(other.getAutoProtectionPolicyBindingId())) + return false; + if (hasAutoProtectionPolicyBinding() != other.hasAutoProtectionPolicyBinding()) return false; + if (hasAutoProtectionPolicyBinding()) { + if (!getAutoProtectionPolicyBinding().equals(other.getAutoProtectionPolicyBinding())) + 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) + AUTO_PROTECTION_POLICY_BINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicyBindingId().hashCode(); + if (hasAutoProtectionPolicyBinding()) { + hash = (37 * hash) + AUTO_PROTECTION_POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicyBinding().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest 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.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest 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.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for creating an AutoProtectionPolicyBinding.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.class, + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoProtectionPolicyBindingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + autoProtectionPolicyBindingId_ = ""; + autoProtectionPolicyBinding_ = null; + if (autoProtectionPolicyBindingBuilder_ != null) { + autoProtectionPolicyBindingBuilder_.dispose(); + autoProtectionPolicyBindingBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest build() { + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + buildPartial() { + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest result = + new com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.autoProtectionPolicyBindingId_ = autoProtectionPolicyBindingId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.autoProtectionPolicyBinding_ = + autoProtectionPolicyBindingBuilder_ == null + ? autoProtectionPolicyBinding_ + : autoProtectionPolicyBindingBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAutoProtectionPolicyBindingId().isEmpty()) { + autoProtectionPolicyBindingId_ = other.autoProtectionPolicyBindingId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAutoProtectionPolicyBinding()) { + mergeAutoProtectionPolicyBinding(other.getAutoProtectionPolicyBinding()); + } + 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: + { + autoProtectionPolicyBindingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetAutoProtectionPolicyBindingFieldBuilder().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 parent resource where this binding will be created.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 parent resource where this binding will be created.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 parent resource where this binding will be created.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 parent resource where this binding will be created.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 parent resource where this binding will be created.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 autoProtectionPolicyBindingId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the binding.
+     * This will become the final component of the binding's resource name.
+     * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicyBindingId. + */ + public java.lang.String getAutoProtectionPolicyBindingId() { + java.lang.Object ref = autoProtectionPolicyBindingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + autoProtectionPolicyBindingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the binding.
+     * This will become the final component of the binding's resource name.
+     * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for autoProtectionPolicyBindingId. + */ + public com.google.protobuf.ByteString getAutoProtectionPolicyBindingIdBytes() { + java.lang.Object ref = autoProtectionPolicyBindingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the binding.
+     * This will become the final component of the binding's resource name.
+     * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The autoProtectionPolicyBindingId to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyBindingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionPolicyBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the binding.
+     * This will become the final component of the binding's resource name.
+     * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearAutoProtectionPolicyBindingId() { + autoProtectionPolicyBindingId_ = getDefaultInstance().getAutoProtectionPolicyBindingId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the binding.
+     * This will become the final component of the binding's resource name.
+     * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for autoProtectionPolicyBindingId to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyBindingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + autoProtectionPolicyBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + autoProtectionPolicyBinding_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder> + autoProtectionPolicyBindingBuilder_; + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicyBinding field is set. + */ + public boolean hasAutoProtectionPolicyBinding() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicyBinding. + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + getAutoProtectionPolicyBinding() { + if (autoProtectionPolicyBindingBuilder_ == null) { + return autoProtectionPolicyBinding_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.getDefaultInstance() + : autoProtectionPolicyBinding_; + } else { + return autoProtectionPolicyBindingBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding value) { + if (autoProtectionPolicyBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionPolicyBinding_ = value; + } else { + autoProtectionPolicyBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder builderForValue) { + if (autoProtectionPolicyBindingBuilder_ == null) { + autoProtectionPolicyBinding_ = builderForValue.build(); + } else { + autoProtectionPolicyBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutoProtectionPolicyBinding( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding value) { + if (autoProtectionPolicyBindingBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && autoProtectionPolicyBinding_ != null + && autoProtectionPolicyBinding_ + != com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + .getDefaultInstance()) { + getAutoProtectionPolicyBindingBuilder().mergeFrom(value); + } else { + autoProtectionPolicyBinding_ = value; + } + } else { + autoProtectionPolicyBindingBuilder_.mergeFrom(value); + } + if (autoProtectionPolicyBinding_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutoProtectionPolicyBinding() { + bitField0_ = (bitField0_ & ~0x00000004); + autoProtectionPolicyBinding_ = null; + if (autoProtectionPolicyBindingBuilder_ != null) { + autoProtectionPolicyBindingBuilder_.dispose(); + autoProtectionPolicyBindingBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder + getAutoProtectionPolicyBindingBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetAutoProtectionPolicyBindingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder + getAutoProtectionPolicyBindingOrBuilder() { + if (autoProtectionPolicyBindingBuilder_ != null) { + return autoProtectionPolicyBindingBuilder_.getMessageOrBuilder(); + } else { + return autoProtectionPolicyBinding_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.getDefaultInstance() + : autoProtectionPolicyBinding_; + } + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicyBinding resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder> + internalGetAutoProtectionPolicyBindingFieldBuilder() { + if (autoProtectionPolicyBindingBuilder_ == null) { + autoProtectionPolicyBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder>( + getAutoProtectionPolicyBinding(), getParentForChildren(), isClean()); + autoProtectionPolicyBinding_ = null; + } + return autoProtectionPolicyBindingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) + private static final com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest(); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAutoProtectionPolicyBindingRequest 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.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyBindingRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..414893d39346 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyBindingRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CreateAutoProtectionPolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this binding will be created.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this binding will be created.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * 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 binding.
+   * This will become the final component of the binding's resource name.
+   * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicyBindingId. + */ + java.lang.String getAutoProtectionPolicyBindingId(); + + /** + * + * + *
+   * Required. The ID to use for the binding.
+   * This will become the final component of the binding's resource name.
+   * 
+ * + * string auto_protection_policy_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for autoProtectionPolicyBindingId. + */ + com.google.protobuf.ByteString getAutoProtectionPolicyBindingIdBytes(); + + /** + * + * + *
+   * Required. The AutoProtectionPolicyBinding resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicyBinding field is set. + */ + boolean hasAutoProtectionPolicyBinding(); + + /** + * + * + *
+   * Required. The AutoProtectionPolicyBinding resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicyBinding. + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding getAutoProtectionPolicyBinding(); + + /** + * + * + *
+   * Required. The AutoProtectionPolicyBinding resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder + getAutoProtectionPolicyBindingOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyRequest.java new file mode 100644 index 000000000000..62d9c2347ff2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyRequest.java @@ -0,0 +1,1153 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for creating an AutoProtectionPolicy.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest} + */ +@com.google.protobuf.Generated +public final class CreateAutoProtectionPolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) + CreateAutoProtectionPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateAutoProtectionPolicyRequest"); + } + + // Use CreateAutoProtectionPolicyRequest.newBuilder() to construct. + private CreateAutoProtectionPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateAutoProtectionPolicyRequest() { + parent_ = ""; + autoProtectionPolicyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.class, + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource where this policy will be created.
+   * Format: projects/{project}/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 parent resource where this policy will be created.
+   * Format: projects/{project}/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 AUTO_PROTECTION_POLICY_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object autoProtectionPolicyId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the policy.
+   * This will become the final component of the policy's resource name.
+   * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The autoProtectionPolicyId. + */ + @java.lang.Override + public java.lang.String getAutoProtectionPolicyId() { + java.lang.Object ref = autoProtectionPolicyId_; + 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(); + autoProtectionPolicyId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the policy.
+   * This will become the final component of the policy's resource name.
+   * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for autoProtectionPolicyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutoProtectionPolicyIdBytes() { + java.lang.Object ref = autoProtectionPolicyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTO_PROTECTION_POLICY_FIELD_NUMBER = 3; + private com.google.cloud.backupdr.v1beta.AutoProtectionPolicy autoProtectionPolicy_; + + /** + * + * + *
+   * Required. The AutoProtectionPolicy resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicy field is set. + */ + @java.lang.Override + public boolean hasAutoProtectionPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The AutoProtectionPolicy resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicy. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicy() { + return autoProtectionPolicy_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance() + : autoProtectionPolicy_; + } + + /** + * + * + *
+   * Required. The AutoProtectionPolicy resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder + getAutoProtectionPolicyOrBuilder() { + return autoProtectionPolicy_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance() + : autoProtectionPolicy_; + } + + 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, autoProtectionPolicyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAutoProtectionPolicy()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, autoProtectionPolicyId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAutoProtectionPolicy()); + } + 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.backupdr.v1beta.CreateAutoProtectionPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest other = + (com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAutoProtectionPolicyId().equals(other.getAutoProtectionPolicyId())) return false; + if (hasAutoProtectionPolicy() != other.hasAutoProtectionPolicy()) return false; + if (hasAutoProtectionPolicy()) { + if (!getAutoProtectionPolicy().equals(other.getAutoProtectionPolicy())) 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) + AUTO_PROTECTION_POLICY_ID_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicyId().hashCode(); + if (hasAutoProtectionPolicy()) { + hash = (37 * hash) + AUTO_PROTECTION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest 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.backupdr.v1beta.CreateAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest 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.backupdr.v1beta.CreateAutoProtectionPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CreateAutoProtectionPolicyRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for creating an AutoProtectionPolicy.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.class, + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoProtectionPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + autoProtectionPolicyId_ = ""; + autoProtectionPolicy_ = null; + if (autoProtectionPolicyBuilder_ != null) { + autoProtectionPolicyBuilder_.dispose(); + autoProtectionPolicyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_CreateAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest build() { + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest buildPartial() { + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest result = + new com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.autoProtectionPolicyId_ = autoProtectionPolicyId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.autoProtectionPolicy_ = + autoProtectionPolicyBuilder_ == null + ? autoProtectionPolicy_ + : autoProtectionPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAutoProtectionPolicyId().isEmpty()) { + autoProtectionPolicyId_ = other.autoProtectionPolicyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAutoProtectionPolicy()) { + mergeAutoProtectionPolicy(other.getAutoProtectionPolicy()); + } + 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: + { + autoProtectionPolicyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetAutoProtectionPolicyFieldBuilder().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 parent resource where this policy will be created.
+     * Format: projects/{project}/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 parent resource where this policy will be created.
+     * Format: projects/{project}/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 parent resource where this policy will be created.
+     * Format: projects/{project}/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 parent resource where this policy will be created.
+     * Format: projects/{project}/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 parent resource where this policy will be created.
+     * Format: projects/{project}/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 autoProtectionPolicyId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the policy.
+     * This will become the final component of the policy's resource name.
+     * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The autoProtectionPolicyId. + */ + public java.lang.String getAutoProtectionPolicyId() { + java.lang.Object ref = autoProtectionPolicyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + autoProtectionPolicyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the policy.
+     * This will become the final component of the policy's resource name.
+     * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for autoProtectionPolicyId. + */ + public com.google.protobuf.ByteString getAutoProtectionPolicyIdBytes() { + java.lang.Object ref = autoProtectionPolicyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the policy.
+     * This will become the final component of the policy's resource name.
+     * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The autoProtectionPolicyId to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionPolicyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the policy.
+     * This will become the final component of the policy's resource name.
+     * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAutoProtectionPolicyId() { + autoProtectionPolicyId_ = getDefaultInstance().getAutoProtectionPolicyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the policy.
+     * This will become the final component of the policy's resource name.
+     * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for autoProtectionPolicyId to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + autoProtectionPolicyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.AutoProtectionPolicy autoProtectionPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder> + autoProtectionPolicyBuilder_; + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicy field is set. + */ + public boolean hasAutoProtectionPolicy() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicy. + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicy() { + if (autoProtectionPolicyBuilder_ == null) { + return autoProtectionPolicy_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance() + : autoProtectionPolicy_; + } else { + return autoProtectionPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy value) { + if (autoProtectionPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionPolicy_ = value; + } else { + autoProtectionPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder builderForValue) { + if (autoProtectionPolicyBuilder_ == null) { + autoProtectionPolicy_ = builderForValue.build(); + } else { + autoProtectionPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy value) { + if (autoProtectionPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && autoProtectionPolicy_ != null + && autoProtectionPolicy_ + != com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance()) { + getAutoProtectionPolicyBuilder().mergeFrom(value); + } else { + autoProtectionPolicy_ = value; + } + } else { + autoProtectionPolicyBuilder_.mergeFrom(value); + } + if (autoProtectionPolicy_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutoProtectionPolicy() { + bitField0_ = (bitField0_ & ~0x00000004); + autoProtectionPolicy_ = null; + if (autoProtectionPolicyBuilder_ != null) { + autoProtectionPolicyBuilder_.dispose(); + autoProtectionPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder + getAutoProtectionPolicyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetAutoProtectionPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder + getAutoProtectionPolicyOrBuilder() { + if (autoProtectionPolicyBuilder_ != null) { + return autoProtectionPolicyBuilder_.getMessageOrBuilder(); + } else { + return autoProtectionPolicy_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance() + : autoProtectionPolicy_; + } + } + + /** + * + * + *
+     * Required. The AutoProtectionPolicy resource to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder> + internalGetAutoProtectionPolicyFieldBuilder() { + if (autoProtectionPolicyBuilder_ == null) { + autoProtectionPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder>( + getAutoProtectionPolicy(), getParentForChildren(), isClean()); + autoProtectionPolicy_ = null; + } + return autoProtectionPolicyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) + private static final com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest(); + } + + public static com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAutoProtectionPolicyRequest 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.backupdr.v1beta.CreateAutoProtectionPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..e1b6c8d9ca31 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateAutoProtectionPolicyRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CreateAutoProtectionPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource where this policy will be created.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource where this policy will be created.
+   * Format: projects/{project}/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 policy.
+   * This will become the final component of the policy's resource name.
+   * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The autoProtectionPolicyId. + */ + java.lang.String getAutoProtectionPolicyId(); + + /** + * + * + *
+   * Required. The ID to use for the policy.
+   * This will become the final component of the policy's resource name.
+   * 
+ * + * string auto_protection_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for autoProtectionPolicyId. + */ + com.google.protobuf.ByteString getAutoProtectionPolicyIdBytes(); + + /** + * + * + *
+   * Required. The AutoProtectionPolicy resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicy field is set. + */ + boolean hasAutoProtectionPolicy(); + + /** + * + * + *
+   * Required. The AutoProtectionPolicy resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicy. + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicy(); + + /** + * + * + *
+   * Required. The AutoProtectionPolicy resource to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder getAutoProtectionPolicyOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanAssociationRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanAssociationRequest.java new file mode 100644 index 000000000000..cc597f6c9563 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanAssociationRequest.java @@ -0,0 +1,1447 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for creating a backup plan.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest} + */ +@com.google.protobuf.Generated +public final class CreateBackupPlanAssociationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) + CreateBackupPlanAssociationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateBackupPlanAssociationRequest"); + } + + // Use CreateBackupPlanAssociationRequest.newBuilder() to construct. + private CreateBackupPlanAssociationRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateBackupPlanAssociationRequest() { + parent_ = ""; + backupPlanAssociationId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanAssociationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.class, + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The backup plan association project and location in the format
+   * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+   * map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * 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 backup plan association project and location in the format
+   * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+   * map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * 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_PLAN_ASSOCIATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanAssociationId_ = ""; + + /** + * + * + *
+   * Required. The name of the backup plan association to create. The name must
+   * be unique for the specified project and location.
+   * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPlanAssociationId. + */ + @java.lang.Override + public java.lang.String getBackupPlanAssociationId() { + java.lang.Object ref = backupPlanAssociationId_; + 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(); + backupPlanAssociationId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the backup plan association to create. The name must
+   * be unique for the specified project and location.
+   * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPlanAssociationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanAssociationIdBytes() { + java.lang.Object ref = backupPlanAssociationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanAssociationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_ASSOCIATION_FIELD_NUMBER = 3; + private com.google.cloud.backupdr.v1beta.BackupPlanAssociation backupPlanAssociation_; + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlanAssociation field is set. + */ + @java.lang.Override + public boolean hasBackupPlanAssociation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlanAssociation. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociation() { + return backupPlanAssociation_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance() + : backupPlanAssociation_; + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationOrBuilder() { + return backupPlanAssociation_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance() + : backupPlanAssociation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanAssociationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupPlanAssociationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getBackupPlanAssociation()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanAssociationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupPlanAssociationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackupPlanAssociation()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.backupdr.v1beta.CreateBackupPlanAssociationRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest other = + (com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getBackupPlanAssociationId().equals(other.getBackupPlanAssociationId())) return false; + if (hasBackupPlanAssociation() != other.hasBackupPlanAssociation()) return false; + if (hasBackupPlanAssociation()) { + if (!getBackupPlanAssociation().equals(other.getBackupPlanAssociation())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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_PLAN_ASSOCIATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanAssociationId().hashCode(); + if (hasBackupPlanAssociation()) { + hash = (37 * hash) + BACKUP_PLAN_ASSOCIATION_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanAssociation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest 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.backupdr.v1beta.CreateBackupPlanAssociationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest 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.backupdr.v1beta.CreateBackupPlanAssociationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CreateBackupPlanAssociationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for creating a backup plan.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanAssociationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.class, + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupPlanAssociationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupPlanAssociationId_ = ""; + backupPlanAssociation_ = null; + if (backupPlanAssociationBuilder_ != null) { + backupPlanAssociationBuilder_.dispose(); + backupPlanAssociationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest build() { + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest buildPartial() { + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest result = + new com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPlanAssociationId_ = backupPlanAssociationId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupPlanAssociation_ = + backupPlanAssociationBuilder_ == null + ? backupPlanAssociation_ + : backupPlanAssociationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupPlanAssociationId().isEmpty()) { + backupPlanAssociationId_ = other.backupPlanAssociationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBackupPlanAssociation()) { + mergeBackupPlanAssociation(other.getBackupPlanAssociation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + 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: + { + backupPlanAssociationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetBackupPlanAssociationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 backup plan association project and location in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+     * map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 backup plan association project and location in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+     * map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 backup plan association project and location in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+     * map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 backup plan association project and location in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+     * map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 backup plan association project and location in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+     * map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 backupPlanAssociationId_ = ""; + + /** + * + * + *
+     * Required. The name of the backup plan association to create. The name must
+     * be unique for the specified project and location.
+     * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPlanAssociationId. + */ + public java.lang.String getBackupPlanAssociationId() { + java.lang.Object ref = backupPlanAssociationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanAssociationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the backup plan association to create. The name must
+     * be unique for the specified project and location.
+     * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPlanAssociationId. + */ + public com.google.protobuf.ByteString getBackupPlanAssociationIdBytes() { + java.lang.Object ref = backupPlanAssociationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanAssociationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the backup plan association to create. The name must
+     * be unique for the specified project and location.
+     * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The backupPlanAssociationId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanAssociationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanAssociationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the backup plan association to create. The name must
+     * be unique for the specified project and location.
+     * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanAssociationId() { + backupPlanAssociationId_ = getDefaultInstance().getBackupPlanAssociationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the backup plan association to create. The name must
+     * be unique for the specified project and location.
+     * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for backupPlanAssociationId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanAssociationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanAssociationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.BackupPlanAssociation backupPlanAssociation_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder> + backupPlanAssociationBuilder_; + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlanAssociation field is set. + */ + public boolean hasBackupPlanAssociation() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlanAssociation. + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociation() { + if (backupPlanAssociationBuilder_ == null) { + return backupPlanAssociation_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance() + : backupPlanAssociation_; + } else { + return backupPlanAssociationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanAssociation_ = value; + } else { + backupPlanAssociationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder builderForValue) { + if (backupPlanAssociationBuilder_ == null) { + backupPlanAssociation_ = builderForValue.build(); + } else { + backupPlanAssociationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && backupPlanAssociation_ != null + && backupPlanAssociation_ + != com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance()) { + getBackupPlanAssociationBuilder().mergeFrom(value); + } else { + backupPlanAssociation_ = value; + } + } else { + backupPlanAssociationBuilder_.mergeFrom(value); + } + if (backupPlanAssociation_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupPlanAssociation() { + bitField0_ = (bitField0_ & ~0x00000004); + backupPlanAssociation_ = null; + if (backupPlanAssociationBuilder_ != null) { + backupPlanAssociationBuilder_.dispose(); + backupPlanAssociationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder + getBackupPlanAssociationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetBackupPlanAssociationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationOrBuilder() { + if (backupPlanAssociationBuilder_ != null) { + return backupPlanAssociationBuilder_.getMessageOrBuilder(); + } else { + return backupPlanAssociation_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance() + : backupPlanAssociation_; + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder> + internalGetBackupPlanAssociationFieldBuilder() { + if (backupPlanAssociationBuilder_ == null) { + backupPlanAssociationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder>( + getBackupPlanAssociation(), getParentForChildren(), isClean()); + backupPlanAssociation_ = null; + } + return backupPlanAssociationBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) + private static final com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest(); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBackupPlanAssociationRequest 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.backupdr.v1beta.CreateBackupPlanAssociationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanAssociationRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanAssociationRequestOrBuilder.java new file mode 100644 index 000000000000..9a20f3fa5611 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanAssociationRequestOrBuilder.java @@ -0,0 +1,188 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CreateBackupPlanAssociationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The backup plan association project and location in the format
+   * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+   * map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The backup plan association project and location in the format
+   * `projects/{project_id}/locations/{location}`. In Backup and DR locations
+   * map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The name of the backup plan association to create. The name must
+   * be unique for the specified project and location.
+   * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPlanAssociationId. + */ + java.lang.String getBackupPlanAssociationId(); + + /** + * + * + *
+   * Required. The name of the backup plan association to create. The name must
+   * be unique for the specified project and location.
+   * 
+ * + * string backup_plan_association_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPlanAssociationId. + */ + com.google.protobuf.ByteString getBackupPlanAssociationIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlanAssociation field is set. + */ + boolean hasBackupPlanAssociation(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlanAssociation. + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociation(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanRequest.java new file mode 100644 index 000000000000..0bc013f48d31 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanRequest.java @@ -0,0 +1,1439 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The request message for creating a `BackupPlan`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateBackupPlanRequest} + */ +@com.google.protobuf.Generated +public final class CreateBackupPlanRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CreateBackupPlanRequest) + CreateBackupPlanRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateBackupPlanRequest"); + } + + // Use CreateBackupPlanRequest.newBuilder() to construct. + private CreateBackupPlanRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateBackupPlanRequest() { + parent_ = ""; + backupPlanId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest.class, + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The `BackupPlan` project and location in the format
+   * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+   * locations map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * 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 `BackupPlan` project and location in the format
+   * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+   * locations map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * 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_PLAN_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanId_ = ""; + + /** + * + * + *
+   * Required. The name of the `BackupPlan` to create. The name must be unique
+   * for the specified project and location.The name must start with a lowercase
+   * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+   * Pattern, /[a-z][a-z0-9-]{,62}/.
+   * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPlanId. + */ + @java.lang.Override + public java.lang.String getBackupPlanId() { + java.lang.Object ref = backupPlanId_; + 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(); + backupPlanId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the `BackupPlan` to create. The name must be unique
+   * for the specified project and location.The name must start with a lowercase
+   * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+   * Pattern, /[a-z][a-z0-9-]{,62}/.
+   * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPlanId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanIdBytes() { + java.lang.Object ref = backupPlanId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_FIELD_NUMBER = 3; + private com.google.cloud.backupdr.v1beta.BackupPlan backupPlan_; + + /** + * + * + *
+   * Required. The `BackupPlan` resource object to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlan field is set. + */ + @java.lang.Override + public boolean hasBackupPlan() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The `BackupPlan` resource object to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlan. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlan() { + return backupPlan_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlan_; + } + + /** + * + * + *
+   * Required. The `BackupPlan` resource object to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanOrBuilder() { + return backupPlan_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlan_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupPlanId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getBackupPlan()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupPlanId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackupPlan()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.backupdr.v1beta.CreateBackupPlanRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest other = + (com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getBackupPlanId().equals(other.getBackupPlanId())) return false; + if (hasBackupPlan() != other.hasBackupPlan()) return false; + if (hasBackupPlan()) { + if (!getBackupPlan().equals(other.getBackupPlan())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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_PLAN_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanId().hashCode(); + if (hasBackupPlan()) { + hash = (37 * hash) + BACKUP_PLAN_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlan().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest 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.backupdr.v1beta.CreateBackupPlanRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest 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.backupdr.v1beta.CreateBackupPlanRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CreateBackupPlanRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request message for creating a `BackupPlan`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateBackupPlanRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CreateBackupPlanRequest) + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest.class, + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupPlanFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupPlanId_ = ""; + backupPlan_ = null; + if (backupPlanBuilder_ != null) { + backupPlanBuilder_.dispose(); + backupPlanBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupPlanRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest build() { + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest buildPartial() { + com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest result = + new com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPlanId_ = backupPlanId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupPlan_ = backupPlanBuilder_ == null ? backupPlan_ : backupPlanBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest other) { + if (other == com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupPlanId().isEmpty()) { + backupPlanId_ = other.backupPlanId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBackupPlan()) { + mergeBackupPlan(other.getBackupPlan()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + 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: + { + backupPlanId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetBackupPlanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 `BackupPlan` project and location in the format
+     * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 `BackupPlan` project and location in the format
+     * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 `BackupPlan` project and location in the format
+     * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 `BackupPlan` project and location in the format
+     * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 `BackupPlan` project and location in the format
+     * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 backupPlanId_ = ""; + + /** + * + * + *
+     * Required. The name of the `BackupPlan` to create. The name must be unique
+     * for the specified project and location.The name must start with a lowercase
+     * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+     * Pattern, /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPlanId. + */ + public java.lang.String getBackupPlanId() { + java.lang.Object ref = backupPlanId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the `BackupPlan` to create. The name must be unique
+     * for the specified project and location.The name must start with a lowercase
+     * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+     * Pattern, /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPlanId. + */ + public com.google.protobuf.ByteString getBackupPlanIdBytes() { + java.lang.Object ref = backupPlanId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the `BackupPlan` to create. The name must be unique
+     * for the specified project and location.The name must start with a lowercase
+     * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+     * Pattern, /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The backupPlanId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the `BackupPlan` to create. The name must be unique
+     * for the specified project and location.The name must start with a lowercase
+     * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+     * Pattern, /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanId() { + backupPlanId_ = getDefaultInstance().getBackupPlanId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the `BackupPlan` to create. The name must be unique
+     * for the specified project and location.The name must start with a lowercase
+     * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+     * Pattern, /[a-z][a-z0-9-]{,62}/.
+     * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for backupPlanId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.BackupPlan backupPlan_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder> + backupPlanBuilder_; + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlan field is set. + */ + public boolean hasBackupPlan() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlan. + */ + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlan() { + if (backupPlanBuilder_ == null) { + return backupPlan_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlan_; + } else { + return backupPlanBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlan(com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupPlan_ = value; + } else { + backupPlanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlan( + com.google.cloud.backupdr.v1beta.BackupPlan.Builder builderForValue) { + if (backupPlanBuilder_ == null) { + backupPlan_ = builderForValue.build(); + } else { + backupPlanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupPlan(com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlanBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && backupPlan_ != null + && backupPlan_ != com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance()) { + getBackupPlanBuilder().mergeFrom(value); + } else { + backupPlan_ = value; + } + } else { + backupPlanBuilder_.mergeFrom(value); + } + if (backupPlan_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupPlan() { + bitField0_ = (bitField0_ & ~0x00000004); + backupPlan_ = null; + if (backupPlanBuilder_ != null) { + backupPlanBuilder_.dispose(); + backupPlanBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlan.Builder getBackupPlanBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetBackupPlanFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanOrBuilder() { + if (backupPlanBuilder_ != null) { + return backupPlanBuilder_.getMessageOrBuilder(); + } else { + return backupPlan_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlan_; + } + } + + /** + * + * + *
+     * Required. The `BackupPlan` resource object to create.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder> + internalGetBackupPlanFieldBuilder() { + if (backupPlanBuilder_ == null) { + backupPlanBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder>( + getBackupPlan(), getParentForChildren(), isClean()); + backupPlan_ = null; + } + return backupPlanBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CreateBackupPlanRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CreateBackupPlanRequest) + private static final com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest(); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateBackupPlanRequest 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.backupdr.v1beta.CreateBackupPlanRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanRequestOrBuilder.java new file mode 100644 index 000000000000..0e2c66eab533 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupPlanRequestOrBuilder.java @@ -0,0 +1,191 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CreateBackupPlanRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CreateBackupPlanRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `BackupPlan` project and location in the format
+   * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+   * locations map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The `BackupPlan` project and location in the format
+   * `projects/{project}/locations/{location}`. In Google Cloud Backup and DR
+   * locations map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The name of the `BackupPlan` to create. The name must be unique
+   * for the specified project and location.The name must start with a lowercase
+   * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+   * Pattern, /[a-z][a-z0-9-]{,62}/.
+   * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupPlanId. + */ + java.lang.String getBackupPlanId(); + + /** + * + * + *
+   * Required. The name of the `BackupPlan` to create. The name must be unique
+   * for the specified project and location.The name must start with a lowercase
+   * letter followed by up to 62 lowercase letters, numbers, or hyphens.
+   * Pattern, /[a-z][a-z0-9-]{,62}/.
+   * 
+ * + * string backup_plan_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupPlanId. + */ + com.google.protobuf.ByteString getBackupPlanIdBytes(); + + /** + * + * + *
+   * Required. The `BackupPlan` resource object to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlan field is set. + */ + boolean hasBackupPlan(); + + /** + * + * + *
+   * Required. The `BackupPlan` resource object to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlan. + */ + com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlan(); + + /** + * + * + *
+   * Required. The `BackupPlan` resource object to create.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupVaultRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupVaultRequest.java new file mode 100644 index 000000000000..77bc3e424b95 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupVaultRequest.java @@ -0,0 +1,1520 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Message for creating a BackupVault.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateBackupVaultRequest} + */ +@com.google.protobuf.Generated +public final class CreateBackupVaultRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CreateBackupVaultRequest) + CreateBackupVaultRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateBackupVaultRequest"); + } + + // Use CreateBackupVaultRequest.newBuilder() to construct. + private CreateBackupVaultRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateBackupVaultRequest() { + parent_ = ""; + backupVaultId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest.class, + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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. ID of the requesting object
+   * If auto-generating ID server-side, remove this field and
+   * backup_vault_id from the method_signature of Create RPC
+   * 
+ * + * 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. ID of the requesting object
+   * If auto-generating ID server-side, remove this field and
+   * backup_vault_id from the method_signature of Create RPC
+   * 
+ * + * 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.backupdr.v1beta.BackupVault backupVault_; + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + @java.lang.Override + public boolean hasBackupVault() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVault() { + return backupVault_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance() + : backupVault_; + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultOrBuilder() { + return backupVault_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance() + : backupVault_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is 'false'.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVaultId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupVaultId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getBackupVault()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVaultId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupVaultId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackupVault()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + 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.backupdr.v1beta.CreateBackupVaultRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest other = + (com.google.cloud.backupdr.v1beta.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 (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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 = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.CreateBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.CreateBackupVaultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for creating a BackupVault.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateBackupVaultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CreateBackupVaultRequest) + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest.class, + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupVaultFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + backupVaultId_ = ""; + backupVault_ = null; + if (backupVaultBuilder_ != null) { + backupVaultBuilder_.dispose(); + backupVaultBuilder_ = null; + } + requestId_ = ""; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_CreateBackupVaultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest build() { + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest buildPartial() { + com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest result = + new com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupVaultId_ = backupVaultId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupVault_ = + backupVaultBuilder_ == null ? backupVault_ : backupVaultBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest other) { + if (other == com.google.cloud.backupdr.v1beta.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()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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( + internalGetBackupVaultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. ID of the requesting object
+     * If auto-generating ID server-side, remove this field and
+     * backup_vault_id from the method_signature of Create RPC
+     * 
+ * + * 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. ID of the requesting object
+     * If auto-generating ID server-side, remove this field and
+     * backup_vault_id from the method_signature of Create RPC
+     * 
+ * + * 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. ID of the requesting object
+     * If auto-generating ID server-side, remove this field and
+     * backup_vault_id from the method_signature of Create RPC
+     * 
+ * + * 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. ID of the requesting object
+     * If auto-generating ID server-side, remove this field and
+     * backup_vault_id from the method_signature of Create RPC
+     * 
+ * + * 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. ID of the requesting object
+     * If auto-generating ID server-side, remove this field and
+     * backup_vault_id from the method_signature of Create RPC
+     * 
+ * + * 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.backupdr.v1beta.BackupVault backupVault_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder> + backupVaultBuilder_; + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + public boolean hasBackupVault() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVault() { + if (backupVaultBuilder_ == null) { + return backupVault_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance() + : backupVault_; + } else { + return backupVaultBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupVault(com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupVault_ = value; + } else { + backupVaultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupVault( + com.google.cloud.backupdr.v1beta.BackupVault.Builder builderForValue) { + if (backupVaultBuilder_ == null) { + backupVault_ = builderForValue.build(); + } else { + backupVaultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupVault(com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && backupVault_ != null + && backupVault_ != com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance()) { + getBackupVaultBuilder().mergeFrom(value); + } else { + backupVault_ = value; + } + } else { + backupVaultBuilder_.mergeFrom(value); + } + if (backupVault_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.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. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupVault.Builder getBackupVaultBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetBackupVaultFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultOrBuilder() { + if (backupVaultBuilder_ != null) { + return backupVaultBuilder_.getMessageOrBuilder(); + } else { + return backupVault_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance() + : backupVault_; + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder> + internalGetBackupVaultFieldBuilder() { + if (backupVaultBuilder_ == null) { + backupVaultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder>( + getBackupVault(), getParentForChildren(), isClean()); + backupVault_ = null; + } + return backupVaultBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CreateBackupVaultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CreateBackupVaultRequest) + private static final com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.CreateBackupVaultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupVaultRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupVaultRequestOrBuilder.java new file mode 100644 index 000000000000..510049897855 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateBackupVaultRequestOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CreateBackupVaultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CreateBackupVaultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. ID of the requesting object
+   * If auto-generating ID server-side, remove this field and
+   * backup_vault_id from the method_signature of Create RPC
+   * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The backupVaultId. + */ + java.lang.String getBackupVaultId(); + + /** + * + * + *
+   * Required. ID of the requesting object
+   * If auto-generating ID server-side, remove this field and
+   * backup_vault_id from the method_signature of Create RPC
+   * 
+ * + * string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for backupVaultId. + */ + com.google.protobuf.ByteString getBackupVaultIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + boolean hasBackupVault(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + com.google.cloud.backupdr.v1beta.BackupVault getBackupVault(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is 'false'.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateManagementServerRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateManagementServerRequest.java new file mode 100644 index 000000000000..9468fd89d14a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateManagementServerRequest.java @@ -0,0 +1,1432 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for creating a management server instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateManagementServerRequest} + */ +@com.google.protobuf.Generated +public final class CreateManagementServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CreateManagementServerRequest) + CreateManagementServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CreateManagementServerRequest"); + } + + // Use CreateManagementServerRequest.newBuilder() to construct. + private CreateManagementServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateManagementServerRequest() { + parent_ = ""; + managementServerId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_CreateManagementServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_CreateManagementServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest.class, + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The management server project and location in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+   * locations map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * 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 management server project and location in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+   * locations map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * 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 MANAGEMENT_SERVER_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object managementServerId_ = ""; + + /** + * + * + *
+   * Required. The name of the management server to create. The name must be
+   * unique for the specified project and location.
+   * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The managementServerId. + */ + @java.lang.Override + public java.lang.String getManagementServerId() { + java.lang.Object ref = managementServerId_; + 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(); + managementServerId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the management server to create. The name must be
+   * unique for the specified project and location.
+   * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for managementServerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManagementServerIdBytes() { + java.lang.Object ref = managementServerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + managementServerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MANAGEMENT_SERVER_FIELD_NUMBER = 3; + private com.google.cloud.backupdr.v1beta.ManagementServer managementServer_; + + /** + * + * + *
+   * Required. A [management server
+   * resource][google.cloud.backupdr.v1.ManagementServer]
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the managementServer field is set. + */ + @java.lang.Override + public boolean hasManagementServer() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. A [management server
+   * resource][google.cloud.backupdr.v1.ManagementServer]
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementServer. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer getManagementServer() { + return managementServer_ == null + ? com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance() + : managementServer_; + } + + /** + * + * + *
+   * Required. A [management server
+   * resource][google.cloud.backupdr.v1.ManagementServer]
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder getManagementServerOrBuilder() { + return managementServer_ == null + ? com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance() + : managementServer_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(managementServerId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, managementServerId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getManagementServer()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(managementServerId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, managementServerId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getManagementServer()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } + 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.backupdr.v1beta.CreateManagementServerRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest other = + (com.google.cloud.backupdr.v1beta.CreateManagementServerRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getManagementServerId().equals(other.getManagementServerId())) return false; + if (hasManagementServer() != other.hasManagementServer()) return false; + if (hasManagementServer()) { + if (!getManagementServer().equals(other.getManagementServer())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + MANAGEMENT_SERVER_ID_FIELD_NUMBER; + hash = (53 * hash) + getManagementServerId().hashCode(); + if (hasManagementServer()) { + hash = (37 * hash) + MANAGEMENT_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getManagementServer().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest 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.backupdr.v1beta.CreateManagementServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest 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.backupdr.v1beta.CreateManagementServerRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CreateManagementServerRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for creating a management server instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CreateManagementServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CreateManagementServerRequest) + com.google.cloud.backupdr.v1beta.CreateManagementServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_CreateManagementServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_CreateManagementServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest.class, + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.CreateManagementServerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetManagementServerFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + managementServerId_ = ""; + managementServer_ = null; + if (managementServerBuilder_ != null) { + managementServerBuilder_.dispose(); + managementServerBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_CreateManagementServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateManagementServerRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CreateManagementServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateManagementServerRequest build() { + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CreateManagementServerRequest buildPartial() { + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest result = + new com.google.cloud.backupdr.v1beta.CreateManagementServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.CreateManagementServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.managementServerId_ = managementServerId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.managementServer_ = + managementServerBuilder_ == null ? managementServer_ : managementServerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CreateManagementServerRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.CreateManagementServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.CreateManagementServerRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.CreateManagementServerRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getManagementServerId().isEmpty()) { + managementServerId_ = other.managementServerId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasManagementServer()) { + mergeManagementServer(other.getManagementServer()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + 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: + { + managementServerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetManagementServerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 management server project and location in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 management server project and location in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 management server project and location in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 management server project and location in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 management server project and location in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+     * locations map to Google Cloud regions, for example **us-central1**.
+     * 
+ * + * + * 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 managementServerId_ = ""; + + /** + * + * + *
+     * Required. The name of the management server to create. The name must be
+     * unique for the specified project and location.
+     * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The managementServerId. + */ + public java.lang.String getManagementServerId() { + java.lang.Object ref = managementServerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + managementServerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the management server to create. The name must be
+     * unique for the specified project and location.
+     * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for managementServerId. + */ + public com.google.protobuf.ByteString getManagementServerIdBytes() { + java.lang.Object ref = managementServerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + managementServerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the management server to create. The name must be
+     * unique for the specified project and location.
+     * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The managementServerId to set. + * @return This builder for chaining. + */ + public Builder setManagementServerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + managementServerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the management server to create. The name must be
+     * unique for the specified project and location.
+     * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearManagementServerId() { + managementServerId_ = getDefaultInstance().getManagementServerId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the management server to create. The name must be
+     * unique for the specified project and location.
+     * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for managementServerId to set. + * @return This builder for chaining. + */ + public Builder setManagementServerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + managementServerId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.ManagementServer managementServer_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementServer, + com.google.cloud.backupdr.v1beta.ManagementServer.Builder, + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder> + managementServerBuilder_; + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the managementServer field is set. + */ + public boolean hasManagementServer() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementServer. + */ + public com.google.cloud.backupdr.v1beta.ManagementServer getManagementServer() { + if (managementServerBuilder_ == null) { + return managementServer_ == null + ? com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance() + : managementServer_; + } else { + return managementServerBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setManagementServer(com.google.cloud.backupdr.v1beta.ManagementServer value) { + if (managementServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + managementServer_ = value; + } else { + managementServerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setManagementServer( + com.google.cloud.backupdr.v1beta.ManagementServer.Builder builderForValue) { + if (managementServerBuilder_ == null) { + managementServer_ = builderForValue.build(); + } else { + managementServerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeManagementServer(com.google.cloud.backupdr.v1beta.ManagementServer value) { + if (managementServerBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && managementServer_ != null + && managementServer_ + != com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance()) { + getManagementServerBuilder().mergeFrom(value); + } else { + managementServer_ = value; + } + } else { + managementServerBuilder_.mergeFrom(value); + } + if (managementServer_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearManagementServer() { + bitField0_ = (bitField0_ & ~0x00000004); + managementServer_ = null; + if (managementServerBuilder_ != null) { + managementServerBuilder_.dispose(); + managementServerBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.ManagementServer.Builder getManagementServerBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetManagementServerFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder + getManagementServerOrBuilder() { + if (managementServerBuilder_ != null) { + return managementServerBuilder_.getMessageOrBuilder(); + } else { + return managementServer_ == null + ? com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance() + : managementServer_; + } + } + + /** + * + * + *
+     * Required. A [management server
+     * resource][google.cloud.backupdr.v1.ManagementServer]
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementServer, + com.google.cloud.backupdr.v1beta.ManagementServer.Builder, + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder> + internalGetManagementServerFieldBuilder() { + if (managementServerBuilder_ == null) { + managementServerBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementServer, + com.google.cloud.backupdr.v1beta.ManagementServer.Builder, + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder>( + getManagementServer(), getParentForChildren(), isClean()); + managementServer_ = null; + } + return managementServerBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CreateManagementServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CreateManagementServerRequest) + private static final com.google.cloud.backupdr.v1beta.CreateManagementServerRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CreateManagementServerRequest(); + } + + public static com.google.cloud.backupdr.v1beta.CreateManagementServerRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateManagementServerRequest 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.backupdr.v1beta.CreateManagementServerRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateManagementServerRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateManagementServerRequestOrBuilder.java new file mode 100644 index 000000000000..b666746ea8d0 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CreateManagementServerRequestOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CreateManagementServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CreateManagementServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The management server project and location in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+   * locations map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The management server project and location in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR
+   * locations map to Google Cloud regions, for example **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The name of the management server to create. The name must be
+   * unique for the specified project and location.
+   * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The managementServerId. + */ + java.lang.String getManagementServerId(); + + /** + * + * + *
+   * Required. The name of the management server to create. The name must be
+   * unique for the specified project and location.
+   * 
+ * + * string management_server_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for managementServerId. + */ + com.google.protobuf.ByteString getManagementServerIdBytes(); + + /** + * + * + *
+   * Required. A [management server
+   * resource][google.cloud.backupdr.v1.ManagementServer]
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the managementServer field is set. + */ + boolean hasManagementServer(); + + /** + * + * + *
+   * Required. A [management server
+   * resource][google.cloud.backupdr.v1.ManagementServer]
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The managementServer. + */ + com.google.cloud.backupdr.v1beta.ManagementServer getManagementServer(); + + /** + * + * + *
+   * Required. A [management server
+   * resource][google.cloud.backupdr.v1.ManagementServer]
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer management_server = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder getManagementServerOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Criteria.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Criteria.java new file mode 100644 index 000000000000..dfb45a225811 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Criteria.java @@ -0,0 +1,1007 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Criteria specifies a set of criteria for matching resources.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Criteria} + */ +@com.google.protobuf.Generated +public final class Criteria extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.Criteria) + CriteriaOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Criteria"); + } + + // Use Criteria.newBuilder() to construct. + private Criteria(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Criteria() { + matchingConditions_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_Criteria_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_Criteria_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Criteria.class, + com.google.cloud.backupdr.v1beta.Criteria.Builder.class); + } + + public static final int MATCHING_CONDITIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List matchingConditions_; + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMatchingConditionsList() { + return matchingConditions_; + } + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getMatchingConditionsOrBuilderList() { + return matchingConditions_; + } + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getMatchingConditionsCount() { + return matchingConditions_.size(); + } + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.MatchingCondition getMatchingConditions(int index) { + return matchingConditions_.get(index); + } + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.MatchingConditionOrBuilder getMatchingConditionsOrBuilder( + int index) { + return matchingConditions_.get(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 < matchingConditions_.size(); i++) { + output.writeMessage(1, matchingConditions_.get(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 < matchingConditions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, matchingConditions_.get(i)); + } + 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.backupdr.v1beta.Criteria)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.Criteria other = + (com.google.cloud.backupdr.v1beta.Criteria) obj; + + if (!getMatchingConditionsList().equals(other.getMatchingConditionsList())) 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 (getMatchingConditionsCount() > 0) { + hash = (37 * hash) + MATCHING_CONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getMatchingConditionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.Criteria parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Criteria 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.backupdr.v1beta.Criteria parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Criteria 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.backupdr.v1beta.Criteria parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Criteria parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Criteria parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Criteria parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Criteria parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Criteria parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Criteria parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Criteria parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.Criteria 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Criteria specifies a set of criteria for matching resources.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Criteria} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.Criteria) + com.google.cloud.backupdr.v1beta.CriteriaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_Criteria_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_Criteria_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Criteria.class, + com.google.cloud.backupdr.v1beta.Criteria.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.Criteria.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (matchingConditionsBuilder_ == null) { + matchingConditions_ = java.util.Collections.emptyList(); + } else { + matchingConditions_ = null; + matchingConditionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_Criteria_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Criteria getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Criteria build() { + com.google.cloud.backupdr.v1beta.Criteria result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Criteria buildPartial() { + com.google.cloud.backupdr.v1beta.Criteria result = + new com.google.cloud.backupdr.v1beta.Criteria(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.backupdr.v1beta.Criteria result) { + if (matchingConditionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + matchingConditions_ = java.util.Collections.unmodifiableList(matchingConditions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.matchingConditions_ = matchingConditions_; + } else { + result.matchingConditions_ = matchingConditionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.Criteria result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.Criteria) { + return mergeFrom((com.google.cloud.backupdr.v1beta.Criteria) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.Criteria other) { + if (other == com.google.cloud.backupdr.v1beta.Criteria.getDefaultInstance()) return this; + if (matchingConditionsBuilder_ == null) { + if (!other.matchingConditions_.isEmpty()) { + if (matchingConditions_.isEmpty()) { + matchingConditions_ = other.matchingConditions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMatchingConditionsIsMutable(); + matchingConditions_.addAll(other.matchingConditions_); + } + onChanged(); + } + } else { + if (!other.matchingConditions_.isEmpty()) { + if (matchingConditionsBuilder_.isEmpty()) { + matchingConditionsBuilder_.dispose(); + matchingConditionsBuilder_ = null; + matchingConditions_ = other.matchingConditions_; + bitField0_ = (bitField0_ & ~0x00000001); + matchingConditionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMatchingConditionsFieldBuilder() + : null; + } else { + matchingConditionsBuilder_.addAllMessages(other.matchingConditions_); + } + } + } + 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.backupdr.v1beta.MatchingCondition m = + input.readMessage( + com.google.cloud.backupdr.v1beta.MatchingCondition.parser(), + extensionRegistry); + if (matchingConditionsBuilder_ == null) { + ensureMatchingConditionsIsMutable(); + matchingConditions_.add(m); + } else { + matchingConditionsBuilder_.addMessage(m); + } + 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.util.List matchingConditions_ = + java.util.Collections.emptyList(); + + private void ensureMatchingConditionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + matchingConditions_ = + new java.util.ArrayList( + matchingConditions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.MatchingCondition, + com.google.cloud.backupdr.v1beta.MatchingCondition.Builder, + com.google.cloud.backupdr.v1beta.MatchingConditionOrBuilder> + matchingConditionsBuilder_; + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMatchingConditionsList() { + if (matchingConditionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(matchingConditions_); + } else { + return matchingConditionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getMatchingConditionsCount() { + if (matchingConditionsBuilder_ == null) { + return matchingConditions_.size(); + } else { + return matchingConditionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.MatchingCondition getMatchingConditions(int index) { + if (matchingConditionsBuilder_ == null) { + return matchingConditions_.get(index); + } else { + return matchingConditionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMatchingConditions( + int index, com.google.cloud.backupdr.v1beta.MatchingCondition value) { + if (matchingConditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingConditionsIsMutable(); + matchingConditions_.set(index, value); + onChanged(); + } else { + matchingConditionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMatchingConditions( + int index, com.google.cloud.backupdr.v1beta.MatchingCondition.Builder builderForValue) { + if (matchingConditionsBuilder_ == null) { + ensureMatchingConditionsIsMutable(); + matchingConditions_.set(index, builderForValue.build()); + onChanged(); + } else { + matchingConditionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMatchingConditions(com.google.cloud.backupdr.v1beta.MatchingCondition value) { + if (matchingConditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingConditionsIsMutable(); + matchingConditions_.add(value); + onChanged(); + } else { + matchingConditionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMatchingConditions( + int index, com.google.cloud.backupdr.v1beta.MatchingCondition value) { + if (matchingConditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingConditionsIsMutable(); + matchingConditions_.add(index, value); + onChanged(); + } else { + matchingConditionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMatchingConditions( + com.google.cloud.backupdr.v1beta.MatchingCondition.Builder builderForValue) { + if (matchingConditionsBuilder_ == null) { + ensureMatchingConditionsIsMutable(); + matchingConditions_.add(builderForValue.build()); + onChanged(); + } else { + matchingConditionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addMatchingConditions( + int index, com.google.cloud.backupdr.v1beta.MatchingCondition.Builder builderForValue) { + if (matchingConditionsBuilder_ == null) { + ensureMatchingConditionsIsMutable(); + matchingConditions_.add(index, builderForValue.build()); + onChanged(); + } else { + matchingConditionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllMatchingConditions( + java.lang.Iterable values) { + if (matchingConditionsBuilder_ == null) { + ensureMatchingConditionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matchingConditions_); + onChanged(); + } else { + matchingConditionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMatchingConditions() { + if (matchingConditionsBuilder_ == null) { + matchingConditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + matchingConditionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeMatchingConditions(int index) { + if (matchingConditionsBuilder_ == null) { + ensureMatchingConditionsIsMutable(); + matchingConditions_.remove(index); + onChanged(); + } else { + matchingConditionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.MatchingCondition.Builder getMatchingConditionsBuilder( + int index) { + return internalGetMatchingConditionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.MatchingConditionOrBuilder + getMatchingConditionsOrBuilder(int index) { + if (matchingConditionsBuilder_ == null) { + return matchingConditions_.get(index); + } else { + return matchingConditionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMatchingConditionsOrBuilderList() { + if (matchingConditionsBuilder_ != null) { + return matchingConditionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(matchingConditions_); + } + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.MatchingCondition.Builder + addMatchingConditionsBuilder() { + return internalGetMatchingConditionsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.MatchingCondition.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.MatchingCondition.Builder addMatchingConditionsBuilder( + int index) { + return internalGetMatchingConditionsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.MatchingCondition.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. A list of matching conditions that a resource must meet to be
+     * protected by the policy.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getMatchingConditionsBuilderList() { + return internalGetMatchingConditionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.MatchingCondition, + com.google.cloud.backupdr.v1beta.MatchingCondition.Builder, + com.google.cloud.backupdr.v1beta.MatchingConditionOrBuilder> + internalGetMatchingConditionsFieldBuilder() { + if (matchingConditionsBuilder_ == null) { + matchingConditionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.MatchingCondition, + com.google.cloud.backupdr.v1beta.MatchingCondition.Builder, + com.google.cloud.backupdr.v1beta.MatchingConditionOrBuilder>( + matchingConditions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + matchingConditions_ = null; + } + return matchingConditionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.Criteria) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.Criteria) + private static final com.google.cloud.backupdr.v1beta.Criteria DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.Criteria(); + } + + public static com.google.cloud.backupdr.v1beta.Criteria getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Criteria 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.backupdr.v1beta.Criteria getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CriteriaOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CriteriaOrBuilder.java new file mode 100644 index 000000000000..f9f2c754bcac --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CriteriaOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CriteriaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.Criteria) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getMatchingConditionsList(); + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.MatchingCondition getMatchingConditions(int index); + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getMatchingConditionsCount(); + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getMatchingConditionsOrBuilderList(); + + /** + * + * + *
+   * Required. A list of matching conditions that a resource must meet to be
+   * protected by the policy.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.MatchingCondition matching_conditions = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.MatchingConditionOrBuilder getMatchingConditionsOrBuilder( + int index); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CustomerEncryptionKey.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CustomerEncryptionKey.java new file mode 100644 index 000000000000..2cf5e99dd7e0 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CustomerEncryptionKey.java @@ -0,0 +1,1507 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A customer-supplied encryption key.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CustomerEncryptionKey} + */ +@com.google.protobuf.Generated +public final class CustomerEncryptionKey extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.CustomerEncryptionKey) + CustomerEncryptionKeyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CustomerEncryptionKey"); + } + + // Use CustomerEncryptionKey.newBuilder() to construct. + private CustomerEncryptionKey(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CustomerEncryptionKey() { + kmsKeyServiceAccount_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_CustomerEncryptionKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_CustomerEncryptionKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.class, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder.class); + } + + private int bitField0_; + private int keyCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object key_; + + public enum KeyCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RAW_KEY(1), + RSA_ENCRYPTED_KEY(2), + KMS_KEY_NAME(3), + KEY_NOT_SET(0); + private final int value; + + private KeyCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static KeyCase valueOf(int value) { + return forNumber(value); + } + + public static KeyCase forNumber(int value) { + switch (value) { + case 1: + return RAW_KEY; + case 2: + return RSA_ENCRYPTED_KEY; + case 3: + return KMS_KEY_NAME; + case 0: + return KEY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KeyCase getKeyCase() { + return KeyCase.forNumber(keyCase_); + } + + public static final int RAW_KEY_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Optional. Specifies a 256-bit customer-supplied
+   * encryption key.
+   * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rawKey field is set. + */ + public boolean hasRawKey() { + return keyCase_ == 1; + } + + /** + * + * + *
+   * Optional. Specifies a 256-bit customer-supplied
+   * encryption key.
+   * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rawKey. + */ + public java.lang.String getRawKey() { + java.lang.Object ref = ""; + if (keyCase_ == 1) { + ref = key_; + } + 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 (keyCase_ == 1) { + key_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. Specifies a 256-bit customer-supplied
+   * encryption key.
+   * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rawKey. + */ + public com.google.protobuf.ByteString getRawKeyBytes() { + java.lang.Object ref = ""; + if (keyCase_ == 1) { + ref = key_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyCase_ == 1) { + key_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RSA_ENCRYPTED_KEY_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Optional. RSA-wrapped 2048-bit
+   * customer-supplied encryption key to either encrypt or decrypt this
+   * resource.
+   * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rsaEncryptedKey field is set. + */ + public boolean hasRsaEncryptedKey() { + return keyCase_ == 2; + } + + /** + * + * + *
+   * Optional. RSA-wrapped 2048-bit
+   * customer-supplied encryption key to either encrypt or decrypt this
+   * resource.
+   * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rsaEncryptedKey. + */ + public java.lang.String getRsaEncryptedKey() { + java.lang.Object ref = ""; + if (keyCase_ == 2) { + ref = key_; + } + 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 (keyCase_ == 2) { + key_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. RSA-wrapped 2048-bit
+   * customer-supplied encryption key to either encrypt or decrypt this
+   * resource.
+   * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rsaEncryptedKey. + */ + public com.google.protobuf.ByteString getRsaEncryptedKeyBytes() { + java.lang.Object ref = ""; + if (keyCase_ == 2) { + ref = key_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyCase_ == 2) { + key_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Optional. The name of the encryption key that is stored in Google Cloud
+   * KMS.
+   * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the kmsKeyName field is set. + */ + public boolean hasKmsKeyName() { + return keyCase_ == 3; + } + + /** + * + * + *
+   * Optional. The name of the encryption key that is stored in Google Cloud
+   * KMS.
+   * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = ""; + if (keyCase_ == 3) { + ref = key_; + } + 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 (keyCase_ == 3) { + key_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The name of the encryption key that is stored in Google Cloud
+   * KMS.
+   * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = ""; + if (keyCase_ == 3) { + ref = key_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyCase_ == 3) { + key_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_SERVICE_ACCOUNT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyServiceAccount_ = ""; + + /** + * + * + *
+   * Optional. The service account being used for the encryption request for the
+   * given KMS key. If absent, the Compute Engine default service account is
+   * used.
+   * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the kmsKeyServiceAccount field is set. + */ + @java.lang.Override + public boolean hasKmsKeyServiceAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The service account being used for the encryption request for the
+   * given KMS key. If absent, the Compute Engine default service account is
+   * used.
+   * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The kmsKeyServiceAccount. + */ + @java.lang.Override + public java.lang.String getKmsKeyServiceAccount() { + java.lang.Object ref = kmsKeyServiceAccount_; + 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(); + kmsKeyServiceAccount_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The service account being used for the encryption request for the
+   * given KMS key. If absent, the Compute Engine default service account is
+   * used.
+   * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for kmsKeyServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyServiceAccountBytes() { + java.lang.Object ref = kmsKeyServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyServiceAccount_ = 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 (keyCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + if (keyCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, key_); + } + if (keyCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, key_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, kmsKeyServiceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (keyCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + if (keyCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, key_); + } + if (keyCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, key_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, kmsKeyServiceAccount_); + } + 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.backupdr.v1beta.CustomerEncryptionKey)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey other = + (com.google.cloud.backupdr.v1beta.CustomerEncryptionKey) obj; + + if (hasKmsKeyServiceAccount() != other.hasKmsKeyServiceAccount()) return false; + if (hasKmsKeyServiceAccount()) { + if (!getKmsKeyServiceAccount().equals(other.getKmsKeyServiceAccount())) return false; + } + if (!getKeyCase().equals(other.getKeyCase())) return false; + switch (keyCase_) { + case 1: + if (!getRawKey().equals(other.getRawKey())) return false; + break; + case 2: + if (!getRsaEncryptedKey().equals(other.getRsaEncryptedKey())) return false; + break; + case 3: + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + break; + case 0: + default: + } + 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 (hasKmsKeyServiceAccount()) { + hash = (37 * hash) + KMS_KEY_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyServiceAccount().hashCode(); + } + switch (keyCase_) { + case 1: + hash = (37 * hash) + RAW_KEY_FIELD_NUMBER; + hash = (53 * hash) + getRawKey().hashCode(); + break; + case 2: + hash = (37 * hash) + RSA_ENCRYPTED_KEY_FIELD_NUMBER; + hash = (53 * hash) + getRsaEncryptedKey().hashCode(); + break; + case 3: + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey 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.backupdr.v1beta.CustomerEncryptionKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey 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.backupdr.v1beta.CustomerEncryptionKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.CustomerEncryptionKey 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A customer-supplied encryption key.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.CustomerEncryptionKey} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.CustomerEncryptionKey) + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_CustomerEncryptionKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_CustomerEncryptionKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.class, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKeyServiceAccount_ = ""; + keyCase_ = 0; + key_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_CustomerEncryptionKey_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey build() { + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey buildPartial() { + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey result = + new com.google.cloud.backupdr.v1beta.CustomerEncryptionKey(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.CustomerEncryptionKey result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kmsKeyServiceAccount_ = kmsKeyServiceAccount_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.CustomerEncryptionKey result) { + result.keyCase_ = keyCase_; + result.key_ = this.key_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.CustomerEncryptionKey) { + return mergeFrom((com.google.cloud.backupdr.v1beta.CustomerEncryptionKey) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.CustomerEncryptionKey other) { + if (other == com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance()) + return this; + if (other.hasKmsKeyServiceAccount()) { + kmsKeyServiceAccount_ = other.kmsKeyServiceAccount_; + bitField0_ |= 0x00000008; + onChanged(); + } + switch (other.getKeyCase()) { + case RAW_KEY: + { + keyCase_ = 1; + key_ = other.key_; + onChanged(); + break; + } + case RSA_ENCRYPTED_KEY: + { + keyCase_ = 2; + key_ = other.key_; + onChanged(); + break; + } + case KMS_KEY_NAME: + { + keyCase_ = 3; + key_ = other.key_; + onChanged(); + break; + } + case KEY_NOT_SET: + { + break; + } + } + 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(); + keyCase_ = 1; + key_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + keyCase_ = 2; + key_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + keyCase_ = 3; + key_ = s; + break; + } // case 26 + case 34: + { + kmsKeyServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 keyCase_ = 0; + private java.lang.Object key_; + + public KeyCase getKeyCase() { + return KeyCase.forNumber(keyCase_); + } + + public Builder clearKey() { + keyCase_ = 0; + key_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Optional. Specifies a 256-bit customer-supplied
+     * encryption key.
+     * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rawKey field is set. + */ + @java.lang.Override + public boolean hasRawKey() { + return keyCase_ == 1; + } + + /** + * + * + *
+     * Optional. Specifies a 256-bit customer-supplied
+     * encryption key.
+     * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rawKey. + */ + @java.lang.Override + public java.lang.String getRawKey() { + java.lang.Object ref = ""; + if (keyCase_ == 1) { + ref = key_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (keyCase_ == 1) { + key_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Specifies a 256-bit customer-supplied
+     * encryption key.
+     * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rawKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRawKeyBytes() { + java.lang.Object ref = ""; + if (keyCase_ == 1) { + ref = key_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyCase_ == 1) { + key_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Specifies a 256-bit customer-supplied
+     * encryption key.
+     * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rawKey to set. + * @return This builder for chaining. + */ + public Builder setRawKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyCase_ = 1; + key_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies a 256-bit customer-supplied
+     * encryption key.
+     * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRawKey() { + if (keyCase_ == 1) { + keyCase_ = 0; + key_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Specifies a 256-bit customer-supplied
+     * encryption key.
+     * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for rawKey to set. + * @return This builder for chaining. + */ + public Builder setRawKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyCase_ = 1; + key_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. RSA-wrapped 2048-bit
+     * customer-supplied encryption key to either encrypt or decrypt this
+     * resource.
+     * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rsaEncryptedKey field is set. + */ + @java.lang.Override + public boolean hasRsaEncryptedKey() { + return keyCase_ == 2; + } + + /** + * + * + *
+     * Optional. RSA-wrapped 2048-bit
+     * customer-supplied encryption key to either encrypt or decrypt this
+     * resource.
+     * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rsaEncryptedKey. + */ + @java.lang.Override + public java.lang.String getRsaEncryptedKey() { + java.lang.Object ref = ""; + if (keyCase_ == 2) { + ref = key_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (keyCase_ == 2) { + key_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. RSA-wrapped 2048-bit
+     * customer-supplied encryption key to either encrypt or decrypt this
+     * resource.
+     * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rsaEncryptedKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRsaEncryptedKeyBytes() { + java.lang.Object ref = ""; + if (keyCase_ == 2) { + ref = key_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyCase_ == 2) { + key_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. RSA-wrapped 2048-bit
+     * customer-supplied encryption key to either encrypt or decrypt this
+     * resource.
+     * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rsaEncryptedKey to set. + * @return This builder for chaining. + */ + public Builder setRsaEncryptedKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyCase_ = 2; + key_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. RSA-wrapped 2048-bit
+     * customer-supplied encryption key to either encrypt or decrypt this
+     * resource.
+     * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRsaEncryptedKey() { + if (keyCase_ == 2) { + keyCase_ = 0; + key_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. RSA-wrapped 2048-bit
+     * customer-supplied encryption key to either encrypt or decrypt this
+     * resource.
+     * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for rsaEncryptedKey to set. + * @return This builder for chaining. + */ + public Builder setRsaEncryptedKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyCase_ = 2; + key_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the encryption key that is stored in Google Cloud
+     * KMS.
+     * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the kmsKeyName field is set. + */ + @java.lang.Override + public boolean hasKmsKeyName() { + return keyCase_ == 3; + } + + /** + * + * + *
+     * Optional. The name of the encryption key that is stored in Google Cloud
+     * KMS.
+     * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = ""; + if (keyCase_ == 3) { + ref = key_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (keyCase_ == 3) { + key_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the encryption key that is stored in Google Cloud
+     * KMS.
+     * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = ""; + if (keyCase_ == 3) { + ref = key_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (keyCase_ == 3) { + key_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the encryption key that is stored in Google Cloud
+     * KMS.
+     * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyCase_ = 3; + key_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the encryption key that is stored in Google Cloud
+     * KMS.
+     * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + if (keyCase_ == 3) { + keyCase_ = 0; + key_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The name of the encryption key that is stored in Google Cloud
+     * KMS.
+     * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyCase_ = 3; + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyServiceAccount_ = ""; + + /** + * + * + *
+     * Optional. The service account being used for the encryption request for the
+     * given KMS key. If absent, the Compute Engine default service account is
+     * used.
+     * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the kmsKeyServiceAccount field is set. + */ + public boolean hasKmsKeyServiceAccount() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. The service account being used for the encryption request for the
+     * given KMS key. If absent, the Compute Engine default service account is
+     * used.
+     * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The kmsKeyServiceAccount. + */ + public java.lang.String getKmsKeyServiceAccount() { + java.lang.Object ref = kmsKeyServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The service account being used for the encryption request for the
+     * given KMS key. If absent, the Compute Engine default service account is
+     * used.
+     * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for kmsKeyServiceAccount. + */ + public com.google.protobuf.ByteString getKmsKeyServiceAccountBytes() { + java.lang.Object ref = kmsKeyServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The service account being used for the encryption request for the
+     * given KMS key. If absent, the Compute Engine default service account is
+     * used.
+     * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The kmsKeyServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyServiceAccount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The service account being used for the encryption request for the
+     * given KMS key. If absent, the Compute Engine default service account is
+     * used.
+     * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyServiceAccount() { + kmsKeyServiceAccount_ = getDefaultInstance().getKmsKeyServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The service account being used for the encryption request for the
+     * given KMS key. If absent, the Compute Engine default service account is
+     * used.
+     * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for kmsKeyServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKeyServiceAccount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.CustomerEncryptionKey) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.CustomerEncryptionKey) + private static final com.google.cloud.backupdr.v1beta.CustomerEncryptionKey DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.CustomerEncryptionKey(); + } + + public static com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomerEncryptionKey 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.backupdr.v1beta.CustomerEncryptionKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CustomerEncryptionKeyOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CustomerEncryptionKeyOrBuilder.java new file mode 100644 index 000000000000..a09743a4f594 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/CustomerEncryptionKeyOrBuilder.java @@ -0,0 +1,207 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface CustomerEncryptionKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.CustomerEncryptionKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Specifies a 256-bit customer-supplied
+   * encryption key.
+   * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rawKey field is set. + */ + boolean hasRawKey(); + + /** + * + * + *
+   * Optional. Specifies a 256-bit customer-supplied
+   * encryption key.
+   * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rawKey. + */ + java.lang.String getRawKey(); + + /** + * + * + *
+   * Optional. Specifies a 256-bit customer-supplied
+   * encryption key.
+   * 
+ * + * string raw_key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rawKey. + */ + com.google.protobuf.ByteString getRawKeyBytes(); + + /** + * + * + *
+   * Optional. RSA-wrapped 2048-bit
+   * customer-supplied encryption key to either encrypt or decrypt this
+   * resource.
+   * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rsaEncryptedKey field is set. + */ + boolean hasRsaEncryptedKey(); + + /** + * + * + *
+   * Optional. RSA-wrapped 2048-bit
+   * customer-supplied encryption key to either encrypt or decrypt this
+   * resource.
+   * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rsaEncryptedKey. + */ + java.lang.String getRsaEncryptedKey(); + + /** + * + * + *
+   * Optional. RSA-wrapped 2048-bit
+   * customer-supplied encryption key to either encrypt or decrypt this
+   * resource.
+   * 
+ * + * string rsa_encrypted_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rsaEncryptedKey. + */ + com.google.protobuf.ByteString getRsaEncryptedKeyBytes(); + + /** + * + * + *
+   * Optional. The name of the encryption key that is stored in Google Cloud
+   * KMS.
+   * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the kmsKeyName field is set. + */ + boolean hasKmsKeyName(); + + /** + * + * + *
+   * Optional. The name of the encryption key that is stored in Google Cloud
+   * KMS.
+   * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + + /** + * + * + *
+   * Optional. The name of the encryption key that is stored in Google Cloud
+   * KMS.
+   * 
+ * + * string kms_key_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); + + /** + * + * + *
+   * Optional. The service account being used for the encryption request for the
+   * given KMS key. If absent, the Compute Engine default service account is
+   * used.
+   * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the kmsKeyServiceAccount field is set. + */ + boolean hasKmsKeyServiceAccount(); + + /** + * + * + *
+   * Optional. The service account being used for the encryption request for the
+   * given KMS key. If absent, the Compute Engine default service account is
+   * used.
+   * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The kmsKeyServiceAccount. + */ + java.lang.String getKmsKeyServiceAccount(); + + /** + * + * + *
+   * Optional. The service account being used for the encryption request for the
+   * given KMS key. If absent, the Compute Engine default service account is
+   * used.
+   * 
+ * + * optional string kms_key_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for kmsKeyServiceAccount. + */ + com.google.protobuf.ByteString getKmsKeyServiceAccountBytes(); + + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.KeyCase getKeyCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSource.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSource.java new file mode 100644 index 000000000000..eaa3a3cf554e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSource.java @@ -0,0 +1,3909 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Message describing a DataSource object.
+ * Datasource object used to represent Datasource details for both admin and
+ * basic view.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSource} + */ +@com.google.protobuf.Generated +public final class DataSource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DataSource) + DataSourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataSource"); + } + + // Use DataSource.newBuilder() to construct. + private DataSource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataSource() { + name_ = ""; + state_ = 0; + etag_ = ""; + configState_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSource.class, + com.google.cloud.backupdr.v1beta.DataSource.Builder.class); + } + + /** + * + * + *
+   * Holds the state of the data source resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.DataSource.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The data source is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The data source has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The data source is being deleted.
+     * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+     * The data source is experiencing an issue and might be unusable.
+     * 
+ * + * ERROR = 4; + */ + ERROR(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * State not set.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The data source is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The data source has been created and is fully usable.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+     * The data source is being deleted.
+     * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + /** + * + * + *
+     * The data source is experiencing an issue and might be unusable.
+     * 
+ * + * ERROR = 4; + */ + public static final int ERROR_VALUE = 4; + + 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 ACTIVE; + case 3: + return DELETING; + case 4: + return ERROR; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSource.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.backupdr.v1beta.DataSource.State) + } + + private int bitField0_; + private int sourceResourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceResource_; + + public enum SourceResourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATA_SOURCE_GCP_RESOURCE(26), + DATA_SOURCE_BACKUP_APPLIANCE_APPLICATION(27), + SOURCERESOURCE_NOT_SET(0); + private final int value; + + private SourceResourceCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceResourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceResourceCase forNumber(int value) { + switch (value) { + case 26: + return DATA_SOURCE_GCP_RESOURCE; + case 27: + return DATA_SOURCE_BACKUP_APPLIANCE_APPLICATION; + case 0: + return SOURCERESOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceResourceCase getSourceResourceCase() { + return SourceResourceCase.forNumber(sourceResourceCase_); + } + + public static final int DATA_SOURCE_GCP_RESOURCE_FIELD_NUMBER = 26; + + /** + * + * + *
+   * The backed up resource is a Google Cloud resource.
+   * The word 'DataSource' was included in the names to indicate that this is
+   * the representation of the Google Cloud resource used within the
+   * DataSource object.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + * @return Whether the dataSourceGcpResource field is set. + */ + @java.lang.Override + public boolean hasDataSourceGcpResource() { + return sourceResourceCase_ == 26; + } + + /** + * + * + *
+   * The backed up resource is a Google Cloud resource.
+   * The word 'DataSource' was included in the names to indicate that this is
+   * the representation of the Google Cloud resource used within the
+   * DataSource object.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + * @return The dataSourceGcpResource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResource getDataSourceGcpResource() { + if (sourceResourceCase_ == 26) { + return (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) sourceResource_; + } + return com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance(); + } + + /** + * + * + *
+   * The backed up resource is a Google Cloud resource.
+   * The word 'DataSource' was included in the names to indicate that this is
+   * the representation of the Google Cloud resource used within the
+   * DataSource object.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceOrBuilder + getDataSourceGcpResourceOrBuilder() { + if (sourceResourceCase_ == 26) { + return (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) sourceResource_; + } + return com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance(); + } + + public static final int DATA_SOURCE_BACKUP_APPLIANCE_APPLICATION_FIELD_NUMBER = 27; + + /** + * + * + *
+   * The backed up resource is a backup appliance application.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + * + * @return Whether the dataSourceBackupApplianceApplication field is set. + */ + @java.lang.Override + public boolean hasDataSourceBackupApplianceApplication() { + return sourceResourceCase_ == 27; + } + + /** + * + * + *
+   * The backed up resource is a backup appliance application.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + * + * @return The dataSourceBackupApplianceApplication. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + getDataSourceBackupApplianceApplication() { + if (sourceResourceCase_ == 27) { + return (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + sourceResource_; + } + return com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance(); + } + + /** + * + * + *
+   * The backed up resource is a backup appliance application.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplicationOrBuilder + getDataSourceBackupApplianceApplicationOrBuilder() { + if (sourceResourceCase_ == 27) { + return (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + sourceResource_; + } + return com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Identifier. Name of the datasource to create.
+   * It must have the
+   * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+   * `{datasource}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the backup vault.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Identifier. Name of the datasource to create.
+   * It must have the
+   * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+   * `{datasource}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the backup vault.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 = 21; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The DataSource resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.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 DataSource resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSource.State getState() { + com.google.cloud.backupdr.v1beta.DataSource.State result = + com.google.cloud.backupdr.v1beta.DataSource.State.forNumber(state_); + return result == null ? com.google.cloud.backupdr.v1beta.DataSource.State.UNRECOGNIZED : result; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSource_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(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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 CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.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 instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.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 UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int BACKUP_COUNT_FIELD_NUMBER = 7; + private long backupCount_ = 0L; + + /** + * + * + *
+   * Number of backups in the data source.
+   * 
+ * + * optional int64 backup_count = 7; + * + * @return Whether the backupCount field is set. + */ + @java.lang.Override + public boolean hasBackupCount() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Number of backups in the data source.
+   * 
+ * + * optional int64 backup_count = 7; + * + * @return The backupCount. + */ + @java.lang.Override + public long getBackupCount() { + return backupCount_; + } + + public static final int ETAG_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Server specified ETag for the ManagementServer resource to prevent
+   * simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 14; + * + * @return Whether the etag field is set. + */ + @java.lang.Override + public boolean hasEtag() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Server specified ETag for the ManagementServer resource to prevent
+   * simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 14; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Server specified ETag for the ManagementServer resource to prevent
+   * simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 14; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_STORED_BYTES_FIELD_NUMBER = 23; + private long totalStoredBytes_ = 0L; + + /** + * + * + *
+   * The number of bytes (metadata and data) stored in this datasource.
+   * 
+ * + * optional int64 total_stored_bytes = 23; + * + * @return Whether the totalStoredBytes field is set. + */ + @java.lang.Override + public boolean hasTotalStoredBytes() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * The number of bytes (metadata and data) stored in this datasource.
+   * 
+ * + * optional int64 total_stored_bytes = 23; + * + * @return The totalStoredBytes. + */ + @java.lang.Override + public long getTotalStoredBytes() { + return totalStoredBytes_; + } + + public static final int CONFIG_STATE_FIELD_NUMBER = 24; + private int configState_ = 0; + + /** + * + * + *
+   * Output only. The backup configuration state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for configState. + */ + @java.lang.Override + public int getConfigStateValue() { + return configState_; + } + + /** + * + * + *
+   * Output only. The backup configuration state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The configState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigState getConfigState() { + com.google.cloud.backupdr.v1beta.BackupConfigState result = + com.google.cloud.backupdr.v1beta.BackupConfigState.forNumber(configState_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigState.UNRECOGNIZED + : result; + } + + public static final int BACKUP_CONFIG_INFO_FIELD_NUMBER = 25; + private com.google.cloud.backupdr.v1beta.BackupConfigInfo backupConfigInfo_; + + /** + * + * + *
+   * Output only. Details of how the resource is configured for backup.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupConfigInfo field is set. + */ + @java.lang.Override + public boolean hasBackupConfigInfo() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Output only. Details of how the resource is configured for backup.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupConfigInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfo getBackupConfigInfo() { + return backupConfigInfo_ == null + ? com.google.cloud.backupdr.v1beta.BackupConfigInfo.getDefaultInstance() + : backupConfigInfo_; + } + + /** + * + * + *
+   * Output only. Details of how the resource is configured for backup.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfoOrBuilder getBackupConfigInfoOrBuilder() { + return backupConfigInfo_ == null + ? com.google.cloud.backupdr.v1beta.BackupConfigInfo.getDefaultInstance() + : backupConfigInfo_; + } + + public static final int BACKUP_BLOCKED_BY_VAULT_ACCESS_RESTRICTION_FIELD_NUMBER = 28; + private boolean backupBlockedByVaultAccessRestriction_ = false; + + /** + * + * + *
+   * Output only. This field is set to true if the backup is blocked by vault
+   * access restriction.
+   * 
+ * + * + * bool backup_blocked_by_vault_access_restriction = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupBlockedByVaultAccessRestriction. + */ + @java.lang.Override + public boolean getBackupBlockedByVaultAccessRestriction() { + return backupBlockedByVaultAccessRestriction_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(7, backupCount_); + } + if (((bitField0_ & 0x00000008) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, etag_); + } + if (state_ != com.google.cloud.backupdr.v1beta.DataSource.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(21, state_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeInt64(23, totalStoredBytes_); + } + if (configState_ + != com.google.cloud.backupdr.v1beta.BackupConfigState.BACKUP_CONFIG_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(24, configState_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(25, getBackupConfigInfo()); + } + if (sourceResourceCase_ == 26) { + output.writeMessage( + 26, (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) sourceResource_); + } + if (sourceResourceCase_ == 27) { + output.writeMessage( + 27, + (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) sourceResource_); + } + if (backupBlockedByVaultAccessRestriction_ != false) { + output.writeBool(28, backupBlockedByVaultAccessRestriction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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(4, labels__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, backupCount_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, etag_); + } + if (state_ != com.google.cloud.backupdr.v1beta.DataSource.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(21, state_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(23, totalStoredBytes_); + } + if (configState_ + != com.google.cloud.backupdr.v1beta.BackupConfigState.BACKUP_CONFIG_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(24, configState_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getBackupConfigInfo()); + } + if (sourceResourceCase_ == 26) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 26, (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) sourceResource_); + } + if (sourceResourceCase_ == 27) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, + (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + sourceResource_); + } + if (backupBlockedByVaultAccessRestriction_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 28, backupBlockedByVaultAccessRestriction_); + } + 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.backupdr.v1beta.DataSource)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DataSource other = + (com.google.cloud.backupdr.v1beta.DataSource) obj; + + if (!getName().equals(other.getName())) return false; + if (state_ != other.state_) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasBackupCount() != other.hasBackupCount()) return false; + if (hasBackupCount()) { + if (getBackupCount() != other.getBackupCount()) return false; + } + if (hasEtag() != other.hasEtag()) return false; + if (hasEtag()) { + if (!getEtag().equals(other.getEtag())) return false; + } + if (hasTotalStoredBytes() != other.hasTotalStoredBytes()) return false; + if (hasTotalStoredBytes()) { + if (getTotalStoredBytes() != other.getTotalStoredBytes()) return false; + } + if (configState_ != other.configState_) return false; + if (hasBackupConfigInfo() != other.hasBackupConfigInfo()) return false; + if (hasBackupConfigInfo()) { + if (!getBackupConfigInfo().equals(other.getBackupConfigInfo())) return false; + } + if (getBackupBlockedByVaultAccessRestriction() + != other.getBackupBlockedByVaultAccessRestriction()) return false; + if (!getSourceResourceCase().equals(other.getSourceResourceCase())) return false; + switch (sourceResourceCase_) { + case 26: + if (!getDataSourceGcpResource().equals(other.getDataSourceGcpResource())) return false; + break; + case 27: + if (!getDataSourceBackupApplianceApplication() + .equals(other.getDataSourceBackupApplianceApplication())) return false; + break; + case 0: + default: + } + 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 (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasBackupCount()) { + hash = (37 * hash) + BACKUP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBackupCount()); + } + if (hasEtag()) { + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + } + if (hasTotalStoredBytes()) { + hash = (37 * hash) + TOTAL_STORED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalStoredBytes()); + } + hash = (37 * hash) + CONFIG_STATE_FIELD_NUMBER; + hash = (53 * hash) + configState_; + if (hasBackupConfigInfo()) { + hash = (37 * hash) + BACKUP_CONFIG_INFO_FIELD_NUMBER; + hash = (53 * hash) + getBackupConfigInfo().hashCode(); + } + hash = (37 * hash) + BACKUP_BLOCKED_BY_VAULT_ACCESS_RESTRICTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getBackupBlockedByVaultAccessRestriction()); + switch (sourceResourceCase_) { + case 26: + hash = (37 * hash) + DATA_SOURCE_GCP_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceGcpResource().hashCode(); + break; + case 27: + hash = (37 * hash) + DATA_SOURCE_BACKUP_APPLIANCE_APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceBackupApplianceApplication().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DataSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSource 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.backupdr.v1beta.DataSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSource 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.backupdr.v1beta.DataSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DataSource 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing a DataSource object.
+   * Datasource object used to represent Datasource details for both admin and
+   * basic view.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DataSource) + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSource_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSource.class, + com.google.cloud.backupdr.v1beta.DataSource.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DataSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetBackupConfigInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataSourceGcpResourceBuilder_ != null) { + dataSourceGcpResourceBuilder_.clear(); + } + if (dataSourceBackupApplianceApplicationBuilder_ != null) { + dataSourceBackupApplianceApplicationBuilder_.clear(); + } + name_ = ""; + state_ = 0; + internalGetMutableLabels().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + backupCount_ = 0L; + etag_ = ""; + totalStoredBytes_ = 0L; + configState_ = 0; + backupConfigInfo_ = null; + if (backupConfigInfoBuilder_ != null) { + backupConfigInfoBuilder_.dispose(); + backupConfigInfoBuilder_ = null; + } + backupBlockedByVaultAccessRestriction_ = false; + sourceResourceCase_ = 0; + sourceResource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSource getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSource build() { + com.google.cloud.backupdr.v1beta.DataSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSource buildPartial() { + com.google.cloud.backupdr.v1beta.DataSource result = + new com.google.cloud.backupdr.v1beta.DataSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DataSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.backupCount_ = backupCount_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.etag_ = etag_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.totalStoredBytes_ = totalStoredBytes_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.configState_ = configState_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.backupConfigInfo_ = + backupConfigInfoBuilder_ == null ? backupConfigInfo_ : backupConfigInfoBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.backupBlockedByVaultAccessRestriction_ = backupBlockedByVaultAccessRestriction_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.DataSource result) { + result.sourceResourceCase_ = sourceResourceCase_; + result.sourceResource_ = this.sourceResource_; + if (sourceResourceCase_ == 26 && dataSourceGcpResourceBuilder_ != null) { + result.sourceResource_ = dataSourceGcpResourceBuilder_.build(); + } + if (sourceResourceCase_ == 27 && dataSourceBackupApplianceApplicationBuilder_ != null) { + result.sourceResource_ = dataSourceBackupApplianceApplicationBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DataSource) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DataSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DataSource other) { + if (other == com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasBackupCount()) { + setBackupCount(other.getBackupCount()); + } + if (other.hasEtag()) { + etag_ = other.etag_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasTotalStoredBytes()) { + setTotalStoredBytes(other.getTotalStoredBytes()); + } + if (other.configState_ != 0) { + setConfigStateValue(other.getConfigStateValue()); + } + if (other.hasBackupConfigInfo()) { + mergeBackupConfigInfo(other.getBackupConfigInfo()); + } + if (other.getBackupBlockedByVaultAccessRestriction() != false) { + setBackupBlockedByVaultAccessRestriction(other.getBackupBlockedByVaultAccessRestriction()); + } + switch (other.getSourceResourceCase()) { + case DATA_SOURCE_GCP_RESOURCE: + { + mergeDataSourceGcpResource(other.getDataSourceGcpResource()); + break; + } + case DATA_SOURCE_BACKUP_APPLIANCE_APPLICATION: + { + mergeDataSourceBackupApplianceApplication( + other.getDataSourceBackupApplianceApplication()); + break; + } + case SOURCERESOURCE_NOT_SET: + { + break; + } + } + 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_ |= 0x00000004; + break; + } // case 10 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 56: + { + backupCount_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 56 + case 114: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 114 + case 168: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 168 + case 184: + { + totalStoredBytes_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 184 + case 192: + { + configState_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 192 + case 202: + { + input.readMessage( + internalGetBackupConfigInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 202 + case 210: + { + input.readMessage( + internalGetDataSourceGcpResourceFieldBuilder().getBuilder(), extensionRegistry); + sourceResourceCase_ = 26; + break; + } // case 210 + case 218: + { + input.readMessage( + internalGetDataSourceBackupApplianceApplicationFieldBuilder().getBuilder(), + extensionRegistry); + sourceResourceCase_ = 27; + break; + } // case 218 + case 224: + { + backupBlockedByVaultAccessRestriction_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 224 + 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 sourceResourceCase_ = 0; + private java.lang.Object sourceResource_; + + public SourceResourceCase getSourceResourceCase() { + return SourceResourceCase.forNumber(sourceResourceCase_); + } + + public Builder clearSourceResource() { + sourceResourceCase_ = 0; + sourceResource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceGcpResource, + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceOrBuilder> + dataSourceGcpResourceBuilder_; + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + * + * @return Whether the dataSourceGcpResource field is set. + */ + @java.lang.Override + public boolean hasDataSourceGcpResource() { + return sourceResourceCase_ == 26; + } + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + * + * @return The dataSourceGcpResource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResource getDataSourceGcpResource() { + if (dataSourceGcpResourceBuilder_ == null) { + if (sourceResourceCase_ == 26) { + return (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) sourceResource_; + } + return com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance(); + } else { + if (sourceResourceCase_ == 26) { + return dataSourceGcpResourceBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + */ + public Builder setDataSourceGcpResource( + com.google.cloud.backupdr.v1beta.DataSourceGcpResource value) { + if (dataSourceGcpResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceResource_ = value; + onChanged(); + } else { + dataSourceGcpResourceBuilder_.setMessage(value); + } + sourceResourceCase_ = 26; + return this; + } + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + */ + public Builder setDataSourceGcpResource( + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.Builder builderForValue) { + if (dataSourceGcpResourceBuilder_ == null) { + sourceResource_ = builderForValue.build(); + onChanged(); + } else { + dataSourceGcpResourceBuilder_.setMessage(builderForValue.build()); + } + sourceResourceCase_ = 26; + return this; + } + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + */ + public Builder mergeDataSourceGcpResource( + com.google.cloud.backupdr.v1beta.DataSourceGcpResource value) { + if (dataSourceGcpResourceBuilder_ == null) { + if (sourceResourceCase_ == 26 + && sourceResource_ + != com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance()) { + sourceResource_ = + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.newBuilder( + (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) sourceResource_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceResource_ = value; + } + onChanged(); + } else { + if (sourceResourceCase_ == 26) { + dataSourceGcpResourceBuilder_.mergeFrom(value); + } else { + dataSourceGcpResourceBuilder_.setMessage(value); + } + } + sourceResourceCase_ = 26; + return this; + } + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + */ + public Builder clearDataSourceGcpResource() { + if (dataSourceGcpResourceBuilder_ == null) { + if (sourceResourceCase_ == 26) { + sourceResourceCase_ = 0; + sourceResource_ = null; + onChanged(); + } + } else { + if (sourceResourceCase_ == 26) { + sourceResourceCase_ = 0; + sourceResource_ = null; + } + dataSourceGcpResourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceGcpResource.Builder + getDataSourceGcpResourceBuilder() { + return internalGetDataSourceGcpResourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceOrBuilder + getDataSourceGcpResourceOrBuilder() { + if ((sourceResourceCase_ == 26) && (dataSourceGcpResourceBuilder_ != null)) { + return dataSourceGcpResourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceResourceCase_ == 26) { + return (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) sourceResource_; + } + return com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * The backed up resource is a Google Cloud resource.
+     * The word 'DataSource' was included in the names to indicate that this is
+     * the representation of the Google Cloud resource used within the
+     * DataSource object.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceGcpResource, + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceOrBuilder> + internalGetDataSourceGcpResourceFieldBuilder() { + if (dataSourceGcpResourceBuilder_ == null) { + if (!(sourceResourceCase_ == 26)) { + sourceResource_ = + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance(); + } + dataSourceGcpResourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceGcpResource, + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceOrBuilder>( + (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) sourceResource_, + getParentForChildren(), + isClean()); + sourceResource_ = null; + } + sourceResourceCase_ = 26; + onChanged(); + return dataSourceGcpResourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication, + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.Builder, + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplicationOrBuilder> + dataSourceBackupApplianceApplicationBuilder_; + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + * + * @return Whether the dataSourceBackupApplianceApplication field is set. + */ + @java.lang.Override + public boolean hasDataSourceBackupApplianceApplication() { + return sourceResourceCase_ == 27; + } + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + * + * @return The dataSourceBackupApplianceApplication. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + getDataSourceBackupApplianceApplication() { + if (dataSourceBackupApplianceApplicationBuilder_ == null) { + if (sourceResourceCase_ == 27) { + return (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + sourceResource_; + } + return com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance(); + } else { + if (sourceResourceCase_ == 27) { + return dataSourceBackupApplianceApplicationBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + public Builder setDataSourceBackupApplianceApplication( + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication value) { + if (dataSourceBackupApplianceApplicationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceResource_ = value; + onChanged(); + } else { + dataSourceBackupApplianceApplicationBuilder_.setMessage(value); + } + sourceResourceCase_ = 27; + return this; + } + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + public Builder setDataSourceBackupApplianceApplication( + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.Builder + builderForValue) { + if (dataSourceBackupApplianceApplicationBuilder_ == null) { + sourceResource_ = builderForValue.build(); + onChanged(); + } else { + dataSourceBackupApplianceApplicationBuilder_.setMessage(builderForValue.build()); + } + sourceResourceCase_ = 27; + return this; + } + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + public Builder mergeDataSourceBackupApplianceApplication( + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication value) { + if (dataSourceBackupApplianceApplicationBuilder_ == null) { + if (sourceResourceCase_ == 27 + && sourceResource_ + != com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance()) { + sourceResource_ = + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.newBuilder( + (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + sourceResource_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceResource_ = value; + } + onChanged(); + } else { + if (sourceResourceCase_ == 27) { + dataSourceBackupApplianceApplicationBuilder_.mergeFrom(value); + } else { + dataSourceBackupApplianceApplicationBuilder_.setMessage(value); + } + } + sourceResourceCase_ = 27; + return this; + } + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + public Builder clearDataSourceBackupApplianceApplication() { + if (dataSourceBackupApplianceApplicationBuilder_ == null) { + if (sourceResourceCase_ == 27) { + sourceResourceCase_ = 0; + sourceResource_ = null; + onChanged(); + } + } else { + if (sourceResourceCase_ == 27) { + sourceResourceCase_ = 0; + sourceResource_ = null; + } + dataSourceBackupApplianceApplicationBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.Builder + getDataSourceBackupApplianceApplicationBuilder() { + return internalGetDataSourceBackupApplianceApplicationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplicationOrBuilder + getDataSourceBackupApplianceApplicationOrBuilder() { + if ((sourceResourceCase_ == 27) && (dataSourceBackupApplianceApplicationBuilder_ != null)) { + return dataSourceBackupApplianceApplicationBuilder_.getMessageOrBuilder(); + } else { + if (sourceResourceCase_ == 27) { + return (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + sourceResource_; + } + return com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * The backed up resource is a backup appliance application.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication, + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.Builder, + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplicationOrBuilder> + internalGetDataSourceBackupApplianceApplicationFieldBuilder() { + if (dataSourceBackupApplianceApplicationBuilder_ == null) { + if (!(sourceResourceCase_ == 27)) { + sourceResource_ = + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance(); + } + dataSourceBackupApplianceApplicationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication, + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.Builder, + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplicationOrBuilder>( + (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + sourceResource_, + getParentForChildren(), + isClean()); + sourceResource_ = null; + } + sourceResourceCase_ = 27; + onChanged(); + return dataSourceBackupApplianceApplicationBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. Identifier. Name of the datasource to create.
+     * It must have the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+     * `{datasource}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the backup vault.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. Name of the datasource to create.
+     * It must have the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+     * `{datasource}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the backup vault.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. Name of the datasource to create.
+     * It must have the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+     * `{datasource}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the backup vault.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. Name of the datasource to create.
+     * It must have the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+     * `{datasource}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the backup vault.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. Name of the datasource to create.
+     * It must have the
+     * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+     * `{datasource}` cannot be changed after creation. It must be between 3-63
+     * characters long and must be unique within the backup vault.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The DataSource resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.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 DataSource resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The DataSource resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSource.State getState() { + com.google.cloud.backupdr.v1beta.DataSource.State result = + com.google.cloud.backupdr.v1beta.DataSource.State.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.DataSource.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The DataSource resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.DataSource.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The DataSource resource instance state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + 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(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * No labels currently defined:
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.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 instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.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 instance was created.
+     * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private long backupCount_; + + /** + * + * + *
+     * Number of backups in the data source.
+     * 
+ * + * optional int64 backup_count = 7; + * + * @return Whether the backupCount field is set. + */ + @java.lang.Override + public boolean hasBackupCount() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Number of backups in the data source.
+     * 
+ * + * optional int64 backup_count = 7; + * + * @return The backupCount. + */ + @java.lang.Override + public long getBackupCount() { + return backupCount_; + } + + /** + * + * + *
+     * Number of backups in the data source.
+     * 
+ * + * optional int64 backup_count = 7; + * + * @param value The backupCount to set. + * @return This builder for chaining. + */ + public Builder setBackupCount(long value) { + + backupCount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Number of backups in the data source.
+     * 
+ * + * optional int64 backup_count = 7; + * + * @return This builder for chaining. + */ + public Builder clearBackupCount() { + bitField0_ = (bitField0_ & ~0x00000080); + backupCount_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Server specified ETag for the ManagementServer resource to prevent
+     * simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 14; + * + * @return Whether the etag field is set. + */ + public boolean hasEtag() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Server specified ETag for the ManagementServer resource to prevent
+     * simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 14; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Server specified ETag for the ManagementServer resource to prevent
+     * simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 14; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Server specified ETag for the ManagementServer resource to prevent
+     * simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 14; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Server specified ETag for the ManagementServer resource to prevent
+     * simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 14; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Server specified ETag for the ManagementServer resource to prevent
+     * simultaneous updates from overwiting each other.
+     * 
+ * + * optional string etag = 14; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private long totalStoredBytes_; + + /** + * + * + *
+     * The number of bytes (metadata and data) stored in this datasource.
+     * 
+ * + * optional int64 total_stored_bytes = 23; + * + * @return Whether the totalStoredBytes field is set. + */ + @java.lang.Override + public boolean hasTotalStoredBytes() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * The number of bytes (metadata and data) stored in this datasource.
+     * 
+ * + * optional int64 total_stored_bytes = 23; + * + * @return The totalStoredBytes. + */ + @java.lang.Override + public long getTotalStoredBytes() { + return totalStoredBytes_; + } + + /** + * + * + *
+     * The number of bytes (metadata and data) stored in this datasource.
+     * 
+ * + * optional int64 total_stored_bytes = 23; + * + * @param value The totalStoredBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalStoredBytes(long value) { + + totalStoredBytes_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * The number of bytes (metadata and data) stored in this datasource.
+     * 
+ * + * optional int64 total_stored_bytes = 23; + * + * @return This builder for chaining. + */ + public Builder clearTotalStoredBytes() { + bitField0_ = (bitField0_ & ~0x00000200); + totalStoredBytes_ = 0L; + onChanged(); + return this; + } + + private int configState_ = 0; + + /** + * + * + *
+     * Output only. The backup configuration state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for configState. + */ + @java.lang.Override + public int getConfigStateValue() { + return configState_; + } + + /** + * + * + *
+     * Output only. The backup configuration state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for configState to set. + * @return This builder for chaining. + */ + public Builder setConfigStateValue(int value) { + configState_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The backup configuration state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The configState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigState getConfigState() { + com.google.cloud.backupdr.v1beta.BackupConfigState result = + com.google.cloud.backupdr.v1beta.BackupConfigState.forNumber(configState_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The backup configuration state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The configState to set. + * @return This builder for chaining. + */ + public Builder setConfigState(com.google.cloud.backupdr.v1beta.BackupConfigState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + configState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The backup configuration state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearConfigState() { + bitField0_ = (bitField0_ & ~0x00000400); + configState_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.BackupConfigInfo backupConfigInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupConfigInfo, + com.google.cloud.backupdr.v1beta.BackupConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.BackupConfigInfoOrBuilder> + backupConfigInfoBuilder_; + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupConfigInfo field is set. + */ + public boolean hasBackupConfigInfo() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupConfigInfo. + */ + public com.google.cloud.backupdr.v1beta.BackupConfigInfo getBackupConfigInfo() { + if (backupConfigInfoBuilder_ == null) { + return backupConfigInfo_ == null + ? com.google.cloud.backupdr.v1beta.BackupConfigInfo.getDefaultInstance() + : backupConfigInfo_; + } else { + return backupConfigInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBackupConfigInfo(com.google.cloud.backupdr.v1beta.BackupConfigInfo value) { + if (backupConfigInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupConfigInfo_ = value; + } else { + backupConfigInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBackupConfigInfo( + com.google.cloud.backupdr.v1beta.BackupConfigInfo.Builder builderForValue) { + if (backupConfigInfoBuilder_ == null) { + backupConfigInfo_ = builderForValue.build(); + } else { + backupConfigInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeBackupConfigInfo(com.google.cloud.backupdr.v1beta.BackupConfigInfo value) { + if (backupConfigInfoBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && backupConfigInfo_ != null + && backupConfigInfo_ + != com.google.cloud.backupdr.v1beta.BackupConfigInfo.getDefaultInstance()) { + getBackupConfigInfoBuilder().mergeFrom(value); + } else { + backupConfigInfo_ = value; + } + } else { + backupConfigInfoBuilder_.mergeFrom(value); + } + if (backupConfigInfo_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBackupConfigInfo() { + bitField0_ = (bitField0_ & ~0x00000800); + backupConfigInfo_ = null; + if (backupConfigInfoBuilder_ != null) { + backupConfigInfoBuilder_.dispose(); + backupConfigInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupConfigInfo.Builder getBackupConfigInfoBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetBackupConfigInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupConfigInfoOrBuilder + getBackupConfigInfoOrBuilder() { + if (backupConfigInfoBuilder_ != null) { + return backupConfigInfoBuilder_.getMessageOrBuilder(); + } else { + return backupConfigInfo_ == null + ? com.google.cloud.backupdr.v1beta.BackupConfigInfo.getDefaultInstance() + : backupConfigInfo_; + } + } + + /** + * + * + *
+     * Output only. Details of how the resource is configured for backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupConfigInfo, + com.google.cloud.backupdr.v1beta.BackupConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.BackupConfigInfoOrBuilder> + internalGetBackupConfigInfoFieldBuilder() { + if (backupConfigInfoBuilder_ == null) { + backupConfigInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupConfigInfo, + com.google.cloud.backupdr.v1beta.BackupConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.BackupConfigInfoOrBuilder>( + getBackupConfigInfo(), getParentForChildren(), isClean()); + backupConfigInfo_ = null; + } + return backupConfigInfoBuilder_; + } + + private boolean backupBlockedByVaultAccessRestriction_; + + /** + * + * + *
+     * Output only. This field is set to true if the backup is blocked by vault
+     * access restriction.
+     * 
+ * + * + * bool backup_blocked_by_vault_access_restriction = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupBlockedByVaultAccessRestriction. + */ + @java.lang.Override + public boolean getBackupBlockedByVaultAccessRestriction() { + return backupBlockedByVaultAccessRestriction_; + } + + /** + * + * + *
+     * Output only. This field is set to true if the backup is blocked by vault
+     * access restriction.
+     * 
+ * + * + * bool backup_blocked_by_vault_access_restriction = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backupBlockedByVaultAccessRestriction to set. + * @return This builder for chaining. + */ + public Builder setBackupBlockedByVaultAccessRestriction(boolean value) { + + backupBlockedByVaultAccessRestriction_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. This field is set to true if the backup is blocked by vault
+     * access restriction.
+     * 
+ * + * + * bool backup_blocked_by_vault_access_restriction = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackupBlockedByVaultAccessRestriction() { + bitField0_ = (bitField0_ & ~0x00001000); + backupBlockedByVaultAccessRestriction_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DataSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DataSource) + private static final com.google.cloud.backupdr.v1beta.DataSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DataSource(); + } + + public static com.google.cloud.backupdr.v1beta.DataSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSource 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.backupdr.v1beta.DataSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupApplianceApplication.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupApplianceApplication.java new file mode 100644 index 000000000000..5abf81f74ded --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupApplianceApplication.java @@ -0,0 +1,1469 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * BackupApplianceApplication describes a Source Resource when it is an
+ * application backed up by a BackupAppliance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication} + */ +@com.google.protobuf.Generated +public final class DataSourceBackupApplianceApplication extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + DataSourceBackupApplianceApplicationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataSourceBackupApplianceApplication"); + } + + // Use DataSourceBackupApplianceApplication.newBuilder() to construct. + private DataSourceBackupApplianceApplication( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataSourceBackupApplianceApplication() { + applicationName_ = ""; + backupAppliance_ = ""; + type_ = ""; + hostname_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.class, + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.Builder.class); + } + + public static final int APPLICATION_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object applicationName_ = ""; + + /** + * + * + *
+   * The name of the Application as known to the Backup Appliance.
+   * 
+ * + * string application_name = 1; + * + * @return The applicationName. + */ + @java.lang.Override + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + 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(); + applicationName_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the Application as known to the Backup Appliance.
+   * 
+ * + * string application_name = 1; + * + * @return The bytes for applicationName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_APPLIANCE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupAppliance_ = ""; + + /** + * + * + *
+   * Appliance name.
+   * 
+ * + * string backup_appliance = 2; + * + * @return The backupAppliance. + */ + @java.lang.Override + public java.lang.String getBackupAppliance() { + java.lang.Object ref = backupAppliance_; + 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(); + backupAppliance_ = s; + return s; + } + } + + /** + * + * + *
+   * Appliance name.
+   * 
+ * + * string backup_appliance = 2; + * + * @return The bytes for backupAppliance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupApplianceBytes() { + java.lang.Object ref = backupAppliance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupAppliance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLIANCE_ID_FIELD_NUMBER = 3; + private long applianceId_ = 0L; + + /** + * + * + *
+   * Appliance Id of the Backup Appliance.
+   * 
+ * + * int64 appliance_id = 3; + * + * @return The applianceId. + */ + @java.lang.Override + public long getApplianceId() { + return applianceId_; + } + + public static final int TYPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * The type of the application. e.g. VMBackup
+   * 
+ * + * string type = 4; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * The type of the application. e.g. VMBackup
+   * 
+ * + * string type = 4; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_ID_FIELD_NUMBER = 8; + private long applicationId_ = 0L; + + /** + * + * + *
+   * The appid field of the application within the Backup Appliance.
+   * 
+ * + * int64 application_id = 8; + * + * @return The applicationId. + */ + @java.lang.Override + public long getApplicationId() { + return applicationId_; + } + + public static final int HOSTNAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object hostname_ = ""; + + /** + * + * + *
+   * Hostname of the host where the application is running.
+   * 
+ * + * string hostname = 6; + * + * @return The hostname. + */ + @java.lang.Override + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + 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(); + hostname_ = s; + return s; + } + } + + /** + * + * + *
+   * Hostname of the host where the application is running.
+   * 
+ * + * string hostname = 6; + * + * @return The bytes for hostname. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOST_ID_FIELD_NUMBER = 7; + private long hostId_ = 0L; + + /** + * + * + *
+   * Hostid of the application host.
+   * 
+ * + * int64 host_id = 7; + * + * @return The hostId. + */ + @java.lang.Override + public long getHostId() { + return hostId_; + } + + 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.GeneratedMessage.isStringEmpty(applicationName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, applicationName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupAppliance_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupAppliance_); + } + if (applianceId_ != 0L) { + output.writeInt64(3, applianceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostname_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, hostname_); + } + if (hostId_ != 0L) { + output.writeInt64(7, hostId_); + } + if (applicationId_ != 0L) { + output.writeInt64(8, applicationId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(applicationName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, applicationName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupAppliance_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupAppliance_); + } + if (applianceId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, applianceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hostname_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, hostname_); + } + if (hostId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, hostId_); + } + if (applicationId_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, applicationId_); + } + 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.backupdr.v1beta.DataSourceBackupApplianceApplication)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication other = + (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) obj; + + if (!getApplicationName().equals(other.getApplicationName())) return false; + if (!getBackupAppliance().equals(other.getBackupAppliance())) return false; + if (getApplianceId() != other.getApplianceId()) return false; + if (!getType().equals(other.getType())) return false; + if (getApplicationId() != other.getApplicationId()) return false; + if (!getHostname().equals(other.getHostname())) return false; + if (getHostId() != other.getHostId()) 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) + APPLICATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getApplicationName().hashCode(); + hash = (37 * hash) + BACKUP_APPLIANCE_FIELD_NUMBER; + hash = (53 * hash) + getBackupAppliance().hashCode(); + hash = (37 * hash) + APPLIANCE_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getApplianceId()); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + APPLICATION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getApplicationId()); + hash = (37 * hash) + HOSTNAME_FIELD_NUMBER; + hash = (53 * hash) + getHostname().hashCode(); + hash = (37 * hash) + HOST_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getHostId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication 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.backupdr.v1beta.DataSourceBackupApplianceApplication parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication 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.backupdr.v1beta.DataSourceBackupApplianceApplication parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DataSourceBackupApplianceApplication 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * BackupApplianceApplication describes a Source Resource when it is an
+   * application backed up by a BackupAppliance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplicationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.class, + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + applicationName_ = ""; + backupAppliance_ = ""; + applianceId_ = 0L; + type_ = ""; + applicationId_ = 0L; + hostname_ = ""; + hostId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupApplianceApplication_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication build() { + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication buildPartial() { + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication result = + new com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.applicationName_ = applicationName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupAppliance_ = backupAppliance_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.applianceId_ = applianceId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.applicationId_ = applicationId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.hostname_ = hostname_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.hostId_ = hostId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication other) { + if (other + == com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + .getDefaultInstance()) return this; + if (!other.getApplicationName().isEmpty()) { + applicationName_ = other.applicationName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupAppliance().isEmpty()) { + backupAppliance_ = other.backupAppliance_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getApplianceId() != 0L) { + setApplianceId(other.getApplianceId()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getApplicationId() != 0L) { + setApplicationId(other.getApplicationId()); + } + if (!other.getHostname().isEmpty()) { + hostname_ = other.hostname_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getHostId() != 0L) { + setHostId(other.getHostId()); + } + 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: + { + applicationName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + backupAppliance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + applianceId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + hostname_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + hostId_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + applicationId_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 64 + 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 applicationName_ = ""; + + /** + * + * + *
+     * The name of the Application as known to the Backup Appliance.
+     * 
+ * + * string application_name = 1; + * + * @return The applicationName. + */ + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the Application as known to the Backup Appliance.
+     * 
+ * + * string application_name = 1; + * + * @return The bytes for applicationName. + */ + public com.google.protobuf.ByteString getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the Application as known to the Backup Appliance.
+     * 
+ * + * string application_name = 1; + * + * @param value The applicationName to set. + * @return This builder for chaining. + */ + public Builder setApplicationName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + applicationName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the Application as known to the Backup Appliance.
+     * 
+ * + * string application_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearApplicationName() { + applicationName_ = getDefaultInstance().getApplicationName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the Application as known to the Backup Appliance.
+     * 
+ * + * string application_name = 1; + * + * @param value The bytes for applicationName to set. + * @return This builder for chaining. + */ + public Builder setApplicationNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + applicationName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupAppliance_ = ""; + + /** + * + * + *
+     * Appliance name.
+     * 
+ * + * string backup_appliance = 2; + * + * @return The backupAppliance. + */ + public java.lang.String getBackupAppliance() { + java.lang.Object ref = backupAppliance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupAppliance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Appliance name.
+     * 
+ * + * string backup_appliance = 2; + * + * @return The bytes for backupAppliance. + */ + public com.google.protobuf.ByteString getBackupApplianceBytes() { + java.lang.Object ref = backupAppliance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupAppliance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Appliance name.
+     * 
+ * + * string backup_appliance = 2; + * + * @param value The backupAppliance to set. + * @return This builder for chaining. + */ + public Builder setBackupAppliance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupAppliance_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Appliance name.
+     * 
+ * + * string backup_appliance = 2; + * + * @return This builder for chaining. + */ + public Builder clearBackupAppliance() { + backupAppliance_ = getDefaultInstance().getBackupAppliance(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Appliance name.
+     * 
+ * + * string backup_appliance = 2; + * + * @param value The bytes for backupAppliance to set. + * @return This builder for chaining. + */ + public Builder setBackupApplianceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupAppliance_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long applianceId_; + + /** + * + * + *
+     * Appliance Id of the Backup Appliance.
+     * 
+ * + * int64 appliance_id = 3; + * + * @return The applianceId. + */ + @java.lang.Override + public long getApplianceId() { + return applianceId_; + } + + /** + * + * + *
+     * Appliance Id of the Backup Appliance.
+     * 
+ * + * int64 appliance_id = 3; + * + * @param value The applianceId to set. + * @return This builder for chaining. + */ + public Builder setApplianceId(long value) { + + applianceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Appliance Id of the Backup Appliance.
+     * 
+ * + * int64 appliance_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearApplianceId() { + bitField0_ = (bitField0_ & ~0x00000004); + applianceId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * The type of the application. e.g. VMBackup
+     * 
+ * + * string type = 4; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The type of the application. e.g. VMBackup
+     * 
+ * + * string type = 4; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The type of the application. e.g. VMBackup
+     * 
+ * + * string type = 4; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of the application. e.g. VMBackup
+     * 
+ * + * string type = 4; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of the application. e.g. VMBackup
+     * 
+ * + * string type = 4; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private long applicationId_; + + /** + * + * + *
+     * The appid field of the application within the Backup Appliance.
+     * 
+ * + * int64 application_id = 8; + * + * @return The applicationId. + */ + @java.lang.Override + public long getApplicationId() { + return applicationId_; + } + + /** + * + * + *
+     * The appid field of the application within the Backup Appliance.
+     * 
+ * + * int64 application_id = 8; + * + * @param value The applicationId to set. + * @return This builder for chaining. + */ + public Builder setApplicationId(long value) { + + applicationId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The appid field of the application within the Backup Appliance.
+     * 
+ * + * int64 application_id = 8; + * + * @return This builder for chaining. + */ + public Builder clearApplicationId() { + bitField0_ = (bitField0_ & ~0x00000010); + applicationId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object hostname_ = ""; + + /** + * + * + *
+     * Hostname of the host where the application is running.
+     * 
+ * + * string hostname = 6; + * + * @return The hostname. + */ + public java.lang.String getHostname() { + java.lang.Object ref = hostname_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Hostname of the host where the application is running.
+     * 
+ * + * string hostname = 6; + * + * @return The bytes for hostname. + */ + public com.google.protobuf.ByteString getHostnameBytes() { + java.lang.Object ref = hostname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Hostname of the host where the application is running.
+     * 
+ * + * string hostname = 6; + * + * @param value The hostname to set. + * @return This builder for chaining. + */ + public Builder setHostname(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hostname_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Hostname of the host where the application is running.
+     * 
+ * + * string hostname = 6; + * + * @return This builder for chaining. + */ + public Builder clearHostname() { + hostname_ = getDefaultInstance().getHostname(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Hostname of the host where the application is running.
+     * 
+ * + * string hostname = 6; + * + * @param value The bytes for hostname to set. + * @return This builder for chaining. + */ + public Builder setHostnameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hostname_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private long hostId_; + + /** + * + * + *
+     * Hostid of the application host.
+     * 
+ * + * int64 host_id = 7; + * + * @return The hostId. + */ + @java.lang.Override + public long getHostId() { + return hostId_; + } + + /** + * + * + *
+     * Hostid of the application host.
+     * 
+ * + * int64 host_id = 7; + * + * @param value The hostId to set. + * @return This builder for chaining. + */ + public Builder setHostId(long value) { + + hostId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Hostid of the application host.
+     * 
+ * + * int64 host_id = 7; + * + * @return This builder for chaining. + */ + public Builder clearHostId() { + bitField0_ = (bitField0_ & ~0x00000040); + hostId_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + private static final com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication(); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSourceBackupApplianceApplication 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.backupdr.v1beta.DataSourceBackupApplianceApplication + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupApplianceApplicationOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupApplianceApplicationOrBuilder.java new file mode 100644 index 000000000000..1af40e576bb3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupApplianceApplicationOrBuilder.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DataSourceBackupApplianceApplicationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the Application as known to the Backup Appliance.
+   * 
+ * + * string application_name = 1; + * + * @return The applicationName. + */ + java.lang.String getApplicationName(); + + /** + * + * + *
+   * The name of the Application as known to the Backup Appliance.
+   * 
+ * + * string application_name = 1; + * + * @return The bytes for applicationName. + */ + com.google.protobuf.ByteString getApplicationNameBytes(); + + /** + * + * + *
+   * Appliance name.
+   * 
+ * + * string backup_appliance = 2; + * + * @return The backupAppliance. + */ + java.lang.String getBackupAppliance(); + + /** + * + * + *
+   * Appliance name.
+   * 
+ * + * string backup_appliance = 2; + * + * @return The bytes for backupAppliance. + */ + com.google.protobuf.ByteString getBackupApplianceBytes(); + + /** + * + * + *
+   * Appliance Id of the Backup Appliance.
+   * 
+ * + * int64 appliance_id = 3; + * + * @return The applianceId. + */ + long getApplianceId(); + + /** + * + * + *
+   * The type of the application. e.g. VMBackup
+   * 
+ * + * string type = 4; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * The type of the application. e.g. VMBackup
+   * 
+ * + * string type = 4; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * The appid field of the application within the Backup Appliance.
+   * 
+ * + * int64 application_id = 8; + * + * @return The applicationId. + */ + long getApplicationId(); + + /** + * + * + *
+   * Hostname of the host where the application is running.
+   * 
+ * + * string hostname = 6; + * + * @return The hostname. + */ + java.lang.String getHostname(); + + /** + * + * + *
+   * Hostname of the host where the application is running.
+   * 
+ * + * string hostname = 6; + * + * @return The bytes for hostname. + */ + com.google.protobuf.ByteString getHostnameBytes(); + + /** + * + * + *
+   * Hostid of the application host.
+   * 
+ * + * int64 host_id = 7; + * + * @return The hostId. + */ + long getHostId(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupConfigInfo.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupConfigInfo.java new file mode 100644 index 000000000000..ef0a9bd7ac58 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupConfigInfo.java @@ -0,0 +1,917 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Information of backup configuration on the DataSource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo} + */ +@com.google.protobuf.Generated +public final class DataSourceBackupConfigInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo) + DataSourceBackupConfigInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataSourceBackupConfigInfo"); + } + + // Use DataSourceBackupConfigInfo.newBuilder() to construct. + private DataSourceBackupConfigInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataSourceBackupConfigInfo() { + lastBackupState_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupConfigInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupConfigInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.class, + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.Builder.class); + } + + private int bitField0_; + public static final int LAST_BACKUP_STATE_FIELD_NUMBER = 1; + private int lastBackupState_ = 0; + + /** + * + * + *
+   * Output only. The status of the last backup in this DataSource
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + @java.lang.Override + public int getLastBackupStateValue() { + return lastBackupState_; + } + + /** + * + * + *
+   * Output only. The status of the last backup in this DataSource
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState getLastBackupState() { + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState result = + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState.forNumber( + lastBackupState_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState.UNRECOGNIZED + : result; + } + + public static final int LAST_SUCCESSFUL_BACKUP_CONSISTENCY_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp lastSuccessfulBackupConsistencyTime_; + + /** + * + * + *
+   * Output only. Timestamp of the last successful backup to this DataSource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + @java.lang.Override + public boolean hasLastSuccessfulBackupConsistencyTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Timestamp of the last successful backup to this DataSource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime() { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + + /** + * + * + *
+   * Output only. Timestamp of the last successful backup to this DataSource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupConsistencyTimeOrBuilder() { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + + 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 (lastBackupState_ + != com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState + .LAST_BACKUP_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, lastBackupState_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLastSuccessfulBackupConsistencyTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lastBackupState_ + != com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState + .LAST_BACKUP_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, lastBackupState_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getLastSuccessfulBackupConsistencyTime()); + } + 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.backupdr.v1beta.DataSourceBackupConfigInfo)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo other = + (com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo) obj; + + if (lastBackupState_ != other.lastBackupState_) return false; + if (hasLastSuccessfulBackupConsistencyTime() != other.hasLastSuccessfulBackupConsistencyTime()) + return false; + if (hasLastSuccessfulBackupConsistencyTime()) { + if (!getLastSuccessfulBackupConsistencyTime() + .equals(other.getLastSuccessfulBackupConsistencyTime())) 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) + LAST_BACKUP_STATE_FIELD_NUMBER; + hash = (53 * hash) + lastBackupState_; + if (hasLastSuccessfulBackupConsistencyTime()) { + hash = (37 * hash) + LAST_SUCCESSFUL_BACKUP_CONSISTENCY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastSuccessfulBackupConsistencyTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo 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.backupdr.v1beta.DataSourceBackupConfigInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo 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.backupdr.v1beta.DataSourceBackupConfigInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DataSourceBackupConfigInfo 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Information of backup configuration on the DataSource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo) + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupConfigInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupConfigInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.class, + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lastBackupState_ = 0; + lastSuccessfulBackupConsistencyTime_ = null; + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + lastSuccessfulBackupConsistencyTimeBuilder_.dispose(); + lastSuccessfulBackupConsistencyTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceBackupConfigInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo build() { + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo buildPartial() { + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo result = + new com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lastBackupState_ = lastBackupState_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lastSuccessfulBackupConsistencyTime_ = + lastSuccessfulBackupConsistencyTimeBuilder_ == null + ? lastSuccessfulBackupConsistencyTime_ + : lastSuccessfulBackupConsistencyTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo other) { + if (other == com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.getDefaultInstance()) + return this; + if (other.lastBackupState_ != 0) { + setLastBackupStateValue(other.getLastBackupStateValue()); + } + if (other.hasLastSuccessfulBackupConsistencyTime()) { + mergeLastSuccessfulBackupConsistencyTime(other.getLastSuccessfulBackupConsistencyTime()); + } + 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 8: + { + lastBackupState_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder().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 int lastBackupState_ = 0; + + /** + * + * + *
+     * Output only. The status of the last backup in this DataSource
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + @java.lang.Override + public int getLastBackupStateValue() { + return lastBackupState_; + } + + /** + * + * + *
+     * Output only. The status of the last backup in this DataSource
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lastBackupState to set. + * @return This builder for chaining. + */ + public Builder setLastBackupStateValue(int value) { + lastBackupState_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of the last backup in this DataSource
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState getLastBackupState() { + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState result = + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState.forNumber( + lastBackupState_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The status of the last backup in this DataSource
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lastBackupState to set. + * @return This builder for chaining. + */ + public Builder setLastBackupState( + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + lastBackupState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of the last backup in this DataSource
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLastBackupState() { + bitField0_ = (bitField0_ & ~0x00000001); + lastBackupState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastSuccessfulBackupConsistencyTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastSuccessfulBackupConsistencyTimeBuilder_; + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + public boolean hasLastSuccessfulBackupConsistencyTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + public com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } else { + return lastSuccessfulBackupConsistencyTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastSuccessfulBackupConsistencyTime(com.google.protobuf.Timestamp value) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastSuccessfulBackupConsistencyTime_ = value; + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastSuccessfulBackupConsistencyTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + lastSuccessfulBackupConsistencyTime_ = builderForValue.build(); + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastSuccessfulBackupConsistencyTime(com.google.protobuf.Timestamp value) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && lastSuccessfulBackupConsistencyTime_ != null + && lastSuccessfulBackupConsistencyTime_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastSuccessfulBackupConsistencyTimeBuilder().mergeFrom(value); + } else { + lastSuccessfulBackupConsistencyTime_ = value; + } + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.mergeFrom(value); + } + if (lastSuccessfulBackupConsistencyTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastSuccessfulBackupConsistencyTime() { + bitField0_ = (bitField0_ & ~0x00000002); + lastSuccessfulBackupConsistencyTime_ = null; + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + lastSuccessfulBackupConsistencyTimeBuilder_.dispose(); + lastSuccessfulBackupConsistencyTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastSuccessfulBackupConsistencyTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder + getLastSuccessfulBackupConsistencyTimeOrBuilder() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + return lastSuccessfulBackupConsistencyTimeBuilder_.getMessageOrBuilder(); + } else { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + } + + /** + * + * + *
+     * Output only. Timestamp of the last successful backup to this DataSource.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + lastSuccessfulBackupConsistencyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastSuccessfulBackupConsistencyTime(), getParentForChildren(), isClean()); + lastSuccessfulBackupConsistencyTime_ = null; + } + return lastSuccessfulBackupConsistencyTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo) + private static final com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo(); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSourceBackupConfigInfo 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.backupdr.v1beta.DataSourceBackupConfigInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupConfigInfoOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupConfigInfoOrBuilder.java new file mode 100644 index 000000000000..dd1df93e964c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceBackupConfigInfoOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DataSourceBackupConfigInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The status of the last backup in this DataSource
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + int getLastBackupStateValue(); + + /** + * + * + *
+   * Output only. The status of the last backup in this DataSource
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState last_backup_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + com.google.cloud.backupdr.v1beta.BackupConfigInfo.LastBackupState getLastBackupState(); + + /** + * + * + *
+   * Output only. Timestamp of the last successful backup to this DataSource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + boolean hasLastSuccessfulBackupConsistencyTime(); + + /** + * + * + *
+   * Output only. Timestamp of the last successful backup to this DataSource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime(); + + /** + * + * + *
+   * Output only. Timestamp of the last successful backup to this DataSource.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupConsistencyTimeOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResource.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResource.java new file mode 100644 index 000000000000..15c1a9f348ef --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResource.java @@ -0,0 +1,2567 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * DataSourceGcpResource is used for protected resources that are Google Cloud
+ * Resources. This name is easeier to understand than GcpResourceDataSource or
+ * GcpDataSourceResource
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceGcpResource} + */ +@com.google.protobuf.Generated +public final class DataSourceGcpResource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DataSourceGcpResource) + DataSourceGcpResourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataSourceGcpResource"); + } + + // Use DataSourceGcpResource.newBuilder() to construct. + private DataSourceGcpResource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataSourceGcpResource() { + gcpResourcename_ = ""; + location_ = ""; + type_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.class, + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.Builder.class); + } + + private int gcpResourcePropertiesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object gcpResourceProperties_; + + public enum GcpResourcePropertiesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COMPUTE_INSTANCE_DATASOURCE_PROPERTIES(4), + CLOUD_SQL_INSTANCE_DATASOURCE_PROPERTIES(5), + ALLOY_DB_CLUSTER_DATASOURCE_PROPERTIES(6), + DISK_DATASOURCE_PROPERTIES(7), + GCPRESOURCEPROPERTIES_NOT_SET(0); + private final int value; + + private GcpResourcePropertiesCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static GcpResourcePropertiesCase valueOf(int value) { + return forNumber(value); + } + + public static GcpResourcePropertiesCase forNumber(int value) { + switch (value) { + case 4: + return COMPUTE_INSTANCE_DATASOURCE_PROPERTIES; + case 5: + return CLOUD_SQL_INSTANCE_DATASOURCE_PROPERTIES; + case 6: + return ALLOY_DB_CLUSTER_DATASOURCE_PROPERTIES; + case 7: + return DISK_DATASOURCE_PROPERTIES; + case 0: + return GCPRESOURCEPROPERTIES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public GcpResourcePropertiesCase getGcpResourcePropertiesCase() { + return GcpResourcePropertiesCase.forNumber(gcpResourcePropertiesCase_); + } + + public static final int COMPUTE_INSTANCE_DATASOURCE_PROPERTIES_FIELD_NUMBER = 4; + + /** + * + * + *
+   * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+   * properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + * + * @return Whether the computeInstanceDatasourceProperties field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceDatasourceProperties() { + return gcpResourcePropertiesCase_ == 4; + } + + /** + * + * + *
+   * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+   * properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + * + * @return The computeInstanceDatasourceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + getComputeInstanceDatasourceProperties() { + if (gcpResourcePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance(); + } + + /** + * + * + *
+   * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+   * properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourcePropertiesOrBuilder + getComputeInstanceDatasourcePropertiesOrBuilder() { + if (gcpResourcePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance(); + } + + public static final int CLOUD_SQL_INSTANCE_DATASOURCE_PROPERTIES_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+   * SQL Instance properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceDatasourceProperties field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceDatasourceProperties() { + return gcpResourcePropertiesCase_ == 5; + } + + /** + * + * + *
+   * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+   * SQL Instance properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceDatasourceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + getCloudSqlInstanceDatasourceProperties() { + if (gcpResourcePropertiesCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+   * SQL Instance properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourcePropertiesOrBuilder + getCloudSqlInstanceDatasourcePropertiesOrBuilder() { + if (gcpResourcePropertiesCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance(); + } + + public static final int ALLOY_DB_CLUSTER_DATASOURCE_PROPERTIES_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+   * cluster properties that are useful at the Datasource level. Currently
+   * none of its child properties are auditable. If new auditable properties
+   * are added, the AUDIT annotation should be added.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbClusterDatasourceProperties field is set. + */ + @java.lang.Override + public boolean hasAlloyDbClusterDatasourceProperties() { + return gcpResourcePropertiesCase_ == 6; + } + + /** + * + * + *
+   * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+   * cluster properties that are useful at the Datasource level. Currently
+   * none of its child properties are auditable. If new auditable properties
+   * are added, the AUDIT annotation should be added.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbClusterDatasourceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + getAlloyDbClusterDatasourceProperties() { + if (gcpResourcePropertiesCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+   * cluster properties that are useful at the Datasource level. Currently
+   * none of its child properties are auditable. If new auditable properties
+   * are added, the AUDIT annotation should be added.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourcePropertiesOrBuilder + getAlloyDbClusterDatasourcePropertiesOrBuilder() { + if (gcpResourcePropertiesCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.getDefaultInstance(); + } + + public static final int DISK_DATASOURCE_PROPERTIES_FIELD_NUMBER = 7; + + /** + * + * + *
+   * DiskDataSourceProperties has a subset of Disk properties that are useful
+   * at the Datasource level.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + * + * @return Whether the diskDatasourceProperties field is set. + */ + @java.lang.Override + public boolean hasDiskDatasourceProperties() { + return gcpResourcePropertiesCase_ == 7; + } + + /** + * + * + *
+   * DiskDataSourceProperties has a subset of Disk properties that are useful
+   * at the Datasource level.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + * + * @return The diskDatasourceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskDataSourceProperties getDiskDatasourceProperties() { + if (gcpResourcePropertiesCase_ == 7) { + return (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * DiskDataSourceProperties has a subset of Disk properties that are useful
+   * at the Datasource level.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskDataSourcePropertiesOrBuilder + getDiskDatasourcePropertiesOrBuilder() { + if (gcpResourcePropertiesCase_ == 7) { + return (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance(); + } + + public static final int GCP_RESOURCENAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcpResourcename_ = ""; + + /** + * + * + *
+   * Output only. Full resource pathname URL of the source Google Cloud
+   * resource.
+   * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcpResourcename. + */ + @java.lang.Override + public java.lang.String getGcpResourcename() { + java.lang.Object ref = gcpResourcename_; + 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(); + gcpResourcename_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Full resource pathname URL of the source Google Cloud
+   * resource.
+   * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcpResourcename. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcpResourcenameBytes() { + java.lang.Object ref = gcpResourcename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpResourcename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * The type of the Google Cloud resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * The type of the Google Cloud resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = 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.GeneratedMessage.isStringEmpty(gcpResourcename_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, gcpResourcename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, type_); + } + if (gcpResourcePropertiesCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + gcpResourceProperties_); + } + if (gcpResourcePropertiesCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + gcpResourceProperties_); + } + if (gcpResourcePropertiesCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + gcpResourceProperties_); + } + if (gcpResourcePropertiesCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) gcpResourceProperties_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpResourcename_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, gcpResourcename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, type_); + } + if (gcpResourcePropertiesCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + gcpResourceProperties_); + } + if (gcpResourcePropertiesCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + gcpResourceProperties_); + } + if (gcpResourcePropertiesCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + gcpResourceProperties_); + } + if (gcpResourcePropertiesCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) gcpResourceProperties_); + } + 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.backupdr.v1beta.DataSourceGcpResource)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DataSourceGcpResource other = + (com.google.cloud.backupdr.v1beta.DataSourceGcpResource) obj; + + if (!getGcpResourcename().equals(other.getGcpResourcename())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getType().equals(other.getType())) return false; + if (!getGcpResourcePropertiesCase().equals(other.getGcpResourcePropertiesCase())) return false; + switch (gcpResourcePropertiesCase_) { + case 4: + if (!getComputeInstanceDatasourceProperties() + .equals(other.getComputeInstanceDatasourceProperties())) return false; + break; + case 5: + if (!getCloudSqlInstanceDatasourceProperties() + .equals(other.getCloudSqlInstanceDatasourceProperties())) return false; + break; + case 6: + if (!getAlloyDbClusterDatasourceProperties() + .equals(other.getAlloyDbClusterDatasourceProperties())) return false; + break; + case 7: + if (!getDiskDatasourceProperties().equals(other.getDiskDatasourceProperties())) + return false; + break; + case 0: + default: + } + 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) + GCP_RESOURCENAME_FIELD_NUMBER; + hash = (53 * hash) + getGcpResourcename().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + switch (gcpResourcePropertiesCase_) { + case 4: + hash = (37 * hash) + COMPUTE_INSTANCE_DATASOURCE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getComputeInstanceDatasourceProperties().hashCode(); + break; + case 5: + hash = (37 * hash) + CLOUD_SQL_INSTANCE_DATASOURCE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstanceDatasourceProperties().hashCode(); + break; + case 6: + hash = (37 * hash) + ALLOY_DB_CLUSTER_DATASOURCE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getAlloyDbClusterDatasourceProperties().hashCode(); + break; + case 7: + hash = (37 * hash) + DISK_DATASOURCE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getDiskDatasourceProperties().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource 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.backupdr.v1beta.DataSourceGcpResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource 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.backupdr.v1beta.DataSourceGcpResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DataSourceGcpResource 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * DataSourceGcpResource is used for protected resources that are Google Cloud
+   * Resources. This name is easeier to understand than GcpResourceDataSource or
+   * GcpDataSourceResource
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceGcpResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DataSourceGcpResource) + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.class, + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DataSourceGcpResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (computeInstanceDatasourcePropertiesBuilder_ != null) { + computeInstanceDatasourcePropertiesBuilder_.clear(); + } + if (cloudSqlInstanceDatasourcePropertiesBuilder_ != null) { + cloudSqlInstanceDatasourcePropertiesBuilder_.clear(); + } + if (alloyDbClusterDatasourcePropertiesBuilder_ != null) { + alloyDbClusterDatasourcePropertiesBuilder_.clear(); + } + if (diskDatasourcePropertiesBuilder_ != null) { + diskDatasourcePropertiesBuilder_.clear(); + } + gcpResourcename_ = ""; + location_ = ""; + type_ = ""; + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResource getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResource build() { + com.google.cloud.backupdr.v1beta.DataSourceGcpResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResource buildPartial() { + com.google.cloud.backupdr.v1beta.DataSourceGcpResource result = + new com.google.cloud.backupdr.v1beta.DataSourceGcpResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DataSourceGcpResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.gcpResourcename_ = gcpResourcename_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.type_ = type_; + } + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.DataSourceGcpResource result) { + result.gcpResourcePropertiesCase_ = gcpResourcePropertiesCase_; + result.gcpResourceProperties_ = this.gcpResourceProperties_; + if (gcpResourcePropertiesCase_ == 4 && computeInstanceDatasourcePropertiesBuilder_ != null) { + result.gcpResourceProperties_ = computeInstanceDatasourcePropertiesBuilder_.build(); + } + if (gcpResourcePropertiesCase_ == 5 && cloudSqlInstanceDatasourcePropertiesBuilder_ != null) { + result.gcpResourceProperties_ = cloudSqlInstanceDatasourcePropertiesBuilder_.build(); + } + if (gcpResourcePropertiesCase_ == 6 && alloyDbClusterDatasourcePropertiesBuilder_ != null) { + result.gcpResourceProperties_ = alloyDbClusterDatasourcePropertiesBuilder_.build(); + } + if (gcpResourcePropertiesCase_ == 7 && diskDatasourcePropertiesBuilder_ != null) { + result.gcpResourceProperties_ = diskDatasourcePropertiesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DataSourceGcpResource) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DataSourceGcpResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DataSourceGcpResource other) { + if (other == com.google.cloud.backupdr.v1beta.DataSourceGcpResource.getDefaultInstance()) + return this; + if (!other.getGcpResourcename().isEmpty()) { + gcpResourcename_ = other.gcpResourcename_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000040; + onChanged(); + } + switch (other.getGcpResourcePropertiesCase()) { + case COMPUTE_INSTANCE_DATASOURCE_PROPERTIES: + { + mergeComputeInstanceDatasourceProperties( + other.getComputeInstanceDatasourceProperties()); + break; + } + case CLOUD_SQL_INSTANCE_DATASOURCE_PROPERTIES: + { + mergeCloudSqlInstanceDatasourceProperties( + other.getCloudSqlInstanceDatasourceProperties()); + break; + } + case ALLOY_DB_CLUSTER_DATASOURCE_PROPERTIES: + { + mergeAlloyDbClusterDatasourceProperties(other.getAlloyDbClusterDatasourceProperties()); + break; + } + case DISK_DATASOURCE_PROPERTIES: + { + mergeDiskDatasourceProperties(other.getDiskDatasourceProperties()); + break; + } + case GCPRESOURCEPROPERTIES_NOT_SET: + { + break; + } + } + 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: + { + gcpResourcename_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 10 + case 18: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 18 + case 26: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetComputeInstanceDatasourcePropertiesFieldBuilder().getBuilder(), + extensionRegistry); + gcpResourcePropertiesCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCloudSqlInstanceDatasourcePropertiesFieldBuilder().getBuilder(), + extensionRegistry); + gcpResourcePropertiesCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetAlloyDbClusterDatasourcePropertiesFieldBuilder().getBuilder(), + extensionRegistry); + gcpResourcePropertiesCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetDiskDatasourcePropertiesFieldBuilder().getBuilder(), + extensionRegistry); + gcpResourcePropertiesCase_ = 7; + break; + } // case 58 + 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 gcpResourcePropertiesCase_ = 0; + private java.lang.Object gcpResourceProperties_; + + public GcpResourcePropertiesCase getGcpResourcePropertiesCase() { + return GcpResourcePropertiesCase.forNumber(gcpResourcePropertiesCase_); + } + + public Builder clearGcpResourceProperties() { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourcePropertiesOrBuilder> + computeInstanceDatasourcePropertiesBuilder_; + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + * + * @return Whether the computeInstanceDatasourceProperties field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceDatasourceProperties() { + return gcpResourcePropertiesCase_ == 4; + } + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + * + * @return The computeInstanceDatasourceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + getComputeInstanceDatasourceProperties() { + if (computeInstanceDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance(); + } else { + if (gcpResourcePropertiesCase_ == 4) { + return computeInstanceDatasourcePropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + public Builder setComputeInstanceDatasourceProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties value) { + if (computeInstanceDatasourcePropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcpResourceProperties_ = value; + onChanged(); + } else { + computeInstanceDatasourcePropertiesBuilder_.setMessage(value); + } + gcpResourcePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + public Builder setComputeInstanceDatasourceProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.Builder + builderForValue) { + if (computeInstanceDatasourcePropertiesBuilder_ == null) { + gcpResourceProperties_ = builderForValue.build(); + onChanged(); + } else { + computeInstanceDatasourcePropertiesBuilder_.setMessage(builderForValue.build()); + } + gcpResourcePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + public Builder mergeComputeInstanceDatasourceProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties value) { + if (computeInstanceDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 4 + && gcpResourceProperties_ + != com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance()) { + gcpResourceProperties_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + gcpResourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + gcpResourceProperties_ = value; + } + onChanged(); + } else { + if (gcpResourcePropertiesCase_ == 4) { + computeInstanceDatasourcePropertiesBuilder_.mergeFrom(value); + } else { + computeInstanceDatasourcePropertiesBuilder_.setMessage(value); + } + } + gcpResourcePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + public Builder clearComputeInstanceDatasourceProperties() { + if (computeInstanceDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 4) { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + onChanged(); + } + } else { + if (gcpResourcePropertiesCase_ == 4) { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + } + computeInstanceDatasourcePropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + public com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.Builder + getComputeInstanceDatasourcePropertiesBuilder() { + return internalGetComputeInstanceDatasourcePropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourcePropertiesOrBuilder + getComputeInstanceDatasourcePropertiesOrBuilder() { + if ((gcpResourcePropertiesCase_ == 4) + && (computeInstanceDatasourcePropertiesBuilder_ != null)) { + return computeInstanceDatasourcePropertiesBuilder_.getMessageOrBuilder(); + } else { + if (gcpResourcePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+     * properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourcePropertiesOrBuilder> + internalGetComputeInstanceDatasourcePropertiesFieldBuilder() { + if (computeInstanceDatasourcePropertiesBuilder_ == null) { + if (!(gcpResourcePropertiesCase_ == 4)) { + gcpResourceProperties_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + .getDefaultInstance(); + } + computeInstanceDatasourcePropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourcePropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties) + gcpResourceProperties_, + getParentForChildren(), + isClean()); + gcpResourceProperties_ = null; + } + gcpResourcePropertiesCase_ = 4; + onChanged(); + return computeInstanceDatasourcePropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourcePropertiesOrBuilder> + cloudSqlInstanceDatasourcePropertiesBuilder_; + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceDatasourceProperties field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceDatasourceProperties() { + return gcpResourcePropertiesCase_ == 5; + } + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceDatasourceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + getCloudSqlInstanceDatasourceProperties() { + if (cloudSqlInstanceDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance(); + } else { + if (gcpResourcePropertiesCase_ == 5) { + return cloudSqlInstanceDatasourcePropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudSqlInstanceDatasourceProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties value) { + if (cloudSqlInstanceDatasourcePropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcpResourceProperties_ = value; + onChanged(); + } else { + cloudSqlInstanceDatasourcePropertiesBuilder_.setMessage(value); + } + gcpResourcePropertiesCase_ = 5; + return this; + } + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudSqlInstanceDatasourceProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.Builder + builderForValue) { + if (cloudSqlInstanceDatasourcePropertiesBuilder_ == null) { + gcpResourceProperties_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlInstanceDatasourcePropertiesBuilder_.setMessage(builderForValue.build()); + } + gcpResourcePropertiesCase_ = 5; + return this; + } + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCloudSqlInstanceDatasourceProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties value) { + if (cloudSqlInstanceDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 5 + && gcpResourceProperties_ + != com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance()) { + gcpResourceProperties_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + gcpResourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + gcpResourceProperties_ = value; + } + onChanged(); + } else { + if (gcpResourcePropertiesCase_ == 5) { + cloudSqlInstanceDatasourcePropertiesBuilder_.mergeFrom(value); + } else { + cloudSqlInstanceDatasourcePropertiesBuilder_.setMessage(value); + } + } + gcpResourcePropertiesCase_ = 5; + return this; + } + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCloudSqlInstanceDatasourceProperties() { + if (cloudSqlInstanceDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 5) { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + onChanged(); + } + } else { + if (gcpResourcePropertiesCase_ == 5) { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + } + cloudSqlInstanceDatasourcePropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.Builder + getCloudSqlInstanceDatasourcePropertiesBuilder() { + return internalGetCloudSqlInstanceDatasourcePropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourcePropertiesOrBuilder + getCloudSqlInstanceDatasourcePropertiesOrBuilder() { + if ((gcpResourcePropertiesCase_ == 5) + && (cloudSqlInstanceDatasourcePropertiesBuilder_ != null)) { + return cloudSqlInstanceDatasourcePropertiesBuilder_.getMessageOrBuilder(); + } else { + if (gcpResourcePropertiesCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+     * SQL Instance properties that are useful at the Datasource level.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourcePropertiesOrBuilder> + internalGetCloudSqlInstanceDatasourcePropertiesFieldBuilder() { + if (cloudSqlInstanceDatasourcePropertiesBuilder_ == null) { + if (!(gcpResourcePropertiesCase_ == 5)) { + gcpResourceProperties_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + .getDefaultInstance(); + } + cloudSqlInstanceDatasourcePropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourcePropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties) + gcpResourceProperties_, + getParentForChildren(), + isClean()); + gcpResourceProperties_ = null; + } + gcpResourcePropertiesCase_ = 5; + onChanged(); + return cloudSqlInstanceDatasourcePropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourcePropertiesOrBuilder> + alloyDbClusterDatasourcePropertiesBuilder_; + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbClusterDatasourceProperties field is set. + */ + @java.lang.Override + public boolean hasAlloyDbClusterDatasourceProperties() { + return gcpResourcePropertiesCase_ == 6; + } + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbClusterDatasourceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + getAlloyDbClusterDatasourceProperties() { + if (alloyDbClusterDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + .getDefaultInstance(); + } else { + if (gcpResourcePropertiesCase_ == 6) { + return alloyDbClusterDatasourcePropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAlloyDbClusterDatasourceProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties value) { + if (alloyDbClusterDatasourcePropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcpResourceProperties_ = value; + onChanged(); + } else { + alloyDbClusterDatasourcePropertiesBuilder_.setMessage(value); + } + gcpResourcePropertiesCase_ = 6; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAlloyDbClusterDatasourceProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.Builder + builderForValue) { + if (alloyDbClusterDatasourcePropertiesBuilder_ == null) { + gcpResourceProperties_ = builderForValue.build(); + onChanged(); + } else { + alloyDbClusterDatasourcePropertiesBuilder_.setMessage(builderForValue.build()); + } + gcpResourcePropertiesCase_ = 6; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAlloyDbClusterDatasourceProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties value) { + if (alloyDbClusterDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 6 + && gcpResourceProperties_ + != com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + .getDefaultInstance()) { + gcpResourceProperties_ = + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + gcpResourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + gcpResourceProperties_ = value; + } + onChanged(); + } else { + if (gcpResourcePropertiesCase_ == 6) { + alloyDbClusterDatasourcePropertiesBuilder_.mergeFrom(value); + } else { + alloyDbClusterDatasourcePropertiesBuilder_.setMessage(value); + } + } + gcpResourcePropertiesCase_ = 6; + return this; + } + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAlloyDbClusterDatasourceProperties() { + if (alloyDbClusterDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 6) { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + onChanged(); + } + } else { + if (gcpResourcePropertiesCase_ == 6) { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + } + alloyDbClusterDatasourcePropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.Builder + getAlloyDbClusterDatasourcePropertiesBuilder() { + return internalGetAlloyDbClusterDatasourcePropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourcePropertiesOrBuilder + getAlloyDbClusterDatasourcePropertiesOrBuilder() { + if ((gcpResourcePropertiesCase_ == 6) + && (alloyDbClusterDatasourcePropertiesBuilder_ != null)) { + return alloyDbClusterDatasourcePropertiesBuilder_.getMessageOrBuilder(); + } else { + if (gcpResourcePropertiesCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+     * cluster properties that are useful at the Datasource level. Currently
+     * none of its child properties are auditable. If new auditable properties
+     * are added, the AUDIT annotation should be added.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourcePropertiesOrBuilder> + internalGetAlloyDbClusterDatasourcePropertiesFieldBuilder() { + if (alloyDbClusterDatasourcePropertiesBuilder_ == null) { + if (!(gcpResourcePropertiesCase_ == 6)) { + gcpResourceProperties_ = + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + .getDefaultInstance(); + } + alloyDbClusterDatasourcePropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourcePropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties) + gcpResourceProperties_, + getParentForChildren(), + isClean()); + gcpResourceProperties_ = null; + } + gcpResourcePropertiesCase_ = 6; + onChanged(); + return alloyDbClusterDatasourcePropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties, + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskDataSourcePropertiesOrBuilder> + diskDatasourcePropertiesBuilder_; + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + * + * @return Whether the diskDatasourceProperties field is set. + */ + @java.lang.Override + public boolean hasDiskDatasourceProperties() { + return gcpResourcePropertiesCase_ == 7; + } + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + * + * @return The diskDatasourceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskDataSourceProperties getDiskDatasourceProperties() { + if (diskDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 7) { + return (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance(); + } else { + if (gcpResourcePropertiesCase_ == 7) { + return diskDatasourcePropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + public Builder setDiskDatasourceProperties( + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties value) { + if (diskDatasourcePropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gcpResourceProperties_ = value; + onChanged(); + } else { + diskDatasourcePropertiesBuilder_.setMessage(value); + } + gcpResourcePropertiesCase_ = 7; + return this; + } + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + public Builder setDiskDatasourceProperties( + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.Builder builderForValue) { + if (diskDatasourcePropertiesBuilder_ == null) { + gcpResourceProperties_ = builderForValue.build(); + onChanged(); + } else { + diskDatasourcePropertiesBuilder_.setMessage(builderForValue.build()); + } + gcpResourcePropertiesCase_ = 7; + return this; + } + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + public Builder mergeDiskDatasourceProperties( + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties value) { + if (diskDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 7 + && gcpResourceProperties_ + != com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance()) { + gcpResourceProperties_ = + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) + gcpResourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + gcpResourceProperties_ = value; + } + onChanged(); + } else { + if (gcpResourcePropertiesCase_ == 7) { + diskDatasourcePropertiesBuilder_.mergeFrom(value); + } else { + diskDatasourcePropertiesBuilder_.setMessage(value); + } + } + gcpResourcePropertiesCase_ = 7; + return this; + } + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + public Builder clearDiskDatasourceProperties() { + if (diskDatasourcePropertiesBuilder_ == null) { + if (gcpResourcePropertiesCase_ == 7) { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + onChanged(); + } + } else { + if (gcpResourcePropertiesCase_ == 7) { + gcpResourcePropertiesCase_ = 0; + gcpResourceProperties_ = null; + } + diskDatasourcePropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + public com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.Builder + getDiskDatasourcePropertiesBuilder() { + return internalGetDiskDatasourcePropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskDataSourcePropertiesOrBuilder + getDiskDatasourcePropertiesOrBuilder() { + if ((gcpResourcePropertiesCase_ == 7) && (diskDatasourcePropertiesBuilder_ != null)) { + return diskDatasourcePropertiesBuilder_.getMessageOrBuilder(); + } else { + if (gcpResourcePropertiesCase_ == 7) { + return (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) gcpResourceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * DiskDataSourceProperties has a subset of Disk properties that are useful
+     * at the Datasource level.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties, + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskDataSourcePropertiesOrBuilder> + internalGetDiskDatasourcePropertiesFieldBuilder() { + if (diskDatasourcePropertiesBuilder_ == null) { + if (!(gcpResourcePropertiesCase_ == 7)) { + gcpResourceProperties_ = + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance(); + } + diskDatasourcePropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties, + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskDataSourcePropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) gcpResourceProperties_, + getParentForChildren(), + isClean()); + gcpResourceProperties_ = null; + } + gcpResourcePropertiesCase_ = 7; + onChanged(); + return diskDatasourcePropertiesBuilder_; + } + + private java.lang.Object gcpResourcename_ = ""; + + /** + * + * + *
+     * Output only. Full resource pathname URL of the source Google Cloud
+     * resource.
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcpResourcename. + */ + public java.lang.String getGcpResourcename() { + java.lang.Object ref = gcpResourcename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpResourcename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Full resource pathname URL of the source Google Cloud
+     * resource.
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcpResourcename. + */ + public com.google.protobuf.ByteString getGcpResourcenameBytes() { + java.lang.Object ref = gcpResourcename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpResourcename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Full resource pathname URL of the source Google Cloud
+     * resource.
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The gcpResourcename to set. + * @return This builder for chaining. + */ + public Builder setGcpResourcename(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcpResourcename_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Full resource pathname URL of the source Google Cloud
+     * resource.
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGcpResourcename() { + gcpResourcename_ = getDefaultInstance().getGcpResourcename(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Full resource pathname URL of the source Google Cloud
+     * resource.
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for gcpResourcename to set. + * @return This builder for chaining. + */ + public Builder setGcpResourcenameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcpResourcename_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * The type of the Google Cloud resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The type of the Google Cloud resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The type of the Google Cloud resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of the Google Cloud resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of the Google Cloud resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DataSourceGcpResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DataSourceGcpResource) + private static final com.google.cloud.backupdr.v1beta.DataSourceGcpResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DataSourceGcpResource(); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSourceGcpResource 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.backupdr.v1beta.DataSourceGcpResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceInfo.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceInfo.java new file mode 100644 index 000000000000..d3b64549bcf2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceInfo.java @@ -0,0 +1,1809 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The Google Cloud resource that the DataSource is associated with.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo} + */ +@com.google.protobuf.Generated +public final class DataSourceGcpResourceInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo) + DataSourceGcpResourceInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataSourceGcpResourceInfo"); + } + + // Use DataSourceGcpResourceInfo.newBuilder() to construct. + private DataSourceGcpResourceInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataSourceGcpResourceInfo() { + gcpResourcename_ = ""; + type_ = ""; + location_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResourceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.class, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.Builder.class); + } + + private int resourcePropertiesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object resourceProperties_; + + public enum ResourcePropertiesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_SQL_INSTANCE_PROPERTIES(4), + ALLOY_DB_CLUSTER_PROPERTIES(6), + RESOURCEPROPERTIES_NOT_SET(0); + private final int value; + + private ResourcePropertiesCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResourcePropertiesCase valueOf(int value) { + return forNumber(value); + } + + public static ResourcePropertiesCase forNumber(int value) { + switch (value) { + case 4: + return CLOUD_SQL_INSTANCE_PROPERTIES; + case 6: + return ALLOY_DB_CLUSTER_PROPERTIES; + case 0: + return RESOURCEPROPERTIES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourcePropertiesCase getResourcePropertiesCase() { + return ResourcePropertiesCase.forNumber(resourcePropertiesCase_); + } + + public static final int CLOUD_SQL_INSTANCE_PROPERTIES_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Output only. The properties of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceProperties field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceProperties() { + return resourcePropertiesCase_ == 4; + } + + /** + * + * + *
+   * Output only. The properties of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + getCloudSqlInstanceProperties() { + if (resourcePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. The properties of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferencePropertiesOrBuilder + getCloudSqlInstancePropertiesOrBuilder() { + if (resourcePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance(); + } + + public static final int ALLOY_DB_CLUSTER_PROPERTIES_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Output only. The properties of the AlloyDB cluster.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbClusterProperties field is set. + */ + @java.lang.Override + public boolean hasAlloyDbClusterProperties() { + return resourcePropertiesCase_ == 6; + } + + /** + * + * + *
+   * Output only. The properties of the AlloyDB cluster.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbClusterProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + getAlloyDbClusterProperties() { + if (resourcePropertiesCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. The properties of the AlloyDB cluster.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferencePropertiesOrBuilder + getAlloyDbClusterPropertiesOrBuilder() { + if (resourcePropertiesCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .getDefaultInstance(); + } + + public static final int GCP_RESOURCENAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcpResourcename_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the Google Cloud resource.
+   * Ex: projects/{project}/zones/{zone}/instances/{instance}
+   * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcpResourcename. + */ + @java.lang.Override + public java.lang.String getGcpResourcename() { + java.lang.Object ref = gcpResourcename_; + 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(); + gcpResourcename_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the Google Cloud resource.
+   * Ex: projects/{project}/zones/{zone}/instances/{instance}
+   * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcpResourcename. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcpResourcenameBytes() { + java.lang.Object ref = gcpResourcename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpResourcename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * Output only. The type of the Google Cloud resource.
+   * Ex: compute.googleapis.com/Instance
+   * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The type of the Google Cloud resource.
+   * Ex: compute.googleapis.com/Instance
+   * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
+   * Output only. The location of the Google Cloud resource.
+   * Ex: <region>/<zone>/"global"/"unspecified"
+   * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The location of the Google Cloud resource.
+   * Ex: <region>/<zone>/"global"/"unspecified"
+   * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = 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.GeneratedMessage.isStringEmpty(gcpResourcename_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, gcpResourcename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, location_); + } + if (resourcePropertiesCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + resourceProperties_); + } + if (resourcePropertiesCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + resourceProperties_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpResourcename_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, gcpResourcename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, location_); + } + if (resourcePropertiesCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + resourceProperties_); + } + if (resourcePropertiesCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + resourceProperties_); + } + 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.backupdr.v1beta.DataSourceGcpResourceInfo)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo other = + (com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo) obj; + + if (!getGcpResourcename().equals(other.getGcpResourcename())) return false; + if (!getType().equals(other.getType())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getResourcePropertiesCase().equals(other.getResourcePropertiesCase())) return false; + switch (resourcePropertiesCase_) { + case 4: + if (!getCloudSqlInstanceProperties().equals(other.getCloudSqlInstanceProperties())) + return false; + break; + case 6: + if (!getAlloyDbClusterProperties().equals(other.getAlloyDbClusterProperties())) + return false; + break; + case 0: + default: + } + 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) + GCP_RESOURCENAME_FIELD_NUMBER; + hash = (53 * hash) + getGcpResourcename().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + switch (resourcePropertiesCase_) { + case 4: + hash = (37 * hash) + CLOUD_SQL_INSTANCE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstanceProperties().hashCode(); + break; + case 6: + hash = (37 * hash) + ALLOY_DB_CLUSTER_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getAlloyDbClusterProperties().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo 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.backupdr.v1beta.DataSourceGcpResourceInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo 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.backupdr.v1beta.DataSourceGcpResourceInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DataSourceGcpResourceInfo 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The Google Cloud resource that the DataSource is associated with.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo) + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResourceInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResourceInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.class, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (cloudSqlInstancePropertiesBuilder_ != null) { + cloudSqlInstancePropertiesBuilder_.clear(); + } + if (alloyDbClusterPropertiesBuilder_ != null) { + alloyDbClusterPropertiesBuilder_.clear(); + } + gcpResourcename_ = ""; + type_ = ""; + location_ = ""; + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResourceInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo build() { + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo buildPartial() { + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo result = + new com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.gcpResourcename_ = gcpResourcename_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.location_ = location_; + } + } + + private void buildPartialOneofs( + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo result) { + result.resourcePropertiesCase_ = resourcePropertiesCase_; + result.resourceProperties_ = this.resourceProperties_; + if (resourcePropertiesCase_ == 4 && cloudSqlInstancePropertiesBuilder_ != null) { + result.resourceProperties_ = cloudSqlInstancePropertiesBuilder_.build(); + } + if (resourcePropertiesCase_ == 6 && alloyDbClusterPropertiesBuilder_ != null) { + result.resourceProperties_ = alloyDbClusterPropertiesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo other) { + if (other == com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.getDefaultInstance()) + return this; + if (!other.getGcpResourcename().isEmpty()) { + gcpResourcename_ = other.gcpResourcename_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getResourcePropertiesCase()) { + case CLOUD_SQL_INSTANCE_PROPERTIES: + { + mergeCloudSqlInstanceProperties(other.getCloudSqlInstanceProperties()); + break; + } + case ALLOY_DB_CLUSTER_PROPERTIES: + { + mergeAlloyDbClusterProperties(other.getAlloyDbClusterProperties()); + break; + } + case RESOURCEPROPERTIES_NOT_SET: + { + break; + } + } + 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: + { + gcpResourcename_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCloudSqlInstancePropertiesFieldBuilder().getBuilder(), + extensionRegistry); + resourcePropertiesCase_ = 4; + break; + } // case 34 + case 50: + { + input.readMessage( + internalGetAlloyDbClusterPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + resourcePropertiesCase_ = 6; + break; + } // case 50 + 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 resourcePropertiesCase_ = 0; + private java.lang.Object resourceProperties_; + + public ResourcePropertiesCase getResourcePropertiesCase() { + return ResourcePropertiesCase.forNumber(resourcePropertiesCase_); + } + + public Builder clearResourceProperties() { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferencePropertiesOrBuilder> + cloudSqlInstancePropertiesBuilder_; + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceProperties field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceProperties() { + return resourcePropertiesCase_ == 4; + } + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + getCloudSqlInstanceProperties() { + if (cloudSqlInstancePropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance(); + } else { + if (resourcePropertiesCase_ == 4) { + return cloudSqlInstancePropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudSqlInstanceProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties value) { + if (cloudSqlInstancePropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceProperties_ = value; + onChanged(); + } else { + cloudSqlInstancePropertiesBuilder_.setMessage(value); + } + resourcePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudSqlInstanceProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.Builder + builderForValue) { + if (cloudSqlInstancePropertiesBuilder_ == null) { + resourceProperties_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlInstancePropertiesBuilder_.setMessage(builderForValue.build()); + } + resourcePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCloudSqlInstanceProperties( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties value) { + if (cloudSqlInstancePropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 4 + && resourceProperties_ + != com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance()) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .newBuilder( + (com.google.cloud.backupdr.v1beta + .CloudSqlInstanceDataSourceReferenceProperties) + resourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceProperties_ = value; + } + onChanged(); + } else { + if (resourcePropertiesCase_ == 4) { + cloudSqlInstancePropertiesBuilder_.mergeFrom(value); + } else { + cloudSqlInstancePropertiesBuilder_.setMessage(value); + } + } + resourcePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCloudSqlInstanceProperties() { + if (cloudSqlInstancePropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 4) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + } + } else { + if (resourcePropertiesCase_ == 4) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + } + cloudSqlInstancePropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.Builder + getCloudSqlInstancePropertiesBuilder() { + return internalGetCloudSqlInstancePropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferencePropertiesOrBuilder + getCloudSqlInstancePropertiesOrBuilder() { + if ((resourcePropertiesCase_ == 4) && (cloudSqlInstancePropertiesBuilder_ != null)) { + return cloudSqlInstancePropertiesBuilder_.getMessageOrBuilder(); + } else { + if (resourcePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. The properties of the Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferencePropertiesOrBuilder> + internalGetCloudSqlInstancePropertiesFieldBuilder() { + if (cloudSqlInstancePropertiesBuilder_ == null) { + if (!(resourcePropertiesCase_ == 4)) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .getDefaultInstance(); + } + cloudSqlInstancePropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + .Builder, + com.google.cloud.backupdr.v1beta + .CloudSqlInstanceDataSourceReferencePropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties) + resourceProperties_, + getParentForChildren(), + isClean()); + resourceProperties_ = null; + } + resourcePropertiesCase_ = 4; + onChanged(); + return cloudSqlInstancePropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferencePropertiesOrBuilder> + alloyDbClusterPropertiesBuilder_; + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbClusterProperties field is set. + */ + @java.lang.Override + public boolean hasAlloyDbClusterProperties() { + return resourcePropertiesCase_ == 6; + } + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbClusterProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + getAlloyDbClusterProperties() { + if (alloyDbClusterPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .getDefaultInstance(); + } else { + if (resourcePropertiesCase_ == 6) { + return alloyDbClusterPropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAlloyDbClusterProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties value) { + if (alloyDbClusterPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceProperties_ = value; + onChanged(); + } else { + alloyDbClusterPropertiesBuilder_.setMessage(value); + } + resourcePropertiesCase_ = 6; + return this; + } + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAlloyDbClusterProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.Builder + builderForValue) { + if (alloyDbClusterPropertiesBuilder_ == null) { + resourceProperties_ = builderForValue.build(); + onChanged(); + } else { + alloyDbClusterPropertiesBuilder_.setMessage(builderForValue.build()); + } + resourcePropertiesCase_ = 6; + return this; + } + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAlloyDbClusterProperties( + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties value) { + if (alloyDbClusterPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 6 + && resourceProperties_ + != com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .getDefaultInstance()) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .newBuilder( + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + resourceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceProperties_ = value; + } + onChanged(); + } else { + if (resourcePropertiesCase_ == 6) { + alloyDbClusterPropertiesBuilder_.mergeFrom(value); + } else { + alloyDbClusterPropertiesBuilder_.setMessage(value); + } + } + resourcePropertiesCase_ = 6; + return this; + } + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAlloyDbClusterProperties() { + if (alloyDbClusterPropertiesBuilder_ == null) { + if (resourcePropertiesCase_ == 6) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + onChanged(); + } + } else { + if (resourcePropertiesCase_ == 6) { + resourcePropertiesCase_ = 0; + resourceProperties_ = null; + } + alloyDbClusterPropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.Builder + getAlloyDbClusterPropertiesBuilder() { + return internalGetAlloyDbClusterPropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferencePropertiesOrBuilder + getAlloyDbClusterPropertiesOrBuilder() { + if ((resourcePropertiesCase_ == 6) && (alloyDbClusterPropertiesBuilder_ != null)) { + return alloyDbClusterPropertiesBuilder_.getMessageOrBuilder(); + } else { + if (resourcePropertiesCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + resourceProperties_; + } + return com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. The properties of the AlloyDB cluster.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties.Builder, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferencePropertiesOrBuilder> + internalGetAlloyDbClusterPropertiesFieldBuilder() { + if (alloyDbClusterPropertiesBuilder_ == null) { + if (!(resourcePropertiesCase_ == 6)) { + resourceProperties_ = + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .getDefaultInstance(); + } + alloyDbClusterPropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties, + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + .Builder, + com.google.cloud.backupdr.v1beta + .AlloyDBClusterDataSourceReferencePropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties) + resourceProperties_, + getParentForChildren(), + isClean()); + resourceProperties_ = null; + } + resourcePropertiesCase_ = 6; + onChanged(); + return alloyDbClusterPropertiesBuilder_; + } + + private java.lang.Object gcpResourcename_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the Google Cloud resource.
+     * Ex: projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcpResourcename. + */ + public java.lang.String getGcpResourcename() { + java.lang.Object ref = gcpResourcename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpResourcename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the Google Cloud resource.
+     * Ex: projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcpResourcename. + */ + public com.google.protobuf.ByteString getGcpResourcenameBytes() { + java.lang.Object ref = gcpResourcename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpResourcename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the Google Cloud resource.
+     * Ex: projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The gcpResourcename to set. + * @return This builder for chaining. + */ + public Builder setGcpResourcename(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcpResourcename_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the Google Cloud resource.
+     * Ex: projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGcpResourcename() { + gcpResourcename_ = getDefaultInstance().getGcpResourcename(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the Google Cloud resource.
+     * Ex: projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for gcpResourcename to set. + * @return This builder for chaining. + */ + public Builder setGcpResourcenameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcpResourcename_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * Output only. The type of the Google Cloud resource.
+     * Ex: compute.googleapis.com/Instance
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The type of the Google Cloud resource.
+     * Ex: compute.googleapis.com/Instance
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The type of the Google Cloud resource.
+     * Ex: compute.googleapis.com/Instance
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the Google Cloud resource.
+     * Ex: compute.googleapis.com/Instance
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the Google Cloud resource.
+     * Ex: compute.googleapis.com/Instance
+     * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
+     * Output only. The location of the Google Cloud resource.
+     * Ex: <region>/<zone>/"global"/"unspecified"
+     * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The location of the Google Cloud resource.
+     * Ex: <region>/<zone>/"global"/"unspecified"
+     * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The location of the Google Cloud resource.
+     * Ex: <region>/<zone>/"global"/"unspecified"
+     * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location of the Google Cloud resource.
+     * Ex: <region>/<zone>/"global"/"unspecified"
+     * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location of the Google Cloud resource.
+     * Ex: <region>/<zone>/"global"/"unspecified"
+     * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo) + private static final com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo(); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSourceGcpResourceInfo 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.backupdr.v1beta.DataSourceGcpResourceInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceInfoOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceInfoOrBuilder.java new file mode 100644 index 000000000000..7d08f463d054 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceInfoOrBuilder.java @@ -0,0 +1,205 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DataSourceGcpResourceInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The properties of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceProperties field is set. + */ + boolean hasCloudSqlInstanceProperties(); + + /** + * + * + *
+   * Output only. The properties of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceProperties. + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties + getCloudSqlInstanceProperties(); + + /** + * + * + *
+   * Output only. The properties of the Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferenceProperties cloud_sql_instance_properties = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceReferencePropertiesOrBuilder + getCloudSqlInstancePropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. The properties of the AlloyDB cluster.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbClusterProperties field is set. + */ + boolean hasAlloyDbClusterProperties(); + + /** + * + * + *
+   * Output only. The properties of the AlloyDB cluster.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbClusterProperties. + */ + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties + getAlloyDbClusterProperties(); + + /** + * + * + *
+   * Output only. The properties of the AlloyDB cluster.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceReferencePropertiesOrBuilder + getAlloyDbClusterPropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. The resource name of the Google Cloud resource.
+   * Ex: projects/{project}/zones/{zone}/instances/{instance}
+   * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcpResourcename. + */ + java.lang.String getGcpResourcename(); + + /** + * + * + *
+   * Output only. The resource name of the Google Cloud resource.
+   * Ex: projects/{project}/zones/{zone}/instances/{instance}
+   * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcpResourcename. + */ + com.google.protobuf.ByteString getGcpResourcenameBytes(); + + /** + * + * + *
+   * Output only. The type of the Google Cloud resource.
+   * Ex: compute.googleapis.com/Instance
+   * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * Output only. The type of the Google Cloud resource.
+   * Ex: compute.googleapis.com/Instance
+   * 
+ * + * string type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Output only. The location of the Google Cloud resource.
+   * Ex: <region>/<zone>/"global"/"unspecified"
+   * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
+   * Output only. The location of the Google Cloud resource.
+   * Ex: <region>/<zone>/"global"/"unspecified"
+   * 
+ * + * string location = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.ResourcePropertiesCase + getResourcePropertiesCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceOrBuilder.java new file mode 100644 index 000000000000..597bc59b9666 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceGcpResourceOrBuilder.java @@ -0,0 +1,307 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DataSourceGcpResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DataSourceGcpResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+   * properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + * + * @return Whether the computeInstanceDatasourceProperties field is set. + */ + boolean hasComputeInstanceDatasourceProperties(); + + /** + * + * + *
+   * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+   * properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + * + * @return The computeInstanceDatasourceProperties. + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties + getComputeInstanceDatasourceProperties(); + + /** + * + * + *
+   * ComputeInstanceDataSourceProperties has a subset of Compute Instance
+   * properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceDataSourceProperties compute_instance_datasource_properties = 4; + * + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceDataSourcePropertiesOrBuilder + getComputeInstanceDatasourcePropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+   * SQL Instance properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudSqlInstanceDatasourceProperties field is set. + */ + boolean hasCloudSqlInstanceDatasourceProperties(); + + /** + * + * + *
+   * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+   * SQL Instance properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudSqlInstanceDatasourceProperties. + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties + getCloudSqlInstanceDatasourceProperties(); + + /** + * + * + *
+   * Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud
+   * SQL Instance properties that are useful at the Datasource level.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourceProperties cloud_sql_instance_datasource_properties = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceDataSourcePropertiesOrBuilder + getCloudSqlInstanceDatasourcePropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+   * cluster properties that are useful at the Datasource level. Currently
+   * none of its child properties are auditable. If new auditable properties
+   * are added, the AUDIT annotation should be added.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the alloyDbClusterDatasourceProperties field is set. + */ + boolean hasAlloyDbClusterDatasourceProperties(); + + /** + * + * + *
+   * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+   * cluster properties that are useful at the Datasource level. Currently
+   * none of its child properties are auditable. If new auditable properties
+   * are added, the AUDIT annotation should be added.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The alloyDbClusterDatasourceProperties. + */ + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties + getAlloyDbClusterDatasourceProperties(); + + /** + * + * + *
+   * Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
+   * cluster properties that are useful at the Datasource level. Currently
+   * none of its child properties are auditable. If new auditable properties
+   * are added, the AUDIT annotation should be added.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.AlloyDBClusterDataSourcePropertiesOrBuilder + getAlloyDbClusterDatasourcePropertiesOrBuilder(); + + /** + * + * + *
+   * DiskDataSourceProperties has a subset of Disk properties that are useful
+   * at the Datasource level.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + * + * @return Whether the diskDatasourceProperties field is set. + */ + boolean hasDiskDatasourceProperties(); + + /** + * + * + *
+   * DiskDataSourceProperties has a subset of Disk properties that are useful
+   * at the Datasource level.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + * + * @return The diskDatasourceProperties. + */ + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties getDiskDatasourceProperties(); + + /** + * + * + *
+   * DiskDataSourceProperties has a subset of Disk properties that are useful
+   * at the Datasource level.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskDataSourceProperties disk_datasource_properties = 7; + * + */ + com.google.cloud.backupdr.v1beta.DiskDataSourcePropertiesOrBuilder + getDiskDatasourcePropertiesOrBuilder(); + + /** + * + * + *
+   * Output only. Full resource pathname URL of the source Google Cloud
+   * resource.
+   * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gcpResourcename. + */ + java.lang.String getGcpResourcename(); + + /** + * + * + *
+   * Output only. Full resource pathname URL of the source Google Cloud
+   * resource.
+   * 
+ * + * string gcp_resourcename = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gcpResourcename. + */ + com.google.protobuf.ByteString getGcpResourcenameBytes(); + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * The type of the Google Cloud resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * The type of the Google Cloud resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + com.google.cloud.backupdr.v1beta.DataSourceGcpResource.GcpResourcePropertiesCase + getGcpResourcePropertiesCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceName.java new file mode 100644 index 000000000000..7d4b84e7fa14 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceName.java @@ -0,0 +1,272 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class DataSourceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_BACKUPVAULT_DATASOURCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String backupvault; + private final String datasource; + + @Deprecated + protected DataSourceName() { + project = null; + location = null; + backupvault = null; + datasource = null; + } + + private DataSourceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + backupvault = Preconditions.checkNotNull(builder.getBackupvault()); + datasource = Preconditions.checkNotNull(builder.getDatasource()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupvault() { + return backupvault; + } + + public String getDatasource() { + return datasource; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataSourceName of( + String project, String location, String backupvault, String datasource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupvault(backupvault) + .setDatasource(datasource) + .build(); + } + + public static String format( + String project, String location, String backupvault, String datasource) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setBackupvault(backupvault) + .setDatasource(datasource) + .build() + .toString(); + } + + public static @Nullable DataSourceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_BACKUPVAULT_DATASOURCE.validatedMatch( + formattedString, "DataSourceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("backupvault"), + matchMap.get("datasource")); + } + + 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<@Nullable DataSourceName> values) { + List list = new ArrayList<>(values.size()); + for (DataSourceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_BACKUPVAULT_DATASOURCE.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("backupvault", backupvault); + } + if (datasource != null) { + fieldMapBuilder.put("datasource", datasource); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_BACKUPVAULT_DATASOURCE.instantiate( + "project", + project, + "location", + location, + "backupvault", + backupvault, + "datasource", + datasource); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DataSourceName that = ((DataSourceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.backupvault, that.backupvault) + && Objects.equals(this.datasource, that.datasource); + } + 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(datasource); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}. + */ + public static class Builder { + private String project; + private String location; + private String backupvault; + private String datasource; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getBackupvault() { + return backupvault; + } + + public String getDatasource() { + return datasource; + } + + 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 setDatasource(String datasource) { + this.datasource = datasource; + return this; + } + + private Builder(DataSourceName dataSourceName) { + this.project = dataSourceName.project; + this.location = dataSourceName.location; + this.backupvault = dataSourceName.backupvault; + this.datasource = dataSourceName.datasource; + } + + public DataSourceName build() { + return new DataSourceName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceOrBuilder.java new file mode 100644 index 000000000000..54b09b484fdd --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceOrBuilder.java @@ -0,0 +1,527 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DataSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DataSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The backed up resource is a Google Cloud resource.
+   * The word 'DataSource' was included in the names to indicate that this is
+   * the representation of the Google Cloud resource used within the
+   * DataSource object.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + * @return Whether the dataSourceGcpResource field is set. + */ + boolean hasDataSourceGcpResource(); + + /** + * + * + *
+   * The backed up resource is a Google Cloud resource.
+   * The word 'DataSource' was included in the names to indicate that this is
+   * the representation of the Google Cloud resource used within the
+   * DataSource object.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + * + * @return The dataSourceGcpResource. + */ + com.google.cloud.backupdr.v1beta.DataSourceGcpResource getDataSourceGcpResource(); + + /** + * + * + *
+   * The backed up resource is a Google Cloud resource.
+   * The word 'DataSource' was included in the names to indicate that this is
+   * the representation of the Google Cloud resource used within the
+   * DataSource object.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DataSourceGcpResource data_source_gcp_resource = 26; + */ + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceOrBuilder + getDataSourceGcpResourceOrBuilder(); + + /** + * + * + *
+   * The backed up resource is a backup appliance application.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + * + * @return Whether the dataSourceBackupApplianceApplication field is set. + */ + boolean hasDataSourceBackupApplianceApplication(); + + /** + * + * + *
+   * The backed up resource is a backup appliance application.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + * + * @return The dataSourceBackupApplianceApplication. + */ + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication + getDataSourceBackupApplianceApplication(); + + /** + * + * + *
+   * The backed up resource is a backup appliance application.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplication data_source_backup_appliance_application = 27; + * + */ + com.google.cloud.backupdr.v1beta.DataSourceBackupApplianceApplicationOrBuilder + getDataSourceBackupApplianceApplicationOrBuilder(); + + /** + * + * + *
+   * Output only. Identifier. Name of the datasource to create.
+   * It must have the
+   * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+   * `{datasource}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the backup vault.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Identifier. Name of the datasource to create.
+   * It must have the
+   * format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`.
+   * `{datasource}` cannot be changed after creation. It must be between 3-63
+   * characters long and must be unique within the backup vault.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The DataSource resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The DataSource resource instance state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource.State state = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.DataSource.State getState(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * No labels currently defined:
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * + * optional .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * + * optional .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Number of backups in the data source.
+   * 
+ * + * optional int64 backup_count = 7; + * + * @return Whether the backupCount field is set. + */ + boolean hasBackupCount(); + + /** + * + * + *
+   * Number of backups in the data source.
+   * 
+ * + * optional int64 backup_count = 7; + * + * @return The backupCount. + */ + long getBackupCount(); + + /** + * + * + *
+   * Server specified ETag for the ManagementServer resource to prevent
+   * simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 14; + * + * @return Whether the etag field is set. + */ + boolean hasEtag(); + + /** + * + * + *
+   * Server specified ETag for the ManagementServer resource to prevent
+   * simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 14; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Server specified ETag for the ManagementServer resource to prevent
+   * simultaneous updates from overwiting each other.
+   * 
+ * + * optional string etag = 14; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * The number of bytes (metadata and data) stored in this datasource.
+   * 
+ * + * optional int64 total_stored_bytes = 23; + * + * @return Whether the totalStoredBytes field is set. + */ + boolean hasTotalStoredBytes(); + + /** + * + * + *
+   * The number of bytes (metadata and data) stored in this datasource.
+   * 
+ * + * optional int64 total_stored_bytes = 23; + * + * @return The totalStoredBytes. + */ + long getTotalStoredBytes(); + + /** + * + * + *
+   * Output only. The backup configuration state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for configState. + */ + int getConfigStateValue(); + + /** + * + * + *
+   * Output only. The backup configuration state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState config_state = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The configState. + */ + com.google.cloud.backupdr.v1beta.BackupConfigState getConfigState(); + + /** + * + * + *
+   * Output only. Details of how the resource is configured for backup.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the backupConfigInfo field is set. + */ + boolean hasBackupConfigInfo(); + + /** + * + * + *
+   * Output only. Details of how the resource is configured for backup.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupConfigInfo. + */ + com.google.cloud.backupdr.v1beta.BackupConfigInfo getBackupConfigInfo(); + + /** + * + * + *
+   * Output only. Details of how the resource is configured for backup.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigInfo backup_config_info = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupConfigInfoOrBuilder getBackupConfigInfoOrBuilder(); + + /** + * + * + *
+   * Output only. This field is set to true if the backup is blocked by vault
+   * access restriction.
+   * 
+ * + * + * bool backup_blocked_by_vault_access_restriction = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backupBlockedByVaultAccessRestriction. + */ + boolean getBackupBlockedByVaultAccessRestriction(); + + com.google.cloud.backupdr.v1beta.DataSource.SourceResourceCase getSourceResourceCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReference.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReference.java new file mode 100644 index 000000000000..594cbb44334c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReference.java @@ -0,0 +1,2215 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * DataSourceReference is a reference to a DataSource resource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceReference} + */ +@com.google.protobuf.Generated +public final class DataSourceReference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DataSourceReference) + DataSourceReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataSourceReference"); + } + + // Use DataSourceReference.newBuilder() to construct. + private DataSourceReference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataSourceReference() { + name_ = ""; + dataSource_ = ""; + dataSourceBackupConfigState_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceReference.class, + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder.class); + } + + 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 DataSourceReference.
+   * Format:
+   * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+   * 
+ * + * 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 DataSourceReference.
+   * Format:
+   * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+   * 
+ * + * 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 DATA_SOURCE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSource_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the DataSource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+   * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataSource. + */ + @java.lang.Override + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + 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(); + dataSource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the DataSource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+   * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the DataSourceReference was created.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the DataSourceReference was created.
+   * 
+ * + * .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. The time when the DataSourceReference was created.
+   * 
+ * + * .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 DATA_SOURCE_BACKUP_CONFIG_STATE_FIELD_NUMBER = 4; + private int dataSourceBackupConfigState_ = 0; + + /** + * + * + *
+   * Output only. The backup configuration state of the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataSourceBackupConfigState. + */ + @java.lang.Override + public int getDataSourceBackupConfigStateValue() { + return dataSourceBackupConfigState_; + } + + /** + * + * + *
+   * Output only. The backup configuration state of the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceBackupConfigState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigState getDataSourceBackupConfigState() { + com.google.cloud.backupdr.v1beta.BackupConfigState result = + com.google.cloud.backupdr.v1beta.BackupConfigState.forNumber(dataSourceBackupConfigState_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigState.UNRECOGNIZED + : result; + } + + public static final int DATA_SOURCE_BACKUP_COUNT_FIELD_NUMBER = 5; + private long dataSourceBackupCount_ = 0L; + + /** + * + * + *
+   * Output only. Number of backups in the DataSource.
+   * 
+ * + * int64 data_source_backup_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSourceBackupCount. + */ + @java.lang.Override + public long getDataSourceBackupCount() { + return dataSourceBackupCount_; + } + + public static final int DATA_SOURCE_BACKUP_CONFIG_INFO_FIELD_NUMBER = 6; + private com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo dataSourceBackupConfigInfo_; + + /** + * + * + *
+   * Output only. Information of backup configuration on the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSourceBackupConfigInfo field is set. + */ + @java.lang.Override + public boolean hasDataSourceBackupConfigInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Information of backup configuration on the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceBackupConfigInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo + getDataSourceBackupConfigInfo() { + return dataSourceBackupConfigInfo_ == null + ? com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.getDefaultInstance() + : dataSourceBackupConfigInfo_; + } + + /** + * + * + *
+   * Output only. Information of backup configuration on the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfoOrBuilder + getDataSourceBackupConfigInfoOrBuilder() { + return dataSourceBackupConfigInfo_ == null + ? com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.getDefaultInstance() + : dataSourceBackupConfigInfo_; + } + + public static final int DATA_SOURCE_GCP_RESOURCE_INFO_FIELD_NUMBER = 7; + private com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo dataSourceGcpResourceInfo_; + + /** + * + * + *
+   * Output only. The Google Cloud resource that the DataSource is associated
+   * with.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSourceGcpResourceInfo field is set. + */ + @java.lang.Override + public boolean hasDataSourceGcpResourceInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The Google Cloud resource that the DataSource is associated
+   * with.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceGcpResourceInfo. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo getDataSourceGcpResourceInfo() { + return dataSourceGcpResourceInfo_ == null + ? com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.getDefaultInstance() + : dataSourceGcpResourceInfo_; + } + + /** + * + * + *
+   * Output only. The Google Cloud resource that the DataSource is associated
+   * with.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfoOrBuilder + getDataSourceGcpResourceInfoOrBuilder() { + return dataSourceGcpResourceInfo_ == null + ? com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.getDefaultInstance() + : dataSourceGcpResourceInfo_; + } + + public static final int TOTAL_STORED_BYTES_FIELD_NUMBER = 8; + private long totalStoredBytes_ = 0L; + + /** + * + * + *
+   * Output only. Total size of the storage used by all backup resources for the
+   * referenced datasource.
+   * 
+ * + * optional int64 total_stored_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the totalStoredBytes field is set. + */ + @java.lang.Override + public boolean hasTotalStoredBytes() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. Total size of the storage used by all backup resources for the
+   * referenced datasource.
+   * 
+ * + * optional int64 total_stored_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalStoredBytes. + */ + @java.lang.Override + public long getTotalStoredBytes() { + return totalStoredBytes_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, dataSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (dataSourceBackupConfigState_ + != com.google.cloud.backupdr.v1beta.BackupConfigState.BACKUP_CONFIG_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, dataSourceBackupConfigState_); + } + if (dataSourceBackupCount_ != 0L) { + output.writeInt64(5, dataSourceBackupCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getDataSourceBackupConfigInfo()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getDataSourceGcpResourceInfo()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt64(8, totalStoredBytes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dataSource_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (dataSourceBackupConfigState_ + != com.google.cloud.backupdr.v1beta.BackupConfigState.BACKUP_CONFIG_STATE_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(4, dataSourceBackupConfigState_); + } + if (dataSourceBackupCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, dataSourceBackupCount_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getDataSourceBackupConfigInfo()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getDataSourceGcpResourceInfo()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, totalStoredBytes_); + } + 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.backupdr.v1beta.DataSourceReference)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DataSourceReference other = + (com.google.cloud.backupdr.v1beta.DataSourceReference) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDataSource().equals(other.getDataSource())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (dataSourceBackupConfigState_ != other.dataSourceBackupConfigState_) return false; + if (getDataSourceBackupCount() != other.getDataSourceBackupCount()) return false; + if (hasDataSourceBackupConfigInfo() != other.hasDataSourceBackupConfigInfo()) return false; + if (hasDataSourceBackupConfigInfo()) { + if (!getDataSourceBackupConfigInfo().equals(other.getDataSourceBackupConfigInfo())) + return false; + } + if (hasDataSourceGcpResourceInfo() != other.hasDataSourceGcpResourceInfo()) return false; + if (hasDataSourceGcpResourceInfo()) { + if (!getDataSourceGcpResourceInfo().equals(other.getDataSourceGcpResourceInfo())) + return false; + } + if (hasTotalStoredBytes() != other.hasTotalStoredBytes()) return false; + if (hasTotalStoredBytes()) { + if (getTotalStoredBytes() != other.getTotalStoredBytes()) 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) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + DATA_SOURCE_BACKUP_CONFIG_STATE_FIELD_NUMBER; + hash = (53 * hash) + dataSourceBackupConfigState_; + hash = (37 * hash) + DATA_SOURCE_BACKUP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDataSourceBackupCount()); + if (hasDataSourceBackupConfigInfo()) { + hash = (37 * hash) + DATA_SOURCE_BACKUP_CONFIG_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceBackupConfigInfo().hashCode(); + } + if (hasDataSourceGcpResourceInfo()) { + hash = (37 * hash) + DATA_SOURCE_GCP_RESOURCE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceGcpResourceInfo().hashCode(); + } + if (hasTotalStoredBytes()) { + hash = (37 * hash) + TOTAL_STORED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalStoredBytes()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference 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.backupdr.v1beta.DataSourceReference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference 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.backupdr.v1beta.DataSourceReference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DataSourceReference 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * DataSourceReference is a reference to a DataSource resource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DataSourceReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DataSourceReference) + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DataSourceReference.class, + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DataSourceReference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetDataSourceBackupConfigInfoFieldBuilder(); + internalGetDataSourceGcpResourceInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + dataSource_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + dataSourceBackupConfigState_ = 0; + dataSourceBackupCount_ = 0L; + dataSourceBackupConfigInfo_ = null; + if (dataSourceBackupConfigInfoBuilder_ != null) { + dataSourceBackupConfigInfoBuilder_.dispose(); + dataSourceBackupConfigInfoBuilder_ = null; + } + dataSourceGcpResourceInfo_ = null; + if (dataSourceGcpResourceInfoBuilder_ != null) { + dataSourceGcpResourceInfoBuilder_.dispose(); + dataSourceGcpResourceInfoBuilder_ = null; + } + totalStoredBytes_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_DataSourceReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceReference getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DataSourceReference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceReference build() { + com.google.cloud.backupdr.v1beta.DataSourceReference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceReference buildPartial() { + com.google.cloud.backupdr.v1beta.DataSourceReference result = + new com.google.cloud.backupdr.v1beta.DataSourceReference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DataSourceReference result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataSource_ = dataSource_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dataSourceBackupConfigState_ = dataSourceBackupConfigState_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.dataSourceBackupCount_ = dataSourceBackupCount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dataSourceBackupConfigInfo_ = + dataSourceBackupConfigInfoBuilder_ == null + ? dataSourceBackupConfigInfo_ + : dataSourceBackupConfigInfoBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.dataSourceGcpResourceInfo_ = + dataSourceGcpResourceInfoBuilder_ == null + ? dataSourceGcpResourceInfo_ + : dataSourceGcpResourceInfoBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.totalStoredBytes_ = totalStoredBytes_; + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DataSourceReference) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DataSourceReference) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DataSourceReference other) { + if (other == com.google.cloud.backupdr.v1beta.DataSourceReference.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDataSource().isEmpty()) { + dataSource_ = other.dataSource_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.dataSourceBackupConfigState_ != 0) { + setDataSourceBackupConfigStateValue(other.getDataSourceBackupConfigStateValue()); + } + if (other.getDataSourceBackupCount() != 0L) { + setDataSourceBackupCount(other.getDataSourceBackupCount()); + } + if (other.hasDataSourceBackupConfigInfo()) { + mergeDataSourceBackupConfigInfo(other.getDataSourceBackupConfigInfo()); + } + if (other.hasDataSourceGcpResourceInfo()) { + mergeDataSourceGcpResourceInfo(other.getDataSourceGcpResourceInfo()); + } + if (other.hasTotalStoredBytes()) { + setTotalStoredBytes(other.getTotalStoredBytes()); + } + 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 18: + { + dataSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + dataSourceBackupConfigState_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + dataSourceBackupCount_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage( + internalGetDataSourceBackupConfigInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetDataSourceGcpResourceInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + totalStoredBytes_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + 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 DataSourceReference.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * 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 DataSourceReference.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * 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 DataSourceReference.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * 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 DataSourceReference.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * 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 DataSourceReference.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * 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 java.lang.Object dataSource_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the DataSource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+     * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataSource. + */ + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the DataSource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+     * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataSource. + */ + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the DataSource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+     * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the DataSource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+     * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataSource() { + dataSource_ = getDefaultInstance().getDataSource(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the DataSource.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+     * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSource_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the DataSourceReference was created.
+     * 
+ * + * + * .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. The time when the DataSourceReference was created.
+     * 
+ * + * + * .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. The time when the DataSourceReference was created.
+     * 
+ * + * + * .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. The time when the DataSourceReference was created.
+     * 
+ * + * + * .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. The time when the DataSourceReference was created.
+     * 
+ * + * + * .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); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the DataSourceReference was created.
+     * 
+ * + * + * .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. The time when the DataSourceReference was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the DataSourceReference was created.
+     * 
+ * + * + * .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. The time when the DataSourceReference was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private int dataSourceBackupConfigState_ = 0; + + /** + * + * + *
+     * Output only. The backup configuration state of the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataSourceBackupConfigState. + */ + @java.lang.Override + public int getDataSourceBackupConfigStateValue() { + return dataSourceBackupConfigState_; + } + + /** + * + * + *
+     * Output only. The backup configuration state of the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for dataSourceBackupConfigState to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBackupConfigStateValue(int value) { + dataSourceBackupConfigState_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The backup configuration state of the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceBackupConfigState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigState getDataSourceBackupConfigState() { + com.google.cloud.backupdr.v1beta.BackupConfigState result = + com.google.cloud.backupdr.v1beta.BackupConfigState.forNumber( + dataSourceBackupConfigState_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupConfigState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The backup configuration state of the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The dataSourceBackupConfigState to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBackupConfigState( + com.google.cloud.backupdr.v1beta.BackupConfigState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + dataSourceBackupConfigState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The backup configuration state of the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataSourceBackupConfigState() { + bitField0_ = (bitField0_ & ~0x00000008); + dataSourceBackupConfigState_ = 0; + onChanged(); + return this; + } + + private long dataSourceBackupCount_; + + /** + * + * + *
+     * Output only. Number of backups in the DataSource.
+     * 
+ * + * int64 data_source_backup_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSourceBackupCount. + */ + @java.lang.Override + public long getDataSourceBackupCount() { + return dataSourceBackupCount_; + } + + /** + * + * + *
+     * Output only. Number of backups in the DataSource.
+     * 
+ * + * int64 data_source_backup_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The dataSourceBackupCount to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBackupCount(long value) { + + dataSourceBackupCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Number of backups in the DataSource.
+     * 
+ * + * int64 data_source_backup_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDataSourceBackupCount() { + bitField0_ = (bitField0_ & ~0x00000010); + dataSourceBackupCount_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo dataSourceBackupConfigInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo, + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfoOrBuilder> + dataSourceBackupConfigInfoBuilder_; + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSourceBackupConfigInfo field is set. + */ + public boolean hasDataSourceBackupConfigInfo() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceBackupConfigInfo. + */ + public com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo + getDataSourceBackupConfigInfo() { + if (dataSourceBackupConfigInfoBuilder_ == null) { + return dataSourceBackupConfigInfo_ == null + ? com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.getDefaultInstance() + : dataSourceBackupConfigInfo_; + } else { + return dataSourceBackupConfigInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataSourceBackupConfigInfo( + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo value) { + if (dataSourceBackupConfigInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSourceBackupConfigInfo_ = value; + } else { + dataSourceBackupConfigInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataSourceBackupConfigInfo( + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.Builder builderForValue) { + if (dataSourceBackupConfigInfoBuilder_ == null) { + dataSourceBackupConfigInfo_ = builderForValue.build(); + } else { + dataSourceBackupConfigInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDataSourceBackupConfigInfo( + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo value) { + if (dataSourceBackupConfigInfoBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && dataSourceBackupConfigInfo_ != null + && dataSourceBackupConfigInfo_ + != com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo + .getDefaultInstance()) { + getDataSourceBackupConfigInfoBuilder().mergeFrom(value); + } else { + dataSourceBackupConfigInfo_ = value; + } + } else { + dataSourceBackupConfigInfoBuilder_.mergeFrom(value); + } + if (dataSourceBackupConfigInfo_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDataSourceBackupConfigInfo() { + bitField0_ = (bitField0_ & ~0x00000020); + dataSourceBackupConfigInfo_ = null; + if (dataSourceBackupConfigInfoBuilder_ != null) { + dataSourceBackupConfigInfoBuilder_.dispose(); + dataSourceBackupConfigInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.Builder + getDataSourceBackupConfigInfoBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetDataSourceBackupConfigInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfoOrBuilder + getDataSourceBackupConfigInfoOrBuilder() { + if (dataSourceBackupConfigInfoBuilder_ != null) { + return dataSourceBackupConfigInfoBuilder_.getMessageOrBuilder(); + } else { + return dataSourceBackupConfigInfo_ == null + ? com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.getDefaultInstance() + : dataSourceBackupConfigInfo_; + } + } + + /** + * + * + *
+     * Output only. Information of backup configuration on the DataSource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo, + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfoOrBuilder> + internalGetDataSourceBackupConfigInfoFieldBuilder() { + if (dataSourceBackupConfigInfoBuilder_ == null) { + dataSourceBackupConfigInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo, + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo.Builder, + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfoOrBuilder>( + getDataSourceBackupConfigInfo(), getParentForChildren(), isClean()); + dataSourceBackupConfigInfo_ = null; + } + return dataSourceBackupConfigInfoBuilder_; + } + + private com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo dataSourceGcpResourceInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.Builder, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfoOrBuilder> + dataSourceGcpResourceInfoBuilder_; + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSourceGcpResourceInfo field is set. + */ + public boolean hasDataSourceGcpResourceInfo() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceGcpResourceInfo. + */ + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo + getDataSourceGcpResourceInfo() { + if (dataSourceGcpResourceInfoBuilder_ == null) { + return dataSourceGcpResourceInfo_ == null + ? com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.getDefaultInstance() + : dataSourceGcpResourceInfo_; + } else { + return dataSourceGcpResourceInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataSourceGcpResourceInfo( + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo value) { + if (dataSourceGcpResourceInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSourceGcpResourceInfo_ = value; + } else { + dataSourceGcpResourceInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDataSourceGcpResourceInfo( + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.Builder builderForValue) { + if (dataSourceGcpResourceInfoBuilder_ == null) { + dataSourceGcpResourceInfo_ = builderForValue.build(); + } else { + dataSourceGcpResourceInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDataSourceGcpResourceInfo( + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo value) { + if (dataSourceGcpResourceInfoBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && dataSourceGcpResourceInfo_ != null + && dataSourceGcpResourceInfo_ + != com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo + .getDefaultInstance()) { + getDataSourceGcpResourceInfoBuilder().mergeFrom(value); + } else { + dataSourceGcpResourceInfo_ = value; + } + } else { + dataSourceGcpResourceInfoBuilder_.mergeFrom(value); + } + if (dataSourceGcpResourceInfo_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDataSourceGcpResourceInfo() { + bitField0_ = (bitField0_ & ~0x00000040); + dataSourceGcpResourceInfo_ = null; + if (dataSourceGcpResourceInfoBuilder_ != null) { + dataSourceGcpResourceInfoBuilder_.dispose(); + dataSourceGcpResourceInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.Builder + getDataSourceGcpResourceInfoBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetDataSourceGcpResourceInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfoOrBuilder + getDataSourceGcpResourceInfoOrBuilder() { + if (dataSourceGcpResourceInfoBuilder_ != null) { + return dataSourceGcpResourceInfoBuilder_.getMessageOrBuilder(); + } else { + return dataSourceGcpResourceInfo_ == null + ? com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.getDefaultInstance() + : dataSourceGcpResourceInfo_; + } + } + + /** + * + * + *
+     * Output only. The Google Cloud resource that the DataSource is associated
+     * with.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.Builder, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfoOrBuilder> + internalGetDataSourceGcpResourceInfoFieldBuilder() { + if (dataSourceGcpResourceInfoBuilder_ == null) { + dataSourceGcpResourceInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo.Builder, + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfoOrBuilder>( + getDataSourceGcpResourceInfo(), getParentForChildren(), isClean()); + dataSourceGcpResourceInfo_ = null; + } + return dataSourceGcpResourceInfoBuilder_; + } + + private long totalStoredBytes_; + + /** + * + * + *
+     * Output only. Total size of the storage used by all backup resources for the
+     * referenced datasource.
+     * 
+ * + * optional int64 total_stored_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the totalStoredBytes field is set. + */ + @java.lang.Override + public boolean hasTotalStoredBytes() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. Total size of the storage used by all backup resources for the
+     * referenced datasource.
+     * 
+ * + * optional int64 total_stored_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalStoredBytes. + */ + @java.lang.Override + public long getTotalStoredBytes() { + return totalStoredBytes_; + } + + /** + * + * + *
+     * Output only. Total size of the storage used by all backup resources for the
+     * referenced datasource.
+     * 
+ * + * optional int64 total_stored_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The totalStoredBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalStoredBytes(long value) { + + totalStoredBytes_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Total size of the storage used by all backup resources for the
+     * referenced datasource.
+     * 
+ * + * optional int64 total_stored_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTotalStoredBytes() { + bitField0_ = (bitField0_ & ~0x00000080); + totalStoredBytes_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DataSourceReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DataSourceReference) + private static final com.google.cloud.backupdr.v1beta.DataSourceReference DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DataSourceReference(); + } + + public static com.google.cloud.backupdr.v1beta.DataSourceReference getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataSourceReference 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.backupdr.v1beta.DataSourceReference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceName.java new file mode 100644 index 000000000000..bbdd245c263c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceName.java @@ -0,0 +1,235 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class DataSourceReferenceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_SOURCE_REFERENCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String dataSourceReference; + + @Deprecated + protected DataSourceReferenceName() { + project = null; + location = null; + dataSourceReference = null; + } + + private DataSourceReferenceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataSourceReference = Preconditions.checkNotNull(builder.getDataSourceReference()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataSourceReference() { + return dataSourceReference; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataSourceReferenceName of( + String project, String location, String dataSourceReference) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataSourceReference(dataSourceReference) + .build(); + } + + public static String format(String project, String location, String dataSourceReference) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataSourceReference(dataSourceReference) + .build() + .toString(); + } + + public static @Nullable DataSourceReferenceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATA_SOURCE_REFERENCE.validatedMatch( + formattedString, "DataSourceReferenceName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("data_source_reference")); + } + + 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<@Nullable DataSourceReferenceName> values) { + List list = new ArrayList<>(values.size()); + for (DataSourceReferenceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_SOURCE_REFERENCE.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 (dataSourceReference != null) { + fieldMapBuilder.put("data_source_reference", dataSourceReference); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATA_SOURCE_REFERENCE.instantiate( + "project", project, "location", location, "data_source_reference", dataSourceReference); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DataSourceReferenceName that = ((DataSourceReferenceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataSourceReference, that.dataSourceReference); + } + 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(dataSourceReference); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}. + */ + public static class Builder { + private String project; + private String location; + private String dataSourceReference; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataSourceReference() { + return dataSourceReference; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataSourceReference(String dataSourceReference) { + this.dataSourceReference = dataSourceReference; + return this; + } + + private Builder(DataSourceReferenceName dataSourceReferenceName) { + this.project = dataSourceReferenceName.project; + this.location = dataSourceReferenceName.location; + this.dataSourceReference = dataSourceReferenceName.dataSourceReference; + } + + public DataSourceReferenceName build() { + return new DataSourceReferenceName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceOrBuilder.java new file mode 100644 index 000000000000..130150fa5ffb --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceOrBuilder.java @@ -0,0 +1,296 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DataSourceReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DataSourceReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the DataSourceReference.
+   * Format:
+   * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the DataSourceReference.
+   * Format:
+   * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The resource name of the DataSource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+   * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The dataSource. + */ + java.lang.String getDataSource(); + + /** + * + * + *
+   * Output only. The resource name of the DataSource.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource}
+   * 
+ * + * + * string data_source = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataSource. + */ + com.google.protobuf.ByteString getDataSourceBytes(); + + /** + * + * + *
+   * Output only. The time when the DataSourceReference was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the DataSourceReference was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the DataSourceReference was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The backup configuration state of the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataSourceBackupConfigState. + */ + int getDataSourceBackupConfigStateValue(); + + /** + * + * + *
+   * Output only. The backup configuration state of the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupConfigState data_source_backup_config_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceBackupConfigState. + */ + com.google.cloud.backupdr.v1beta.BackupConfigState getDataSourceBackupConfigState(); + + /** + * + * + *
+   * Output only. Number of backups in the DataSource.
+   * 
+ * + * int64 data_source_backup_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSourceBackupCount. + */ + long getDataSourceBackupCount(); + + /** + * + * + *
+   * Output only. Information of backup configuration on the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSourceBackupConfigInfo field is set. + */ + boolean hasDataSourceBackupConfigInfo(); + + /** + * + * + *
+   * Output only. Information of backup configuration on the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceBackupConfigInfo. + */ + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo getDataSourceBackupConfigInfo(); + + /** + * + * + *
+   * Output only. Information of backup configuration on the DataSource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceBackupConfigInfo data_source_backup_config_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.DataSourceBackupConfigInfoOrBuilder + getDataSourceBackupConfigInfoOrBuilder(); + + /** + * + * + *
+   * Output only. The Google Cloud resource that the DataSource is associated
+   * with.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the dataSourceGcpResourceInfo field is set. + */ + boolean hasDataSourceGcpResourceInfo(); + + /** + * + * + *
+   * Output only. The Google Cloud resource that the DataSource is associated
+   * with.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataSourceGcpResourceInfo. + */ + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo getDataSourceGcpResourceInfo(); + + /** + * + * + *
+   * Output only. The Google Cloud resource that the DataSource is associated
+   * with.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.DataSourceGcpResourceInfoOrBuilder + getDataSourceGcpResourceInfoOrBuilder(); + + /** + * + * + *
+   * Output only. Total size of the storage used by all backup resources for the
+   * referenced datasource.
+   * 
+ * + * optional int64 total_stored_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the totalStoredBytes field is set. + */ + boolean hasTotalStoredBytes(); + + /** + * + * + *
+   * Output only. Total size of the storage used by all backup resources for the
+   * referenced datasource.
+   * 
+ * + * optional int64 total_stored_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalStoredBytes. + */ + long getTotalStoredBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceProto.java new file mode 100644 index 000000000000..06242a108617 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DataSourceReferenceProto.java @@ -0,0 +1,262 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class DataSourceReferenceProto extends com.google.protobuf.GeneratedFile { + private DataSourceReferenceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DataSourceReferenceProto"); + } + + 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_backupdr_v1beta_DataSourceReference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DataSourceReference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DataSourceBackupConfigInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DataSourceBackupConfigInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResourceInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_DataSourceGcpResourceInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_GetDataSourceReferenceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_GetDataSourceReferenceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeResponse_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" + + "6google/cloud/backupdr/v1beta/datasourcereference.proto\022\034google.cloud.backupdr." + + "v1beta\032\037google/api/field_behavior.proto\032" + + "\031google/api/resource.proto\032.google/cloud" + + "/backupdr/v1beta/backupvault.proto\0326google/cloud/backupdr/v1beta/backupvault_all" + + "oydb.proto\0327google/cloud/backupdr/v1beta" + + "/backupvault_cloudsql.proto\032\037google/protobuf/timestamp.proto\"\343\005\n" + + "\023DataSourceReference\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022?\n" + + "\013data_source\030\002 \001(\tB*\340A\003\372A$\n" + + "\"backupdr.googleapis.com/DataSource\0224\n" + + "\013create_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022]\n" + + "\037data_source_backup_config_state\030\004" + + " \001(\0162/.google.cloud.backupdr.v1beta.BackupConfigStateB\003\340A\003\022%\n" + + "\030data_source_backup_count\030\005 \001(\003B\003\340A\003\022e\n" + + "\036data_source_backup_config_info\030\006 \001(\01328.g" + + "oogle.cloud.backupdr.v1beta.DataSourceBackupConfigInfoB\003\340A\003\022c\n" + + "\035data_source_gcp_resource_info\030\007 \001(\01327.google.cloud.backup" + + "dr.v1beta.DataSourceGcpResourceInfoB\003\340A\003\022$\n" + + "\022total_stored_bytes\030\010" + + " \001(\003B\003\340A\003H\000\210\001\001:\262\001\352A\256\001\n" + + "+backupdr.googleapis.com/DataSourceReference\022Tprojects/{project}/locations" + + "/{location}/dataSourceReferences/{data_s" + + "ource_reference}*\024dataSourceReferences2\023dataSourceReferenceB\025\n" + + "\023_total_stored_bytes\"\316\001\n" + + "\032DataSourceBackupConfigInfo\022^\n" + + "\021last_backup_state\030\001 \001(\0162>.google.cloud.back" + + "updr.v1beta.BackupConfigInfo.LastBackupStateB\003\340A\003\022P\n" + + "\'last_successful_backup_consistency_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"\355\002\n" + + "\031DataSourceGcpResourceInfo\022y\n" + + "\035cloud_sql_instance_properties\030\004 \001(\013" + + "2K.google.cloud.backupdr.v1beta.CloudSql" + + "InstanceDataSourceReferencePropertiesB\003\340A\003H\000\022u\n" + + "\033alloy_db_cluster_properties\030\006 \001(" + + "\0132I.google.cloud.backupdr.v1beta.AlloyDB" + + "ClusterDataSourceReferencePropertiesB\003\340A\003H\000\022\035\n" + + "\020gcp_resourcename\030\001 \001(\tB\003\340A\003\022\021\n" + + "\004type\030\002 \001(\tB\003\340A\003\022\025\n" + + "\010location\030\003 \001(\tB\003\340A\003B\025\n" + + "\023resource_properties\"b\n" + + "\035GetDataSourceReferenceRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+backupdr.googleapis.com/DataSourceReference\"\303\001\n" + + "\037ListDataSourceReferencesRequest\022C\n" + + "\006parent\030\001 \001(" + + "\tB3\340A\002\372A-\022+backupdr.googleapis.com/DataSourceReference\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\243\001\n" + + " ListDataSourceReferencesResponse\022Q\n" + + "\026data_source_references\030\001" + + " \003(\01321.google.cloud.backupdr.v1beta.DataSourceReference\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\357\001\n" + + "/FetchDataSourceReferencesForResourceTypeRequest\022C\n" + + "\006parent\030\001 \001(\tB3\340A\002\372A-\022" + + "+backupdr.googleapis.com/DataSourceReference\022\032\n\r" + + "resource_type\030\002 \001(\tB\003\340A\002\022\026\n" + + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\004 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\005 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\006 \001(\tB\003\340A\001\"\236\001\n" + + "0FetchDataSourceReferencesForResourceTypeResponse\022Q\n" + + "\026data_source_references\030\001" + + " \003(\01321.google.cloud.backupdr.v1beta.DataSourceReference\022\027\n" + + "\017next_page_token\030\002 \001(\tB\334\001\n" + + " com.google.cloud.backupdr.v1betaB\030DataSourceReferenceProtoP\001Z + * Request message for deleting an AutoProtectionPolicy. + * + * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest} + */ +@com.google.protobuf.Generated +public final class DeleteAutoProtectionPolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) + DeleteAutoProtectionPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteAutoProtectionPolicyRequest"); + } + + // Use DeleteAutoProtectionPolicyRequest.newBuilder() to construct. + private DeleteAutoProtectionPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteAutoProtectionPolicyRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_DeleteAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_DeleteAutoProtectionPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest.class, + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the policy to delete.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * 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 name of the policy to delete.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * 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; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * The current etag of the AutoProtectionPolicy.
+   * If an etag is provided and does not match the current etag of the
+   * connection, the request will be rejected with an ABORTED error.
+   * 
+ * + * string etag = 2; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * The current etag of the AutoProtectionPolicy.
+   * If an etag is provided and does not match the current etag of the
+   * connection, the request will be rejected with an ABORTED error.
+   * 
+ * + * string etag = 2; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + 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.backupdr.v1beta.DeleteAutoProtectionPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest other = + (com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest 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.backupdr.v1beta.DeleteAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest 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.backupdr.v1beta.DeleteAutoProtectionPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DeleteAutoProtectionPolicyRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for deleting an AutoProtectionPolicy.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_DeleteAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_DeleteAutoProtectionPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest.class, + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_DeleteAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest build() { + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest buildPartial() { + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest result = + new com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + 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 + case 18: + { + etag_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the policy to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 name of the policy to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 name of the policy to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 name of the policy to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 name of the policy to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * The current etag of the AutoProtectionPolicy.
+     * If an etag is provided and does not match the current etag of the
+     * connection, the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 2; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The current etag of the AutoProtectionPolicy.
+     * If an etag is provided and does not match the current etag of the
+     * connection, the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 2; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The current etag of the AutoProtectionPolicy.
+     * If an etag is provided and does not match the current etag of the
+     * connection, the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 2; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The current etag of the AutoProtectionPolicy.
+     * If an etag is provided and does not match the current etag of the
+     * connection, the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 2; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The current etag of the AutoProtectionPolicy.
+     * If an etag is provided and does not match the current etag of the
+     * connection, the request will be rejected with an ABORTED error.
+     * 
+ * + * string etag = 2; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) + private static final com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest(); + } + + public static com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAutoProtectionPolicyRequest 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.backupdr.v1beta.DeleteAutoProtectionPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteAutoProtectionPolicyRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteAutoProtectionPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..1221fd8ab5ad --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteAutoProtectionPolicyRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DeleteAutoProtectionPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy to delete.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the policy to delete.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The current etag of the AutoProtectionPolicy.
+   * If an etag is provided and does not match the current etag of the
+   * connection, the request will be rejected with an ABORTED error.
+   * 
+ * + * string etag = 2; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * The current etag of the AutoProtectionPolicy.
+   * If an etag is provided and does not match the current etag of the
+   * connection, the request will be rejected with an ABORTED error.
+   * 
+ * + * string etag = 2; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanAssociationRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanAssociationRequest.java new file mode 100644 index 000000000000..a36c9cb3a06b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanAssociationRequest.java @@ -0,0 +1,1150 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for deleting a backup plan association.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest} + */ +@com.google.protobuf.Generated +public final class DeleteBackupPlanAssociationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) + DeleteBackupPlanAssociationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteBackupPlanAssociationRequest"); + } + + // Use DeleteBackupPlanAssociationRequest.newBuilder() to construct. + private DeleteBackupPlanAssociationRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteBackupPlanAssociationRequest() { + name_ = ""; + requestId_ = ""; + autoProtectionPolicyBinding_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanAssociationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest.class, + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTO_PROTECTION_POLICY_BINDING_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object autoProtectionPolicyBinding_ = ""; + + /** + * + * + *
+   * Optional. This field is exclusively used by Backup and DR's auto-protection
+   * feature. The resource name of the `AutoProtectionPolicyBinding` that
+   * triggered the deletion of this association.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + @java.lang.Override + public java.lang.String getAutoProtectionPolicyBinding() { + java.lang.Object ref = autoProtectionPolicyBinding_; + 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(); + autoProtectionPolicyBinding_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. This field is exclusively used by Backup and DR's auto-protection
+   * feature. The resource name of the `AutoProtectionPolicyBinding` that
+   * triggered the deletion of this association.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyBinding_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyBinding_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, autoProtectionPolicyBinding_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyBinding_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(3, autoProtectionPolicyBinding_); + } + 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.backupdr.v1beta.DeleteBackupPlanAssociationRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest other = + (com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getAutoProtectionPolicyBinding().equals(other.getAutoProtectionPolicyBinding())) + 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + AUTO_PROTECTION_POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicyBinding().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest 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.backupdr.v1beta.DeleteBackupPlanAssociationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest 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.backupdr.v1beta.DeleteBackupPlanAssociationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DeleteBackupPlanAssociationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for deleting a backup plan association.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanAssociationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest.class, + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + autoProtectionPolicyBinding_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest build() { + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest buildPartial() { + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest result = + new com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.autoProtectionPolicyBinding_ = autoProtectionPolicyBinding_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getAutoProtectionPolicyBinding().isEmpty()) { + autoProtectionPolicyBinding_ = other.autoProtectionPolicyBinding_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + autoProtectionPolicyBinding_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object autoProtectionPolicyBinding_ = ""; + + /** + * + * + *
+     * Optional. This field is exclusively used by Backup and DR's auto-protection
+     * feature. The resource name of the `AutoProtectionPolicyBinding` that
+     * triggered the deletion of this association.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + public java.lang.String getAutoProtectionPolicyBinding() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + autoProtectionPolicyBinding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. This field is exclusively used by Backup and DR's auto-protection
+     * feature. The resource name of the `AutoProtectionPolicyBinding` that
+     * triggered the deletion of this association.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + public com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. This field is exclusively used by Backup and DR's auto-protection
+     * feature. The resource name of the `AutoProtectionPolicyBinding` that
+     * triggered the deletion of this association.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The autoProtectionPolicyBinding to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyBinding(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionPolicyBinding_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This field is exclusively used by Backup and DR's auto-protection
+     * feature. The resource name of the `AutoProtectionPolicyBinding` that
+     * triggered the deletion of this association.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAutoProtectionPolicyBinding() { + autoProtectionPolicyBinding_ = getDefaultInstance().getAutoProtectionPolicyBinding(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This field is exclusively used by Backup and DR's auto-protection
+     * feature. The resource name of the `AutoProtectionPolicyBinding` that
+     * triggered the deletion of this association.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for autoProtectionPolicyBinding to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyBindingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + autoProtectionPolicyBinding_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) + private static final com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest(); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBackupPlanAssociationRequest 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.backupdr.v1beta.DeleteBackupPlanAssociationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanAssociationRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanAssociationRequestOrBuilder.java new file mode 100644 index 000000000000..b09228e674e9 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanAssociationRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DeleteBackupPlanAssociationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. This field is exclusively used by Backup and DR's auto-protection
+   * feature. The resource name of the `AutoProtectionPolicyBinding` that
+   * triggered the deletion of this association.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + java.lang.String getAutoProtectionPolicyBinding(); + + /** + * + * + *
+   * Optional. This field is exclusively used by Backup and DR's auto-protection
+   * feature. The resource name of the `AutoProtectionPolicyBinding` that
+   * triggered the deletion of this association.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanRequest.java new file mode 100644 index 000000000000..8a400b54493e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanRequest.java @@ -0,0 +1,912 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The request message for deleting a `BackupPlan`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteBackupPlanRequest} + */ +@com.google.protobuf.Generated +public final class DeleteBackupPlanRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) + DeleteBackupPlanRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteBackupPlanRequest"); + } + + // Use DeleteBackupPlanRequest.newBuilder() to construct. + private DeleteBackupPlanRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteBackupPlanRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.class, + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the `BackupPlan` to delete.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * 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 resource name of the `BackupPlan` to delete.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + 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.backupdr.v1beta.DeleteBackupPlanRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest other = + (com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest 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.backupdr.v1beta.DeleteBackupPlanRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest 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.backupdr.v1beta.DeleteBackupPlanRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DeleteBackupPlanRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request message for deleting a `BackupPlan`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteBackupPlanRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.class, + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupPlanRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest build() { + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest buildPartial() { + com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest result = + new com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest other) { + if (other == com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + 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 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the `BackupPlan` to delete.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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 resource name of the `BackupPlan` to delete.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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 resource name of the `BackupPlan` to delete.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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 resource name of the `BackupPlan` to delete.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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 resource name of the `BackupPlan` to delete.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) + private static final com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest(); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteBackupPlanRequest 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.backupdr.v1beta.DeleteBackupPlanRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanRequestOrBuilder.java new file mode 100644 index 000000000000..f6ddf6dbb45a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupPlanRequestOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DeleteBackupPlanRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DeleteBackupPlanRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the `BackupPlan` to delete.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the `BackupPlan` to delete.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupRequest.java new file mode 100644 index 000000000000..c10974723e1c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupRequest.java @@ -0,0 +1,897 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Message for deleting a Backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteBackupRequest} + */ +@com.google.protobuf.Generated +public final class DeleteBackupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DeleteBackupRequest) + DeleteBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteBackupRequest"); + } + + // Use DeleteBackupRequest.newBuilder() to construct. + private DeleteBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteBackupRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteBackupRequest.class, + com.google.cloud.backupdr.v1beta.DeleteBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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. Name of the resource.
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + 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.backupdr.v1beta.DeleteBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DeleteBackupRequest other = + (com.google.cloud.backupdr.v1beta.DeleteBackupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.DeleteBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.DeleteBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a Backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DeleteBackupRequest) + com.google.cloud.backupdr.v1beta.DeleteBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteBackupRequest.class, + com.google.cloud.backupdr.v1beta.DeleteBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DeleteBackupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DeleteBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupRequest build() { + com.google.cloud.backupdr.v1beta.DeleteBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupRequest buildPartial() { + com.google.cloud.backupdr.v1beta.DeleteBackupRequest result = + new com.google.cloud.backupdr.v1beta.DeleteBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DeleteBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DeleteBackupRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DeleteBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DeleteBackupRequest other) { + if (other == com.google.cloud.backupdr.v1beta.DeleteBackupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + 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 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DeleteBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DeleteBackupRequest) + private static final com.google.cloud.backupdr.v1beta.DeleteBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DeleteBackupRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.DeleteBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupRequestOrBuilder.java new file mode 100644 index 000000000000..58cf8037a8c2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DeleteBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DeleteBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupVaultRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupVaultRequest.java new file mode 100644 index 000000000000..249f1f881a03 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupVaultRequest.java @@ -0,0 +1,1508 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Message for deleting a BackupVault.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteBackupVaultRequest} + */ +@com.google.protobuf.Generated +public final class DeleteBackupVaultRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) + DeleteBackupVaultRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteBackupVaultRequest"); + } + + // Use DeleteBackupVaultRequest.newBuilder() to construct. + private DeleteBackupVaultRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteBackupVaultRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.class, + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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. Name of the resource.
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 3; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, any data source from this backup vault will also
+   * be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * The current etag of the backup vault.
+   * If an etag is provided and does not match the current etag of the
+   * connection, deletion will be blocked.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * The current etag of the backup vault.
+   * If an etag is provided and does not match the current etag of the
+   * connection, deletion will be blocked.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is 'false'.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 6; + private boolean allowMissing_ = false; + + /** + * + * + *
+   * Optional. If true and the BackupVault is not found, the request will
+   * succeed but no action will be taken.
+   * 
+ * + * bool allow_missing = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int IGNORE_BACKUP_PLAN_REFERENCES_FIELD_NUMBER = 7; + private boolean ignoreBackupPlanReferences_ = false; + + /** + * + * + *
+   * Optional. If set to true, backupvault deletion will proceed even if there
+   * are backup plans referencing the backupvault. The default is 'false'.
+   * 
+ * + * bool ignore_backup_plan_references = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreBackupPlanReferences. + */ + @java.lang.Override + public boolean getIgnoreBackupPlanReferences() { + return ignoreBackupPlanReferences_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (force_ != false) { + output.writeBool(3, force_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, etag_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + if (allowMissing_ != false) { + output.writeBool(6, allowMissing_); + } + if (ignoreBackupPlanReferences_ != false) { + output.writeBool(7, ignoreBackupPlanReferences_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, etag_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, allowMissing_); + } + if (ignoreBackupPlanReferences_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, ignoreBackupPlanReferences_); + } + 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.backupdr.v1beta.DeleteBackupVaultRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest other = + (com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getForce() != other.getForce()) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getIgnoreBackupPlanReferences() != other.getIgnoreBackupPlanReferences()) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + IGNORE_BACKUP_PLAN_REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreBackupPlanReferences()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.DeleteBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.DeleteBackupVaultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a BackupVault.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteBackupVaultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.class, + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + force_ = false; + etag_ = ""; + validateOnly_ = false; + allowMissing_ = false; + ignoreBackupPlanReferences_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_DeleteBackupVaultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest build() { + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest buildPartial() { + com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest result = + new com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.force_ = force_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.allowMissing_ = allowMissing_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.ignoreBackupPlanReferences_ = ignoreBackupPlanReferences_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest other) { + if (other == com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getIgnoreBackupPlanReferences() != false) { + setIgnoreBackupPlanReferences(other.getIgnoreBackupPlanReferences()); + } + 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 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + ignoreBackupPlanReferences_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, any data source from this backup vault will also
+     * be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, any data source from this backup vault will also
+     * be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, any data source from this backup vault will also
+     * be deleted.
+     * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000004); + force_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * The current etag of the backup vault.
+     * If an etag is provided and does not match the current etag of the
+     * connection, deletion will be blocked.
+     * 
+ * + * string etag = 4; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The current etag of the backup vault.
+     * If an etag is provided and does not match the current etag of the
+     * connection, deletion will be blocked.
+     * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The current etag of the backup vault.
+     * If an etag is provided and does not match the current etag of the
+     * connection, deletion will be blocked.
+     * 
+ * + * string etag = 4; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The current etag of the backup vault.
+     * If an etag is provided and does not match the current etag of the
+     * connection, deletion will be blocked.
+     * 
+ * + * string etag = 4; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The current etag of the backup vault.
+     * If an etag is provided and does not match the current etag of the
+     * connection, deletion will be blocked.
+     * 
+ * + * string etag = 4; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean allowMissing_; + + /** + * + * + *
+     * Optional. If true and the BackupVault is not found, the request will
+     * succeed but no action will be taken.
+     * 
+ * + * bool allow_missing = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + /** + * + * + *
+     * Optional. If true and the BackupVault is not found, the request will
+     * succeed but no action will be taken.
+     * 
+ * + * bool allow_missing = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true and the BackupVault is not found, the request will
+     * succeed but no action will be taken.
+     * 
+ * + * bool allow_missing = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000020); + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean ignoreBackupPlanReferences_; + + /** + * + * + *
+     * Optional. If set to true, backupvault deletion will proceed even if there
+     * are backup plans referencing the backupvault. The default is 'false'.
+     * 
+ * + * bool ignore_backup_plan_references = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ignoreBackupPlanReferences. + */ + @java.lang.Override + public boolean getIgnoreBackupPlanReferences() { + return ignoreBackupPlanReferences_; + } + + /** + * + * + *
+     * Optional. If set to true, backupvault deletion will proceed even if there
+     * are backup plans referencing the backupvault. The default is 'false'.
+     * 
+ * + * bool ignore_backup_plan_references = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The ignoreBackupPlanReferences to set. + * @return This builder for chaining. + */ + public Builder setIgnoreBackupPlanReferences(boolean value) { + + ignoreBackupPlanReferences_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, backupvault deletion will proceed even if there
+     * are backup plans referencing the backupvault. The default is 'false'.
+     * 
+ * + * bool ignore_backup_plan_references = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIgnoreBackupPlanReferences() { + bitField0_ = (bitField0_ & ~0x00000040); + ignoreBackupPlanReferences_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) + private static final com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.DeleteBackupVaultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupVaultRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupVaultRequestOrBuilder.java new file mode 100644 index 000000000000..ea2436b336b1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteBackupVaultRequestOrBuilder.java @@ -0,0 +1,198 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DeleteBackupVaultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DeleteBackupVaultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, any data source from this backup vault will also
+   * be deleted.
+   * 
+ * + * bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); + + /** + * + * + *
+   * The current etag of the backup vault.
+   * If an etag is provided and does not match the current etag of the
+   * connection, deletion will be blocked.
+   * 
+ * + * string etag = 4; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * The current etag of the backup vault.
+   * If an etag is provided and does not match the current etag of the
+   * connection, deletion will be blocked.
+   * 
+ * + * string etag = 4; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is 'false'.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. If true and the BackupVault is not found, the request will
+   * succeed but no action will be taken.
+   * 
+ * + * bool allow_missing = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set to true, backupvault deletion will proceed even if there
+   * are backup plans referencing the backupvault. The default is 'false'.
+   * 
+ * + * bool ignore_backup_plan_references = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreBackupPlanReferences. + */ + boolean getIgnoreBackupPlanReferences(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteManagementServerRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteManagementServerRequest.java new file mode 100644 index 000000000000..0cf549981804 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteManagementServerRequest.java @@ -0,0 +1,890 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for deleting a management server instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteManagementServerRequest} + */ +@com.google.protobuf.Generated +public final class DeleteManagementServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DeleteManagementServerRequest) + DeleteManagementServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteManagementServerRequest"); + } + + // Use DeleteManagementServerRequest.newBuilder() to construct. + private DeleteManagementServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteManagementServerRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_DeleteManagementServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_DeleteManagementServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest.class, + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * 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. Name of the resource
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + 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.backupdr.v1beta.DeleteManagementServerRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest other = + (com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest 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.backupdr.v1beta.DeleteManagementServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest 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.backupdr.v1beta.DeleteManagementServerRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DeleteManagementServerRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for deleting a management server instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DeleteManagementServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DeleteManagementServerRequest) + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_DeleteManagementServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_DeleteManagementServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest.class, + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_DeleteManagementServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest build() { + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest buildPartial() { + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest result = + new com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + 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 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DeleteManagementServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DeleteManagementServerRequest) + private static final com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest(); + } + + public static com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteManagementServerRequest 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.backupdr.v1beta.DeleteManagementServerRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteManagementServerRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteManagementServerRequestOrBuilder.java new file mode 100644 index 000000000000..c5b738eec743 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DeleteManagementServerRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DeleteManagementServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DeleteManagementServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPlanProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPlanProperties.java new file mode 100644 index 000000000000..ae8fe6760e9c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPlanProperties.java @@ -0,0 +1,512 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Properties for a disk backup plan.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskBackupPlanProperties} + */ +@com.google.protobuf.Generated +public final class DiskBackupPlanProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DiskBackupPlanProperties) + DiskBackupPlanPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskBackupPlanProperties"); + } + + // Use DiskBackupPlanProperties.newBuilder() to construct. + private DiskBackupPlanProperties(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DiskBackupPlanProperties() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupPlanProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupPlanProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.class, + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.Builder.class); + } + + public static final int GUEST_FLUSH_FIELD_NUMBER = 1; + private boolean guestFlush_ = false; + + /** + * + * + *
+   * Optional. Indicates whether to perform a guest flush operation before
+   * taking a disk backup. When set to false, the system will create
+   * crash-consistent backups. Default value is false.
+   * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + @java.lang.Override + public boolean getGuestFlush() { + return guestFlush_; + } + + 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 (guestFlush_ != false) { + output.writeBool(1, guestFlush_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (guestFlush_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, guestFlush_); + } + 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.backupdr.v1beta.DiskBackupPlanProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties other = + (com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) obj; + + if (getGuestFlush() != other.getGuestFlush()) 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) + GUEST_FLUSH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGuestFlush()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties 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.backupdr.v1beta.DiskBackupPlanProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties 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.backupdr.v1beta.DiskBackupPlanProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DiskBackupPlanProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Properties for a disk backup plan.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskBackupPlanProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DiskBackupPlanProperties) + com.google.cloud.backupdr.v1beta.DiskBackupPlanPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupPlanProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupPlanProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.class, + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + guestFlush_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupPlanProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties build() { + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties buildPartial() { + com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties result = + new com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.guestFlush_ = guestFlush_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties other) { + if (other == com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties.getDefaultInstance()) + return this; + if (other.getGuestFlush() != false) { + setGuestFlush(other.getGuestFlush()); + } + 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 8: + { + guestFlush_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 boolean guestFlush_; + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a disk backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + @java.lang.Override + public boolean getGuestFlush() { + return guestFlush_; + } + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a disk backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The guestFlush to set. + * @return This builder for chaining. + */ + public Builder setGuestFlush(boolean value) { + + guestFlush_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates whether to perform a guest flush operation before
+     * taking a disk backup. When set to false, the system will create
+     * crash-consistent backups. Default value is false.
+     * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGuestFlush() { + bitField0_ = (bitField0_ & ~0x00000001); + guestFlush_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DiskBackupPlanProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DiskBackupPlanProperties) + private static final com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties(); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupPlanProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskBackupPlanProperties 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.backupdr.v1beta.DiskBackupPlanProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPlanPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPlanPropertiesOrBuilder.java new file mode 100644 index 000000000000..995a677993c6 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPlanPropertiesOrBuilder.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DiskBackupPlanPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DiskBackupPlanProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Indicates whether to perform a guest flush operation before
+   * taking a disk backup. When set to false, the system will create
+   * crash-consistent backups. Default value is false.
+   * 
+ * + * bool guest_flush = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + boolean getGuestFlush(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupProperties.java new file mode 100644 index 000000000000..128e6fafe93b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupProperties.java @@ -0,0 +1,4658 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * DiskBackupProperties represents the properties of a Disk backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskBackupProperties} + */ +@com.google.protobuf.Generated +public final class DiskBackupProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DiskBackupProperties) + DiskBackupPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskBackupProperties"); + } + + // Use DiskBackupProperties.newBuilder() to construct. + private DiskBackupProperties(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DiskBackupProperties() { + description_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + guestOsFeature_ = java.util.Collections.emptyList(); + architecture_ = 0; + type_ = ""; + region_ = ""; + zone_ = ""; + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + sourceDisk_ = ""; + accessMode_ = ""; + storagePool_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 17: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskBackupProperties.class, + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Builder.class); + } + + /** + * + * + *
+   * Architecture of the source disk.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture} + */ + public enum Architecture implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ARCHITECTURE_UNSPECIFIED = 0; + */ + ARCHITECTURE_UNSPECIFIED(0), + /** + * + * + *
+     * Disks with architecture X86_64
+     * 
+ * + * X86_64 = 1; + */ + X86_64(1), + /** + * + * + *
+     * Disks with architecture ARM64
+     * 
+ * + * ARM64 = 2; + */ + ARM64(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Architecture"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ARCHITECTURE_UNSPECIFIED = 0; + */ + public static final int ARCHITECTURE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Disks with architecture X86_64
+     * 
+ * + * X86_64 = 1; + */ + public static final int X86_64_VALUE = 1; + + /** + * + * + *
+     * Disks with architecture ARM64
+     * 
+ * + * ARM64 = 2; + */ + public static final int ARM64_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 Architecture 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 Architecture forNumber(int value) { + switch (value) { + case 0: + return ARCHITECTURE_UNSPECIFIED; + case 1: + return X86_64; + case 2: + return ARM64; + 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 Architecture findValueByNumber(int number) { + return Architecture.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Architecture[] VALUES = values(); + + public static Architecture 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 Architecture(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture) + } + + private int bitField0_; + public static final int DESCRIPTION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * A description of the source disk.
+   * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * A description of the source disk.
+   * 
+ * + * optional string description = 1; + * + * @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 source disk.
+   * 
+ * + * optional string description = 1; + * + * @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 LICENSES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList licenses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * A list of publicly available licenses that are applicable to this backup.
+   * This is applicable if the original image had licenses attached, e.g.
+   * Windows image.
+   * 
+ * + * repeated string licenses = 2; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_; + } + + /** + * + * + *
+   * A list of publicly available licenses that are applicable to this backup.
+   * This is applicable if the original image had licenses attached, e.g.
+   * Windows image.
+   * 
+ * + * repeated string licenses = 2; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + + /** + * + * + *
+   * A list of publicly available licenses that are applicable to this backup.
+   * This is applicable if the original image had licenses attached, e.g.
+   * Windows image.
+   * 
+ * + * repeated string licenses = 2; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + + /** + * + * + *
+   * A list of publicly available licenses that are applicable to this backup.
+   * This is applicable if the original image had licenses attached, e.g.
+   * Windows image.
+   * 
+ * + * repeated string licenses = 2; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + + public static final int GUEST_OS_FEATURE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List guestOsFeature_; + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + @java.lang.Override + public java.util.List getGuestOsFeatureList() { + return guestOsFeature_; + } + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + @java.lang.Override + public java.util.List + getGuestOsFeatureOrBuilderList() { + return guestOsFeature_; + } + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + @java.lang.Override + public int getGuestOsFeatureCount() { + return guestOsFeature_.size(); + } + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index) { + return guestOsFeature_.get(index); + } + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder( + int index) { + return guestOsFeature_.get(index); + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 4; + private int architecture_ = 0; + + /** + * + * + *
+   * The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return Whether the architecture field is set. + */ + @java.lang.Override + public boolean hasArchitecture() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override + public int getArchitectureValue() { + return architecture_; + } + + /** + * + * + *
+   * The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return The architecture. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture getArchitecture() { + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture result = + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture.forNumber(architecture_); + return result == null + ? com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture.UNRECOGNIZED + : result; + } + + public static final int TYPE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * The URL of the type of the disk.
+   * 
+ * + * optional string type = 5; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * The URL of the type of the disk.
+   * 
+ * + * optional string type = 5; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * The URL of the type of the disk.
+   * 
+ * + * optional string type = 5; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_GB_FIELD_NUMBER = 6; + private long sizeGb_ = 0L; + + /** + * + * + *
+   * Size(in GB) of the source disk.
+   * 
+ * + * optional int64 size_gb = 6; + * + * @return Whether the sizeGb field is set. + */ + @java.lang.Override + public boolean hasSizeGb() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Size(in GB) of the source disk.
+   * 
+ * + * optional int64 size_gb = 6; + * + * @return The sizeGb. + */ + @java.lang.Override + public long getSizeGb() { + return sizeGb_; + } + + public static final int REGION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + + /** + * + * + *
+   * Region and zone are mutually exclusive fields.
+   * The URL of the region of the source disk.
+   * 
+ * + * optional string region = 7; + * + * @return Whether the region field is set. + */ + @java.lang.Override + public boolean hasRegion() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Region and zone are mutually exclusive fields.
+   * The URL of the region of the source disk.
+   * 
+ * + * optional string region = 7; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + + /** + * + * + *
+   * Region and zone are mutually exclusive fields.
+   * The URL of the region of the source disk.
+   * 
+ * + * optional string region = 7; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + + /** + * + * + *
+   * The URL of the Zone where the source disk.
+   * 
+ * + * optional string zone = 8; + * + * @return Whether the zone field is set. + */ + @java.lang.Override + public boolean hasZone() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * The URL of the Zone where the source disk.
+   * 
+ * + * optional string zone = 8; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + 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(); + zone_ = s; + return s; + } + } + + /** + * + * + *
+   * The URL of the Zone where the source disk.
+   * 
+ * + * optional string zone = 8; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLICA_ZONES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList replicaZones_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The URL of the Zones where the source disk should be replicated.
+   * 
+ * + * repeated string replica_zones = 9; + * + * @return A list containing the replicaZones. + */ + public com.google.protobuf.ProtocolStringList getReplicaZonesList() { + return replicaZones_; + } + + /** + * + * + *
+   * The URL of the Zones where the source disk should be replicated.
+   * 
+ * + * repeated string replica_zones = 9; + * + * @return The count of replicaZones. + */ + public int getReplicaZonesCount() { + return replicaZones_.size(); + } + + /** + * + * + *
+   * The URL of the Zones where the source disk should be replicated.
+   * 
+ * + * repeated string replica_zones = 9; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + public java.lang.String getReplicaZones(int index) { + return replicaZones_.get(index); + } + + /** + * + * + *
+   * The URL of the Zones where the source disk should be replicated.
+   * 
+ * + * repeated string replica_zones = 9; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + public com.google.protobuf.ByteString getReplicaZonesBytes(int index) { + return replicaZones_.getByteString(index); + } + + public static final int SOURCE_DISK_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceDisk_ = ""; + + /** + * + * + *
+   * The source disk used to create this backup.
+   * 
+ * + * optional string source_disk = 10; + * + * @return Whether the sourceDisk field is set. + */ + @java.lang.Override + public boolean hasSourceDisk() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * The source disk used to create this backup.
+   * 
+ * + * optional string source_disk = 10; + * + * @return The sourceDisk. + */ + @java.lang.Override + public java.lang.String getSourceDisk() { + java.lang.Object ref = sourceDisk_; + 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(); + sourceDisk_ = s; + return s; + } + } + + /** + * + * + *
+   * The source disk used to create this backup.
+   * 
+ * + * optional string source_disk = 10; + * + * @return The bytes for sourceDisk. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceDiskBytes() { + java.lang.Object ref = sourceDisk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceDisk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCESS_MODE_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object accessMode_ = ""; + + /** + * + * + *
+   * The access mode of the source disk.
+   * 
+ * + * optional string access_mode = 11; + * + * @return Whether the accessMode field is set. + */ + @java.lang.Override + public boolean hasAccessMode() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * The access mode of the source disk.
+   * 
+ * + * optional string access_mode = 11; + * + * @return The accessMode. + */ + @java.lang.Override + public java.lang.String getAccessMode() { + java.lang.Object ref = accessMode_; + 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(); + accessMode_ = s; + return s; + } + } + + /** + * + * + *
+   * The access mode of the source disk.
+   * 
+ * + * optional string access_mode = 11; + * + * @return The bytes for accessMode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccessModeBytes() { + java.lang.Object ref = accessMode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessMode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVISIONED_IOPS_FIELD_NUMBER = 12; + private long provisionedIops_ = 0L; + + /** + * + * + *
+   * The number of IOPS provisioned for the source disk.
+   * 
+ * + * optional int64 provisioned_iops = 12; + * + * @return Whether the provisionedIops field is set. + */ + @java.lang.Override + public boolean hasProvisionedIops() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * The number of IOPS provisioned for the source disk.
+   * 
+ * + * optional int64 provisioned_iops = 12; + * + * @return The provisionedIops. + */ + @java.lang.Override + public long getProvisionedIops() { + return provisionedIops_; + } + + public static final int PROVISIONED_THROUGHPUT_FIELD_NUMBER = 13; + private long provisionedThroughput_ = 0L; + + /** + * + * + *
+   * The number of throughput provisioned for the source disk.
+   * 
+ * + * optional int64 provisioned_throughput = 13; + * + * @return Whether the provisionedThroughput field is set. + */ + @java.lang.Override + public boolean hasProvisionedThroughput() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * The number of throughput provisioned for the source disk.
+   * 
+ * + * optional int64 provisioned_throughput = 13; + * + * @return The provisionedThroughput. + */ + @java.lang.Override + public long getProvisionedThroughput() { + return provisionedThroughput_; + } + + public static final int PHYSICAL_BLOCK_SIZE_BYTES_FIELD_NUMBER = 14; + private long physicalBlockSizeBytes_ = 0L; + + /** + * + * + *
+   * The physical block size of the source disk.
+   * 
+ * + * optional int64 physical_block_size_bytes = 14; + * + * @return Whether the physicalBlockSizeBytes field is set. + */ + @java.lang.Override + public boolean hasPhysicalBlockSizeBytes() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+   * The physical block size of the source disk.
+   * 
+ * + * optional int64 physical_block_size_bytes = 14; + * + * @return The physicalBlockSizeBytes. + */ + @java.lang.Override + public long getPhysicalBlockSizeBytes() { + return physicalBlockSizeBytes_; + } + + public static final int ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER = 15; + private boolean enableConfidentialCompute_ = false; + + /** + * + * + *
+   * Indicates whether the source disk is using confidential compute mode.
+   * 
+ * + * optional bool enable_confidential_compute = 15; + * + * @return Whether the enableConfidentialCompute field is set. + */ + @java.lang.Override + public boolean hasEnableConfidentialCompute() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+   * Indicates whether the source disk is using confidential compute mode.
+   * 
+ * + * optional bool enable_confidential_compute = 15; + * + * @return The enableConfidentialCompute. + */ + @java.lang.Override + public boolean getEnableConfidentialCompute() { + return enableConfidentialCompute_; + } + + public static final int STORAGE_POOL_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private volatile java.lang.Object storagePool_ = ""; + + /** + * + * + *
+   * The storage pool of the source disk.
+   * 
+ * + * optional string storage_pool = 16; + * + * @return Whether the storagePool field is set. + */ + @java.lang.Override + public boolean hasStoragePool() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+   * The storage pool of the source disk.
+   * 
+ * + * optional string storage_pool = 16; + * + * @return The storagePool. + */ + @java.lang.Override + public java.lang.String getStoragePool() { + java.lang.Object ref = storagePool_; + 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(); + storagePool_ = s; + return s; + } + } + + /** + * + * + *
+   * The storage pool of the source disk.
+   * 
+ * + * optional string storage_pool = 16; + * + * @return The bytes for storagePool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStoragePoolBytes() { + java.lang.Object ref = storagePool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storagePool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 17; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupProperties_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(); + } + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + @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(); + } + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + @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; + } + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + @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 GUEST_FLUSH_FIELD_NUMBER = 18; + private boolean guestFlush_ = false; + + /** + * + * + *
+   * Optional. Defines if the guest flush is enabled for the source disk.
+   * Default value is false.
+   * 
+ * + * bool guest_flush = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + @java.lang.Override + public boolean getGuestFlush() { + return guestFlush_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, description_); + } + for (int i = 0; i < licenses_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, licenses_.getRaw(i)); + } + for (int i = 0; i < guestOsFeature_.size(); i++) { + output.writeMessage(3, guestOsFeature_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeEnum(4, architecture_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, type_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt64(6, sizeGb_); + } + if (((bitField0_ & 0x00000010) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, region_); + } + if (((bitField0_ & 0x00000020) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, zone_); + } + for (int i = 0; i < replicaZones_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, replicaZones_.getRaw(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, sourceDisk_); + } + if (((bitField0_ & 0x00000080) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, accessMode_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeInt64(12, provisionedIops_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeInt64(13, provisionedThroughput_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeInt64(14, physicalBlockSizeBytes_); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeBool(15, enableConfidentialCompute_); + } + if (((bitField0_ & 0x00001000) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 16, storagePool_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 17); + if (guestFlush_ != false) { + output.writeBool(18, guestFlush_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_); + } + { + int dataSize = 0; + for (int i = 0; i < licenses_.size(); i++) { + dataSize += computeStringSizeNoTag(licenses_.getRaw(i)); + } + size += dataSize; + size += 1 * getLicensesList().size(); + } + for (int i = 0; i < guestOsFeature_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, guestOsFeature_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, architecture_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, type_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, sizeGb_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, region_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, zone_); + } + { + int dataSize = 0; + for (int i = 0; i < replicaZones_.size(); i++) { + dataSize += computeStringSizeNoTag(replicaZones_.getRaw(i)); + } + size += dataSize; + size += 1 * getReplicaZonesList().size(); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, sourceDisk_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, accessMode_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(12, provisionedIops_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(13, provisionedThroughput_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, physicalBlockSizeBytes_); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, enableConfidentialCompute_); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(16, storagePool_); + } + 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(17, labels__); + } + if (guestFlush_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(18, guestFlush_); + } + 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.backupdr.v1beta.DiskBackupProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DiskBackupProperties other = + (com.google.cloud.backupdr.v1beta.DiskBackupProperties) obj; + + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription().equals(other.getDescription())) return false; + } + if (!getLicensesList().equals(other.getLicensesList())) return false; + if (!getGuestOsFeatureList().equals(other.getGuestOsFeatureList())) return false; + if (hasArchitecture() != other.hasArchitecture()) return false; + if (hasArchitecture()) { + if (architecture_ != other.architecture_) return false; + } + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (hasSizeGb() != other.hasSizeGb()) return false; + if (hasSizeGb()) { + if (getSizeGb() != other.getSizeGb()) return false; + } + if (hasRegion() != other.hasRegion()) return false; + if (hasRegion()) { + if (!getRegion().equals(other.getRegion())) return false; + } + if (hasZone() != other.hasZone()) return false; + if (hasZone()) { + if (!getZone().equals(other.getZone())) return false; + } + if (!getReplicaZonesList().equals(other.getReplicaZonesList())) return false; + if (hasSourceDisk() != other.hasSourceDisk()) return false; + if (hasSourceDisk()) { + if (!getSourceDisk().equals(other.getSourceDisk())) return false; + } + if (hasAccessMode() != other.hasAccessMode()) return false; + if (hasAccessMode()) { + if (!getAccessMode().equals(other.getAccessMode())) return false; + } + if (hasProvisionedIops() != other.hasProvisionedIops()) return false; + if (hasProvisionedIops()) { + if (getProvisionedIops() != other.getProvisionedIops()) return false; + } + if (hasProvisionedThroughput() != other.hasProvisionedThroughput()) return false; + if (hasProvisionedThroughput()) { + if (getProvisionedThroughput() != other.getProvisionedThroughput()) return false; + } + if (hasPhysicalBlockSizeBytes() != other.hasPhysicalBlockSizeBytes()) return false; + if (hasPhysicalBlockSizeBytes()) { + if (getPhysicalBlockSizeBytes() != other.getPhysicalBlockSizeBytes()) return false; + } + if (hasEnableConfidentialCompute() != other.hasEnableConfidentialCompute()) return false; + if (hasEnableConfidentialCompute()) { + if (getEnableConfidentialCompute() != other.getEnableConfidentialCompute()) return false; + } + if (hasStoragePool() != other.hasStoragePool()) return false; + if (hasStoragePool()) { + if (!getStoragePool().equals(other.getStoragePool())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getGuestFlush() != other.getGuestFlush()) 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 (hasDescription()) { + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + } + if (getLicensesCount() > 0) { + hash = (37 * hash) + LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getLicensesList().hashCode(); + } + if (getGuestOsFeatureCount() > 0) { + hash = (37 * hash) + GUEST_OS_FEATURE_FIELD_NUMBER; + hash = (53 * hash) + getGuestOsFeatureList().hashCode(); + } + if (hasArchitecture()) { + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + architecture_; + } + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + if (hasSizeGb()) { + hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeGb()); + } + if (hasRegion()) { + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + } + if (hasZone()) { + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + } + if (getReplicaZonesCount() > 0) { + hash = (37 * hash) + REPLICA_ZONES_FIELD_NUMBER; + hash = (53 * hash) + getReplicaZonesList().hashCode(); + } + if (hasSourceDisk()) { + hash = (37 * hash) + SOURCE_DISK_FIELD_NUMBER; + hash = (53 * hash) + getSourceDisk().hashCode(); + } + if (hasAccessMode()) { + hash = (37 * hash) + ACCESS_MODE_FIELD_NUMBER; + hash = (53 * hash) + getAccessMode().hashCode(); + } + if (hasProvisionedIops()) { + hash = (37 * hash) + PROVISIONED_IOPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProvisionedIops()); + } + if (hasProvisionedThroughput()) { + hash = (37 * hash) + PROVISIONED_THROUGHPUT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProvisionedThroughput()); + } + if (hasPhysicalBlockSizeBytes()) { + hash = (37 * hash) + PHYSICAL_BLOCK_SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPhysicalBlockSizeBytes()); + } + if (hasEnableConfidentialCompute()) { + hash = (37 * hash) + ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableConfidentialCompute()); + } + if (hasStoragePool()) { + hash = (37 * hash) + STORAGE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getStoragePool().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + GUEST_FLUSH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGuestFlush()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties 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.backupdr.v1beta.DiskBackupProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties 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.backupdr.v1beta.DiskBackupProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DiskBackupProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * DiskBackupProperties represents the properties of a Disk backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskBackupProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DiskBackupProperties) + com.google.cloud.backupdr.v1beta.DiskBackupPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 17: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 17: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskBackupProperties.class, + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DiskBackupProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + description_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (guestOsFeatureBuilder_ == null) { + guestOsFeature_ = java.util.Collections.emptyList(); + } else { + guestOsFeature_ = null; + guestOsFeatureBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + architecture_ = 0; + type_ = ""; + sizeGb_ = 0L; + region_ = ""; + zone_ = ""; + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + sourceDisk_ = ""; + accessMode_ = ""; + provisionedIops_ = 0L; + provisionedThroughput_ = 0L; + physicalBlockSizeBytes_ = 0L; + enableConfidentialCompute_ = false; + storagePool_ = ""; + internalGetMutableLabels().clear(); + guestFlush_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskBackupProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupProperties getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupProperties build() { + com.google.cloud.backupdr.v1beta.DiskBackupProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupProperties buildPartial() { + com.google.cloud.backupdr.v1beta.DiskBackupProperties result = + new com.google.cloud.backupdr.v1beta.DiskBackupProperties(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.DiskBackupProperties result) { + if (guestOsFeatureBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + guestOsFeature_ = java.util.Collections.unmodifiableList(guestOsFeature_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.guestOsFeature_ = guestOsFeature_; + } else { + result.guestOsFeature_ = guestOsFeatureBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DiskBackupProperties result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.description_ = description_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + licenses_.makeImmutable(); + result.licenses_ = licenses_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.architecture_ = architecture_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sizeGb_ = sizeGb_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.region_ = region_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.zone_ = zone_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + replicaZones_.makeImmutable(); + result.replicaZones_ = replicaZones_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.sourceDisk_ = sourceDisk_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.accessMode_ = accessMode_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.provisionedIops_ = provisionedIops_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.provisionedThroughput_ = provisionedThroughput_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.physicalBlockSizeBytes_ = physicalBlockSizeBytes_; + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.enableConfidentialCompute_ = enableConfidentialCompute_; + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.storagePool_ = storagePool_; + to_bitField0_ |= 0x00001000; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.guestFlush_ = guestFlush_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DiskBackupProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DiskBackupProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DiskBackupProperties other) { + if (other == com.google.cloud.backupdr.v1beta.DiskBackupProperties.getDefaultInstance()) + return this; + if (other.hasDescription()) { + description_ = other.description_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.licenses_.isEmpty()) { + if (licenses_.isEmpty()) { + licenses_ = other.licenses_; + bitField0_ |= 0x00000002; + } else { + ensureLicensesIsMutable(); + licenses_.addAll(other.licenses_); + } + onChanged(); + } + if (guestOsFeatureBuilder_ == null) { + if (!other.guestOsFeature_.isEmpty()) { + if (guestOsFeature_.isEmpty()) { + guestOsFeature_ = other.guestOsFeature_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.addAll(other.guestOsFeature_); + } + onChanged(); + } + } else { + if (!other.guestOsFeature_.isEmpty()) { + if (guestOsFeatureBuilder_.isEmpty()) { + guestOsFeatureBuilder_.dispose(); + guestOsFeatureBuilder_ = null; + guestOsFeature_ = other.guestOsFeature_; + bitField0_ = (bitField0_ & ~0x00000004); + guestOsFeatureBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGuestOsFeatureFieldBuilder() + : null; + } else { + guestOsFeatureBuilder_.addAllMessages(other.guestOsFeature_); + } + } + } + if (other.hasArchitecture()) { + setArchitectureValue(other.getArchitectureValue()); + } + if (other.hasType()) { + type_ = other.type_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasSizeGb()) { + setSizeGb(other.getSizeGb()); + } + if (other.hasRegion()) { + region_ = other.region_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasZone()) { + zone_ = other.zone_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.replicaZones_.isEmpty()) { + if (replicaZones_.isEmpty()) { + replicaZones_ = other.replicaZones_; + bitField0_ |= 0x00000100; + } else { + ensureReplicaZonesIsMutable(); + replicaZones_.addAll(other.replicaZones_); + } + onChanged(); + } + if (other.hasSourceDisk()) { + sourceDisk_ = other.sourceDisk_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.hasAccessMode()) { + accessMode_ = other.accessMode_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.hasProvisionedIops()) { + setProvisionedIops(other.getProvisionedIops()); + } + if (other.hasProvisionedThroughput()) { + setProvisionedThroughput(other.getProvisionedThroughput()); + } + if (other.hasPhysicalBlockSizeBytes()) { + setPhysicalBlockSizeBytes(other.getPhysicalBlockSizeBytes()); + } + if (other.hasEnableConfidentialCompute()) { + setEnableConfidentialCompute(other.getEnableConfidentialCompute()); + } + if (other.hasStoragePool()) { + storagePool_ = other.storagePool_; + bitField0_ |= 0x00008000; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00010000; + if (other.getGuestFlush() != false) { + setGuestFlush(other.getGuestFlush()); + } + 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: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case 18 + case 26: + { + com.google.cloud.backupdr.v1beta.GuestOsFeature m = + input.readMessage( + com.google.cloud.backupdr.v1beta.GuestOsFeature.parser(), + extensionRegistry); + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(m); + } else { + guestOsFeatureBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: + { + architecture_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + sizeGb_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReplicaZonesIsMutable(); + replicaZones_.add(s); + break; + } // case 74 + case 82: + { + sourceDisk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + accessMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: + { + provisionedIops_ = input.readInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: + { + provisionedThroughput_ = input.readInt64(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 112: + { + physicalBlockSizeBytes_ = input.readInt64(); + bitField0_ |= 0x00002000; + break; + } // case 112 + case 120: + { + enableConfidentialCompute_ = input.readBool(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 130: + { + storagePool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 144: + { + guestFlush_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 144 + 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 description_ = ""; + + /** + * + * + *
+     * A description of the source disk.
+     * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * A description of the source disk.
+     * 
+ * + * optional string description = 1; + * + * @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 source disk.
+     * 
+ * + * optional string description = 1; + * + * @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 source disk.
+     * 
+ * + * optional string description = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * A description of the source disk.
+     * 
+ * + * optional string description = 1; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * A description of the source disk.
+     * 
+ * + * optional string description = 1; + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList licenses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLicensesIsMutable() { + if (!licenses_.isModifiable()) { + licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + licenses_.makeImmutable(); + return licenses_; + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @param index The index to set the value at. + * @param value The licenses to set. + * @return This builder for chaining. + */ + public Builder setLicenses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @param value The licenses to add. + * @return This builder for chaining. + */ + public Builder addLicenses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @param values The licenses to add. + * @return This builder for chaining. + */ + public Builder addAllLicenses(java.lang.Iterable values) { + ensureLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenses_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @return This builder for chaining. + */ + public Builder clearLicenses() { + licenses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of publicly available licenses that are applicable to this backup.
+     * This is applicable if the original image had licenses attached, e.g.
+     * Windows image.
+     * 
+ * + * repeated string licenses = 2; + * + * @param value The bytes of the licenses to add. + * @return This builder for chaining. + */ + public Builder addLicensesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLicensesIsMutable(); + licenses_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List guestOsFeature_ = + java.util.Collections.emptyList(); + + private void ensureGuestOsFeatureIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + guestOsFeature_ = + new java.util.ArrayList( + guestOsFeature_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder> + guestOsFeatureBuilder_; + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public java.util.List getGuestOsFeatureList() { + if (guestOsFeatureBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestOsFeature_); + } else { + return guestOsFeatureBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public int getGuestOsFeatureCount() { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.size(); + } else { + return guestOsFeatureBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index) { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.get(index); + } else { + return guestOsFeatureBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder setGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.set(index, value); + onChanged(); + } else { + guestOsFeatureBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder setGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.set(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder addGuestOsFeature(com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(value); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder addGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(index, value); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder addGuestOsFeature( + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder addGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder addAllGuestOsFeature( + java.lang.Iterable values) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeature_); + onChanged(); + } else { + guestOsFeatureBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder clearGuestOsFeature() { + if (guestOsFeatureBuilder_ == null) { + guestOsFeature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + guestOsFeatureBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public Builder removeGuestOsFeature(int index) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.remove(index); + onChanged(); + } else { + guestOsFeatureBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder getGuestOsFeatureBuilder( + int index) { + return internalGetGuestOsFeatureFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder( + int index) { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.get(index); + } else { + return guestOsFeatureBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public java.util.List + getGuestOsFeatureOrBuilderList() { + if (guestOsFeatureBuilder_ != null) { + return guestOsFeatureBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestOsFeature_); + } + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder addGuestOsFeatureBuilder() { + return internalGetGuestOsFeatureFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.GuestOsFeature.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder addGuestOsFeatureBuilder( + int index) { + return internalGetGuestOsFeatureFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.GuestOsFeature.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of guest OS features that are applicable to this backup.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + public java.util.List + getGuestOsFeatureBuilderList() { + return internalGetGuestOsFeatureFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder> + internalGetGuestOsFeatureFieldBuilder() { + if (guestOsFeatureBuilder_ == null) { + guestOsFeatureBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder>( + guestOsFeature_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + guestOsFeature_ = null; + } + return guestOsFeatureBuilder_; + } + + private int architecture_ = 0; + + /** + * + * + *
+     * The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return Whether the architecture field is set. + */ + @java.lang.Override + public boolean hasArchitecture() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override + public int getArchitectureValue() { + return architecture_; + } + + /** + * + * + *
+     * The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @param value The enum numeric value on the wire for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureValue(int value) { + architecture_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return The architecture. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture getArchitecture() { + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture result = + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture.forNumber( + architecture_); + return result == null + ? com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture( + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + architecture_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00000008); + architecture_ = 0; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * The URL of the type of the disk.
+     * 
+ * + * optional string type = 5; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * The URL of the type of the disk.
+     * 
+ * + * optional string type = 5; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URL of the type of the disk.
+     * 
+ * + * optional string type = 5; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URL of the type of the disk.
+     * 
+ * + * optional string type = 5; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URL of the type of the disk.
+     * 
+ * + * optional string type = 5; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URL of the type of the disk.
+     * 
+ * + * optional string type = 5; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private long sizeGb_; + + /** + * + * + *
+     * Size(in GB) of the source disk.
+     * 
+ * + * optional int64 size_gb = 6; + * + * @return Whether the sizeGb field is set. + */ + @java.lang.Override + public boolean hasSizeGb() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Size(in GB) of the source disk.
+     * 
+ * + * optional int64 size_gb = 6; + * + * @return The sizeGb. + */ + @java.lang.Override + public long getSizeGb() { + return sizeGb_; + } + + /** + * + * + *
+     * Size(in GB) of the source disk.
+     * 
+ * + * optional int64 size_gb = 6; + * + * @param value The sizeGb to set. + * @return This builder for chaining. + */ + public Builder setSizeGb(long value) { + + sizeGb_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Size(in GB) of the source disk.
+     * 
+ * + * optional int64 size_gb = 6; + * + * @return This builder for chaining. + */ + public Builder clearSizeGb() { + bitField0_ = (bitField0_ & ~0x00000020); + sizeGb_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + + /** + * + * + *
+     * Region and zone are mutually exclusive fields.
+     * The URL of the region of the source disk.
+     * 
+ * + * optional string region = 7; + * + * @return Whether the region field is set. + */ + public boolean hasRegion() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Region and zone are mutually exclusive fields.
+     * The URL of the region of the source disk.
+     * 
+ * + * optional string region = 7; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Region and zone are mutually exclusive fields.
+     * The URL of the region of the source disk.
+     * 
+ * + * optional string region = 7; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Region and zone are mutually exclusive fields.
+     * The URL of the region of the source disk.
+     * 
+ * + * optional string region = 7; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + region_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Region and zone are mutually exclusive fields.
+     * The URL of the region of the source disk.
+     * 
+ * + * optional string region = 7; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Region and zone are mutually exclusive fields.
+     * The URL of the region of the source disk.
+     * 
+ * + * optional string region = 7; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + + /** + * + * + *
+     * The URL of the Zone where the source disk.
+     * 
+ * + * optional string zone = 8; + * + * @return Whether the zone field is set. + */ + public boolean hasZone() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * The URL of the Zone where the source disk.
+     * 
+ * + * optional string zone = 8; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URL of the Zone where the source disk.
+     * 
+ * + * optional string zone = 8; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URL of the Zone where the source disk.
+     * 
+ * + * optional string zone = 8; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URL of the Zone where the source disk.
+     * 
+ * + * optional string zone = 8; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URL of the Zone where the source disk.
+     * 
+ * + * optional string zone = 8; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList replicaZones_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReplicaZonesIsMutable() { + if (!replicaZones_.isModifiable()) { + replicaZones_ = new com.google.protobuf.LazyStringArrayList(replicaZones_); + } + bitField0_ |= 0x00000100; + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @return A list containing the replicaZones. + */ + public com.google.protobuf.ProtocolStringList getReplicaZonesList() { + replicaZones_.makeImmutable(); + return replicaZones_; + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @return The count of replicaZones. + */ + public int getReplicaZonesCount() { + return replicaZones_.size(); + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + public java.lang.String getReplicaZones(int index) { + return replicaZones_.get(index); + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + public com.google.protobuf.ByteString getReplicaZonesBytes(int index) { + return replicaZones_.getByteString(index); + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @param index The index to set the value at. + * @param value The replicaZones to set. + * @return This builder for chaining. + */ + public Builder setReplicaZones(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaZonesIsMutable(); + replicaZones_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @param value The replicaZones to add. + * @return This builder for chaining. + */ + public Builder addReplicaZones(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaZonesIsMutable(); + replicaZones_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @param values The replicaZones to add. + * @return This builder for chaining. + */ + public Builder addAllReplicaZones(java.lang.Iterable values) { + ensureReplicaZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, replicaZones_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @return This builder for chaining. + */ + public Builder clearReplicaZones() { + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URL of the Zones where the source disk should be replicated.
+     * 
+ * + * repeated string replica_zones = 9; + * + * @param value The bytes of the replicaZones to add. + * @return This builder for chaining. + */ + public Builder addReplicaZonesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReplicaZonesIsMutable(); + replicaZones_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object sourceDisk_ = ""; + + /** + * + * + *
+     * The source disk used to create this backup.
+     * 
+ * + * optional string source_disk = 10; + * + * @return Whether the sourceDisk field is set. + */ + public boolean hasSourceDisk() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * The source disk used to create this backup.
+     * 
+ * + * optional string source_disk = 10; + * + * @return The sourceDisk. + */ + public java.lang.String getSourceDisk() { + java.lang.Object ref = sourceDisk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceDisk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The source disk used to create this backup.
+     * 
+ * + * optional string source_disk = 10; + * + * @return The bytes for sourceDisk. + */ + public com.google.protobuf.ByteString getSourceDiskBytes() { + java.lang.Object ref = sourceDisk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceDisk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The source disk used to create this backup.
+     * 
+ * + * optional string source_disk = 10; + * + * @param value The sourceDisk to set. + * @return This builder for chaining. + */ + public Builder setSourceDisk(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceDisk_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * The source disk used to create this backup.
+     * 
+ * + * optional string source_disk = 10; + * + * @return This builder for chaining. + */ + public Builder clearSourceDisk() { + sourceDisk_ = getDefaultInstance().getSourceDisk(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * The source disk used to create this backup.
+     * 
+ * + * optional string source_disk = 10; + * + * @param value The bytes for sourceDisk to set. + * @return This builder for chaining. + */ + public Builder setSourceDiskBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceDisk_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object accessMode_ = ""; + + /** + * + * + *
+     * The access mode of the source disk.
+     * 
+ * + * optional string access_mode = 11; + * + * @return Whether the accessMode field is set. + */ + public boolean hasAccessMode() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * The access mode of the source disk.
+     * 
+ * + * optional string access_mode = 11; + * + * @return The accessMode. + */ + public java.lang.String getAccessMode() { + java.lang.Object ref = accessMode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessMode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The access mode of the source disk.
+     * 
+ * + * optional string access_mode = 11; + * + * @return The bytes for accessMode. + */ + public com.google.protobuf.ByteString getAccessModeBytes() { + java.lang.Object ref = accessMode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessMode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The access mode of the source disk.
+     * 
+ * + * optional string access_mode = 11; + * + * @param value The accessMode to set. + * @return This builder for chaining. + */ + public Builder setAccessMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accessMode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * The access mode of the source disk.
+     * 
+ * + * optional string access_mode = 11; + * + * @return This builder for chaining. + */ + public Builder clearAccessMode() { + accessMode_ = getDefaultInstance().getAccessMode(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * The access mode of the source disk.
+     * 
+ * + * optional string access_mode = 11; + * + * @param value The bytes for accessMode to set. + * @return This builder for chaining. + */ + public Builder setAccessModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accessMode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private long provisionedIops_; + + /** + * + * + *
+     * The number of IOPS provisioned for the source disk.
+     * 
+ * + * optional int64 provisioned_iops = 12; + * + * @return Whether the provisionedIops field is set. + */ + @java.lang.Override + public boolean hasProvisionedIops() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * The number of IOPS provisioned for the source disk.
+     * 
+ * + * optional int64 provisioned_iops = 12; + * + * @return The provisionedIops. + */ + @java.lang.Override + public long getProvisionedIops() { + return provisionedIops_; + } + + /** + * + * + *
+     * The number of IOPS provisioned for the source disk.
+     * 
+ * + * optional int64 provisioned_iops = 12; + * + * @param value The provisionedIops to set. + * @return This builder for chaining. + */ + public Builder setProvisionedIops(long value) { + + provisionedIops_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * The number of IOPS provisioned for the source disk.
+     * 
+ * + * optional int64 provisioned_iops = 12; + * + * @return This builder for chaining. + */ + public Builder clearProvisionedIops() { + bitField0_ = (bitField0_ & ~0x00000800); + provisionedIops_ = 0L; + onChanged(); + return this; + } + + private long provisionedThroughput_; + + /** + * + * + *
+     * The number of throughput provisioned for the source disk.
+     * 
+ * + * optional int64 provisioned_throughput = 13; + * + * @return Whether the provisionedThroughput field is set. + */ + @java.lang.Override + public boolean hasProvisionedThroughput() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * The number of throughput provisioned for the source disk.
+     * 
+ * + * optional int64 provisioned_throughput = 13; + * + * @return The provisionedThroughput. + */ + @java.lang.Override + public long getProvisionedThroughput() { + return provisionedThroughput_; + } + + /** + * + * + *
+     * The number of throughput provisioned for the source disk.
+     * 
+ * + * optional int64 provisioned_throughput = 13; + * + * @param value The provisionedThroughput to set. + * @return This builder for chaining. + */ + public Builder setProvisionedThroughput(long value) { + + provisionedThroughput_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * The number of throughput provisioned for the source disk.
+     * 
+ * + * optional int64 provisioned_throughput = 13; + * + * @return This builder for chaining. + */ + public Builder clearProvisionedThroughput() { + bitField0_ = (bitField0_ & ~0x00001000); + provisionedThroughput_ = 0L; + onChanged(); + return this; + } + + private long physicalBlockSizeBytes_; + + /** + * + * + *
+     * The physical block size of the source disk.
+     * 
+ * + * optional int64 physical_block_size_bytes = 14; + * + * @return Whether the physicalBlockSizeBytes field is set. + */ + @java.lang.Override + public boolean hasPhysicalBlockSizeBytes() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+     * The physical block size of the source disk.
+     * 
+ * + * optional int64 physical_block_size_bytes = 14; + * + * @return The physicalBlockSizeBytes. + */ + @java.lang.Override + public long getPhysicalBlockSizeBytes() { + return physicalBlockSizeBytes_; + } + + /** + * + * + *
+     * The physical block size of the source disk.
+     * 
+ * + * optional int64 physical_block_size_bytes = 14; + * + * @param value The physicalBlockSizeBytes to set. + * @return This builder for chaining. + */ + public Builder setPhysicalBlockSizeBytes(long value) { + + physicalBlockSizeBytes_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * The physical block size of the source disk.
+     * 
+ * + * optional int64 physical_block_size_bytes = 14; + * + * @return This builder for chaining. + */ + public Builder clearPhysicalBlockSizeBytes() { + bitField0_ = (bitField0_ & ~0x00002000); + physicalBlockSizeBytes_ = 0L; + onChanged(); + return this; + } + + private boolean enableConfidentialCompute_; + + /** + * + * + *
+     * Indicates whether the source disk is using confidential compute mode.
+     * 
+ * + * optional bool enable_confidential_compute = 15; + * + * @return Whether the enableConfidentialCompute field is set. + */ + @java.lang.Override + public boolean hasEnableConfidentialCompute() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+     * Indicates whether the source disk is using confidential compute mode.
+     * 
+ * + * optional bool enable_confidential_compute = 15; + * + * @return The enableConfidentialCompute. + */ + @java.lang.Override + public boolean getEnableConfidentialCompute() { + return enableConfidentialCompute_; + } + + /** + * + * + *
+     * Indicates whether the source disk is using confidential compute mode.
+     * 
+ * + * optional bool enable_confidential_compute = 15; + * + * @param value The enableConfidentialCompute to set. + * @return This builder for chaining. + */ + public Builder setEnableConfidentialCompute(boolean value) { + + enableConfidentialCompute_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Indicates whether the source disk is using confidential compute mode.
+     * 
+ * + * optional bool enable_confidential_compute = 15; + * + * @return This builder for chaining. + */ + public Builder clearEnableConfidentialCompute() { + bitField0_ = (bitField0_ & ~0x00004000); + enableConfidentialCompute_ = false; + onChanged(); + return this; + } + + private java.lang.Object storagePool_ = ""; + + /** + * + * + *
+     * The storage pool of the source disk.
+     * 
+ * + * optional string storage_pool = 16; + * + * @return Whether the storagePool field is set. + */ + public boolean hasStoragePool() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+     * The storage pool of the source disk.
+     * 
+ * + * optional string storage_pool = 16; + * + * @return The storagePool. + */ + public java.lang.String getStoragePool() { + java.lang.Object ref = storagePool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storagePool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The storage pool of the source disk.
+     * 
+ * + * optional string storage_pool = 16; + * + * @return The bytes for storagePool. + */ + public com.google.protobuf.ByteString getStoragePoolBytes() { + java.lang.Object ref = storagePool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storagePool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The storage pool of the source disk.
+     * 
+ * + * optional string storage_pool = 16; + * + * @param value The storagePool to set. + * @return This builder for chaining. + */ + public Builder setStoragePool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + storagePool_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * The storage pool of the source disk.
+     * 
+ * + * optional string storage_pool = 16; + * + * @return This builder for chaining. + */ + public Builder clearStoragePool() { + storagePool_ = getDefaultInstance().getStoragePool(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + + /** + * + * + *
+     * The storage pool of the source disk.
+     * 
+ * + * optional string storage_pool = 16; + * + * @param value The bytes for storagePool to set. + * @return This builder for chaining. + */ + public Builder setStoragePoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + storagePool_ = value; + bitField0_ |= 0x00008000; + 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_ |= 0x00010000; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * The labels of the source disk.
+     * 
+ * + * map<string, string> labels = 17; + */ + @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(); + } + + /** + * + * + *
+     * The labels of the source disk.
+     * 
+ * + * map<string, string> labels = 17; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * The labels of the source disk.
+     * 
+ * + * map<string, string> labels = 17; + */ + @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; + } + + /** + * + * + *
+     * The labels of the source disk.
+     * 
+ * + * map<string, string> labels = 17; + */ + @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_ & ~0x00010000); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * The labels of the source disk.
+     * 
+ * + * map<string, string> labels = 17; + */ + 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_ |= 0x00010000; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * The labels of the source disk.
+     * 
+ * + * map<string, string> labels = 17; + */ + 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_ |= 0x00010000; + return this; + } + + /** + * + * + *
+     * The labels of the source disk.
+     * 
+ * + * map<string, string> labels = 17; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00010000; + return this; + } + + private boolean guestFlush_; + + /** + * + * + *
+     * Optional. Defines if the guest flush is enabled for the source disk.
+     * Default value is false.
+     * 
+ * + * bool guest_flush = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + @java.lang.Override + public boolean getGuestFlush() { + return guestFlush_; + } + + /** + * + * + *
+     * Optional. Defines if the guest flush is enabled for the source disk.
+     * Default value is false.
+     * 
+ * + * bool guest_flush = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The guestFlush to set. + * @return This builder for chaining. + */ + public Builder setGuestFlush(boolean value) { + + guestFlush_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Defines if the guest flush is enabled for the source disk.
+     * Default value is false.
+     * 
+ * + * bool guest_flush = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGuestFlush() { + bitField0_ = (bitField0_ & ~0x00020000); + guestFlush_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DiskBackupProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DiskBackupProperties) + private static final com.google.cloud.backupdr.v1beta.DiskBackupProperties DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DiskBackupProperties(); + } + + public static com.google.cloud.backupdr.v1beta.DiskBackupProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskBackupProperties 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.backupdr.v1beta.DiskBackupProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPropertiesOrBuilder.java new file mode 100644 index 000000000000..99cfc063fe98 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskBackupPropertiesOrBuilder.java @@ -0,0 +1,731 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DiskBackupPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DiskBackupProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A description of the source disk.
+   * 
+ * + * optional string description = 1; + * + * @return Whether the description field is set. + */ + boolean hasDescription(); + + /** + * + * + *
+   * A description of the source disk.
+   * 
+ * + * optional string description = 1; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * A description of the source disk.
+   * 
+ * + * optional string description = 1; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * A list of publicly available licenses that are applicable to this backup.
+   * This is applicable if the original image had licenses attached, e.g.
+   * Windows image.
+   * 
+ * + * repeated string licenses = 2; + * + * @return A list containing the licenses. + */ + java.util.List getLicensesList(); + + /** + * + * + *
+   * A list of publicly available licenses that are applicable to this backup.
+   * This is applicable if the original image had licenses attached, e.g.
+   * Windows image.
+   * 
+ * + * repeated string licenses = 2; + * + * @return The count of licenses. + */ + int getLicensesCount(); + + /** + * + * + *
+   * A list of publicly available licenses that are applicable to this backup.
+   * This is applicable if the original image had licenses attached, e.g.
+   * Windows image.
+   * 
+ * + * repeated string licenses = 2; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + java.lang.String getLicenses(int index); + + /** + * + * + *
+   * A list of publicly available licenses that are applicable to this backup.
+   * This is applicable if the original image had licenses attached, e.g.
+   * Windows image.
+   * 
+ * + * repeated string licenses = 2; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + com.google.protobuf.ByteString getLicensesBytes(int index); + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + java.util.List getGuestOsFeatureList(); + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index); + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + int getGuestOsFeatureCount(); + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + java.util.List + getGuestOsFeatureOrBuilderList(); + + /** + * + * + *
+   * A list of guest OS features that are applicable to this backup.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 3; + */ + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder(int index); + + /** + * + * + *
+   * The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return Whether the architecture field is set. + */ + boolean hasArchitecture(); + + /** + * + * + *
+   * The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return The enum numeric value on the wire for architecture. + */ + int getArchitectureValue(); + + /** + * + * + *
+   * The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture architecture = 4; + * + * + * @return The architecture. + */ + com.google.cloud.backupdr.v1beta.DiskBackupProperties.Architecture getArchitecture(); + + /** + * + * + *
+   * The URL of the type of the disk.
+   * 
+ * + * optional string type = 5; + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
+   * The URL of the type of the disk.
+   * 
+ * + * optional string type = 5; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * The URL of the type of the disk.
+   * 
+ * + * optional string type = 5; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Size(in GB) of the source disk.
+   * 
+ * + * optional int64 size_gb = 6; + * + * @return Whether the sizeGb field is set. + */ + boolean hasSizeGb(); + + /** + * + * + *
+   * Size(in GB) of the source disk.
+   * 
+ * + * optional int64 size_gb = 6; + * + * @return The sizeGb. + */ + long getSizeGb(); + + /** + * + * + *
+   * Region and zone are mutually exclusive fields.
+   * The URL of the region of the source disk.
+   * 
+ * + * optional string region = 7; + * + * @return Whether the region field is set. + */ + boolean hasRegion(); + + /** + * + * + *
+   * Region and zone are mutually exclusive fields.
+   * The URL of the region of the source disk.
+   * 
+ * + * optional string region = 7; + * + * @return The region. + */ + java.lang.String getRegion(); + + /** + * + * + *
+   * Region and zone are mutually exclusive fields.
+   * The URL of the region of the source disk.
+   * 
+ * + * optional string region = 7; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * + * + *
+   * The URL of the Zone where the source disk.
+   * 
+ * + * optional string zone = 8; + * + * @return Whether the zone field is set. + */ + boolean hasZone(); + + /** + * + * + *
+   * The URL of the Zone where the source disk.
+   * 
+ * + * optional string zone = 8; + * + * @return The zone. + */ + java.lang.String getZone(); + + /** + * + * + *
+   * The URL of the Zone where the source disk.
+   * 
+ * + * optional string zone = 8; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * The URL of the Zones where the source disk should be replicated.
+   * 
+ * + * repeated string replica_zones = 9; + * + * @return A list containing the replicaZones. + */ + java.util.List getReplicaZonesList(); + + /** + * + * + *
+   * The URL of the Zones where the source disk should be replicated.
+   * 
+ * + * repeated string replica_zones = 9; + * + * @return The count of replicaZones. + */ + int getReplicaZonesCount(); + + /** + * + * + *
+   * The URL of the Zones where the source disk should be replicated.
+   * 
+ * + * repeated string replica_zones = 9; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + java.lang.String getReplicaZones(int index); + + /** + * + * + *
+   * The URL of the Zones where the source disk should be replicated.
+   * 
+ * + * repeated string replica_zones = 9; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + com.google.protobuf.ByteString getReplicaZonesBytes(int index); + + /** + * + * + *
+   * The source disk used to create this backup.
+   * 
+ * + * optional string source_disk = 10; + * + * @return Whether the sourceDisk field is set. + */ + boolean hasSourceDisk(); + + /** + * + * + *
+   * The source disk used to create this backup.
+   * 
+ * + * optional string source_disk = 10; + * + * @return The sourceDisk. + */ + java.lang.String getSourceDisk(); + + /** + * + * + *
+   * The source disk used to create this backup.
+   * 
+ * + * optional string source_disk = 10; + * + * @return The bytes for sourceDisk. + */ + com.google.protobuf.ByteString getSourceDiskBytes(); + + /** + * + * + *
+   * The access mode of the source disk.
+   * 
+ * + * optional string access_mode = 11; + * + * @return Whether the accessMode field is set. + */ + boolean hasAccessMode(); + + /** + * + * + *
+   * The access mode of the source disk.
+   * 
+ * + * optional string access_mode = 11; + * + * @return The accessMode. + */ + java.lang.String getAccessMode(); + + /** + * + * + *
+   * The access mode of the source disk.
+   * 
+ * + * optional string access_mode = 11; + * + * @return The bytes for accessMode. + */ + com.google.protobuf.ByteString getAccessModeBytes(); + + /** + * + * + *
+   * The number of IOPS provisioned for the source disk.
+   * 
+ * + * optional int64 provisioned_iops = 12; + * + * @return Whether the provisionedIops field is set. + */ + boolean hasProvisionedIops(); + + /** + * + * + *
+   * The number of IOPS provisioned for the source disk.
+   * 
+ * + * optional int64 provisioned_iops = 12; + * + * @return The provisionedIops. + */ + long getProvisionedIops(); + + /** + * + * + *
+   * The number of throughput provisioned for the source disk.
+   * 
+ * + * optional int64 provisioned_throughput = 13; + * + * @return Whether the provisionedThroughput field is set. + */ + boolean hasProvisionedThroughput(); + + /** + * + * + *
+   * The number of throughput provisioned for the source disk.
+   * 
+ * + * optional int64 provisioned_throughput = 13; + * + * @return The provisionedThroughput. + */ + long getProvisionedThroughput(); + + /** + * + * + *
+   * The physical block size of the source disk.
+   * 
+ * + * optional int64 physical_block_size_bytes = 14; + * + * @return Whether the physicalBlockSizeBytes field is set. + */ + boolean hasPhysicalBlockSizeBytes(); + + /** + * + * + *
+   * The physical block size of the source disk.
+   * 
+ * + * optional int64 physical_block_size_bytes = 14; + * + * @return The physicalBlockSizeBytes. + */ + long getPhysicalBlockSizeBytes(); + + /** + * + * + *
+   * Indicates whether the source disk is using confidential compute mode.
+   * 
+ * + * optional bool enable_confidential_compute = 15; + * + * @return Whether the enableConfidentialCompute field is set. + */ + boolean hasEnableConfidentialCompute(); + + /** + * + * + *
+   * Indicates whether the source disk is using confidential compute mode.
+   * 
+ * + * optional bool enable_confidential_compute = 15; + * + * @return The enableConfidentialCompute. + */ + boolean getEnableConfidentialCompute(); + + /** + * + * + *
+   * The storage pool of the source disk.
+   * 
+ * + * optional string storage_pool = 16; + * + * @return Whether the storagePool field is set. + */ + boolean hasStoragePool(); + + /** + * + * + *
+   * The storage pool of the source disk.
+   * 
+ * + * optional string storage_pool = 16; + * + * @return The storagePool. + */ + java.lang.String getStoragePool(); + + /** + * + * + *
+   * The storage pool of the source disk.
+   * 
+ * + * optional string storage_pool = 16; + * + * @return The bytes for storagePool. + */ + com.google.protobuf.ByteString getStoragePoolBytes(); + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + int getLabelsCount(); + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * The labels of the source disk.
+   * 
+ * + * map<string, string> labels = 17; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Defines if the guest flush is enabled for the source disk.
+   * Default value is false.
+   * 
+ * + * bool guest_flush = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The guestFlush. + */ + boolean getGuestFlush(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskDataSourceProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskDataSourceProperties.java new file mode 100644 index 000000000000..85611fe38dd2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskDataSourceProperties.java @@ -0,0 +1,1076 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * DiskDataSourceProperties represents the properties of a
+ * Disk resource that are stored in the DataSource.
+ * .
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskDataSourceProperties} + */ +@com.google.protobuf.Generated +public final class DiskDataSourceProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DiskDataSourceProperties) + DiskDataSourcePropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskDataSourceProperties"); + } + + // Use DiskDataSourceProperties.newBuilder() to construct. + private DiskDataSourceProperties(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DiskDataSourceProperties() { + name_ = ""; + description_ = ""; + type_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskDataSourceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskDataSourceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.class, + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Name of the disk backed up by the datasource.
+   * 
+ * + * string name = 1; + * + * @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; + } + } + + /** + * + * + *
+   * Name of the disk backed up by the datasource.
+   * 
+ * + * string name = 1; + * + * @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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * The description of the disk.
+   * 
+ * + * string description = 2; + * + * @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; + } + } + + /** + * + * + *
+   * The description of the disk.
+   * 
+ * + * string description = 2; + * + * @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 TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * The type of the disk.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * The type of the disk.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_GB_FIELD_NUMBER = 4; + private long sizeGb_ = 0L; + + /** + * + * + *
+   * The size of the disk in GB.
+   * 
+ * + * int64 size_gb = 4; + * + * @return The sizeGb. + */ + @java.lang.Override + public long getSizeGb() { + return sizeGb_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, type_); + } + if (sizeGb_ != 0L) { + output.writeInt64(4, sizeGb_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, type_); + } + if (sizeGb_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, sizeGb_); + } + 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.backupdr.v1beta.DiskDataSourceProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties other = + (com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getType().equals(other.getType())) return false; + if (getSizeGb() != other.getSizeGb()) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeGb()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties 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.backupdr.v1beta.DiskDataSourceProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties 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.backupdr.v1beta.DiskDataSourceProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DiskDataSourceProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * DiskDataSourceProperties represents the properties of a
+   * Disk resource that are stored in the DataSource.
+   * .
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskDataSourceProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DiskDataSourceProperties) + com.google.cloud.backupdr.v1beta.DiskDataSourcePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskDataSourceProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskDataSourceProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.class, + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + type_ = ""; + sizeGb_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskDataSourceProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskDataSourceProperties getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskDataSourceProperties build() { + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskDataSourceProperties buildPartial() { + com.google.cloud.backupdr.v1beta.DiskDataSourceProperties result = + new com.google.cloud.backupdr.v1beta.DiskDataSourceProperties(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DiskDataSourceProperties result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sizeGb_ = sizeGb_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DiskDataSourceProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DiskDataSourceProperties other) { + if (other == com.google.cloud.backupdr.v1beta.DiskDataSourceProperties.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getSizeGb() != 0L) { + setSizeGb(other.getSizeGb()); + } + 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 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + sizeGb_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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_ = ""; + + /** + * + * + *
+     * Name of the disk backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + + /** + * + * + *
+     * Name of the disk backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @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; + } + } + + /** + * + * + *
+     * Name of the disk backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @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; + } + + /** + * + * + *
+     * Name of the disk backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Name of the disk backed up by the datasource.
+     * 
+ * + * string name = 1; + * + * @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 java.lang.Object description_ = ""; + + /** + * + * + *
+     * The description of the disk.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + + /** + * + * + *
+     * The description of the disk.
+     * 
+ * + * string description = 2; + * + * @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; + } + } + + /** + * + * + *
+     * The description of the disk.
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The description of the disk.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The description of the disk.
+     * 
+ * + * string description = 2; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * The type of the disk.
+     * 
+ * + * string type = 3; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The type of the disk.
+     * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The type of the disk.
+     * 
+ * + * string type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of the disk.
+     * 
+ * + * string type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The type of the disk.
+     * 
+ * + * string type = 3; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long sizeGb_; + + /** + * + * + *
+     * The size of the disk in GB.
+     * 
+ * + * int64 size_gb = 4; + * + * @return The sizeGb. + */ + @java.lang.Override + public long getSizeGb() { + return sizeGb_; + } + + /** + * + * + *
+     * The size of the disk in GB.
+     * 
+ * + * int64 size_gb = 4; + * + * @param value The sizeGb to set. + * @return This builder for chaining. + */ + public Builder setSizeGb(long value) { + + sizeGb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The size of the disk in GB.
+     * 
+ * + * int64 size_gb = 4; + * + * @return This builder for chaining. + */ + public Builder clearSizeGb() { + bitField0_ = (bitField0_ & ~0x00000008); + sizeGb_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DiskDataSourceProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DiskDataSourceProperties) + private static final com.google.cloud.backupdr.v1beta.DiskDataSourceProperties DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DiskDataSourceProperties(); + } + + public static com.google.cloud.backupdr.v1beta.DiskDataSourceProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskDataSourceProperties 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.backupdr.v1beta.DiskDataSourceProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskDataSourcePropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskDataSourcePropertiesOrBuilder.java new file mode 100644 index 000000000000..7f7381b1538d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskDataSourcePropertiesOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DiskDataSourcePropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DiskDataSourceProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the disk backed up by the datasource.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Name of the disk backed up by the datasource.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The description of the disk.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * The description of the disk.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The type of the disk.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * The type of the disk.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * The size of the disk in GB.
+   * 
+ * + * int64 size_gb = 4; + * + * @return The sizeGb. + */ + long getSizeGb(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskRestoreProperties.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskRestoreProperties.java new file mode 100644 index 000000000000..aa17e60cf696 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskRestoreProperties.java @@ -0,0 +1,5557 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * DiskRestoreProperties represents the properties of a Disk restore.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskRestoreProperties} + */ +@com.google.protobuf.Generated +public final class DiskRestoreProperties extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DiskRestoreProperties) + DiskRestorePropertiesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskRestoreProperties"); + } + + // Use DiskRestoreProperties.newBuilder() to construct. + private DiskRestoreProperties(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DiskRestoreProperties() { + name_ = ""; + description_ = ""; + licenses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + guestOsFeature_ = java.util.Collections.emptyList(); + storagePool_ = ""; + accessMode_ = 0; + architecture_ = 0; + resourcePolicy_ = com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskRestoreProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 17: + return internalGetLabels(); + case 18: + return internalGetResourceManagerTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskRestoreProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.class, + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Builder.class); + } + + /** + * + * + *
+   * The supported access modes of the disk.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode} + */ + public enum AccessMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The default AccessMode, means the disk can be attached to single instance
+     * in RW mode.
+     * 
+ * + * READ_WRITE_SINGLE = 0; + */ + READ_WRITE_SINGLE(0), + /** + * + * + *
+     * The AccessMode means the disk can be attached to multiple instances in RW
+     * mode.
+     * 
+ * + * READ_WRITE_MANY = 1; + */ + READ_WRITE_MANY(1), + /** + * + * + *
+     * The AccessMode means the disk can be attached to multiple instances in RO
+     * mode.
+     * 
+ * + * READ_ONLY_MANY = 2; + */ + READ_ONLY_MANY(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "AccessMode"); + } + + /** + * + * + *
+     * The default AccessMode, means the disk can be attached to single instance
+     * in RW mode.
+     * 
+ * + * READ_WRITE_SINGLE = 0; + */ + public static final int READ_WRITE_SINGLE_VALUE = 0; + + /** + * + * + *
+     * The AccessMode means the disk can be attached to multiple instances in RW
+     * mode.
+     * 
+ * + * READ_WRITE_MANY = 1; + */ + public static final int READ_WRITE_MANY_VALUE = 1; + + /** + * + * + *
+     * The AccessMode means the disk can be attached to multiple instances in RO
+     * mode.
+     * 
+ * + * READ_ONLY_MANY = 2; + */ + public static final int READ_ONLY_MANY_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 AccessMode 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 AccessMode forNumber(int value) { + switch (value) { + case 0: + return READ_WRITE_SINGLE; + case 1: + return READ_WRITE_MANY; + case 2: + return READ_ONLY_MANY; + 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 AccessMode findValueByNumber(int number) { + return AccessMode.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AccessMode[] VALUES = values(); + + public static AccessMode 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 AccessMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode) + } + + /** + * + * + *
+   * Architecture of the source disk.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture} + */ + public enum Architecture implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ARCHITECTURE_UNSPECIFIED = 0; + */ + ARCHITECTURE_UNSPECIFIED(0), + /** + * + * + *
+     * Disks with architecture X86_64
+     * 
+ * + * X86_64 = 1; + */ + X86_64(1), + /** + * + * + *
+     * Disks with architecture ARM64
+     * 
+ * + * ARM64 = 2; + */ + ARM64(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Architecture"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ARCHITECTURE_UNSPECIFIED = 0; + */ + public static final int ARCHITECTURE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Disks with architecture X86_64
+     * 
+ * + * X86_64 = 1; + */ + public static final int X86_64_VALUE = 1; + + /** + * + * + *
+     * Disks with architecture ARM64
+     * 
+ * + * ARM64 = 2; + */ + public static final int ARM64_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 Architecture 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 Architecture forNumber(int value) { + switch (value) { + case 0: + return ARCHITECTURE_UNSPECIFIED; + case 1: + return X86_64; + case 2: + return ARM64; + 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 Architecture findValueByNumber(int number) { + return Architecture.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Architecture[] VALUES = values(); + + public static Architecture 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 Architecture(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture) + } + + private int bitField0_; + private int sourceOptionsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceOptions_; + + public enum SourceOptionsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INSTANCE_BACKUP_SOURCE(19), + SOURCEOPTIONS_NOT_SET(0); + private final int value; + + private SourceOptionsCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceOptionsCase valueOf(int value) { + return forNumber(value); + } + + public static SourceOptionsCase forNumber(int value) { + switch (value) { + case 19: + return INSTANCE_BACKUP_SOURCE; + case 0: + return SOURCEOPTIONS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceOptionsCase getSourceOptionsCase() { + return SourceOptionsCase.forNumber(sourceOptionsCase_); + } + + public static final int INSTANCE_BACKUP_SOURCE_FIELD_NUMBER = 19; + + /** + * + * + *
+   * Options for creating a disk from a source Compute Instance backup.
+   * 
+ * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + * + * @return Whether the instanceBackupSource field is set. + */ + @java.lang.Override + public boolean hasInstanceBackupSource() { + return sourceOptionsCase_ == 19; + } + + /** + * + * + *
+   * Options for creating a disk from a source Compute Instance backup.
+   * 
+ * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + * + * @return The instanceBackupSource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions getInstanceBackupSource() { + if (sourceOptionsCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) sourceOptions_; + } + return com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.getDefaultInstance(); + } + + /** + * + * + *
+   * Options for creating a disk from a source Compute Instance backup.
+   * 
+ * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptionsOrBuilder + getInstanceBackupSourceOrBuilder() { + if (sourceOptionsCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) sourceOptions_; + } + return com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the disk.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the name field is set. + */ + @java.lang.Override + public boolean hasName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Name of the disk.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Name of the disk.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + @java.lang.Override + public boolean hasDescription() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 SIZE_GB_FIELD_NUMBER = 3; + private long sizeGb_ = 0L; + + /** + * + * + *
+   * Required. The size of the disk in GB.
+   * 
+ * + * optional int64 size_gb = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the sizeGb field is set. + */ + @java.lang.Override + public boolean hasSizeGb() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Required. The size of the disk in GB.
+   * 
+ * + * optional int64 size_gb = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sizeGb. + */ + @java.lang.Override + public long getSizeGb() { + return sizeGb_; + } + + public static final int LICENSES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList licenses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A list of publicly available licenses that are applicable to this
+   * backup. This is applicable if the original image had licenses attached,
+   * e.g. Windows image
+   * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + return licenses_; + } + + /** + * + * + *
+   * Optional. A list of publicly available licenses that are applicable to this
+   * backup. This is applicable if the original image had licenses attached,
+   * e.g. Windows image
+   * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + + /** + * + * + *
+   * Optional. A list of publicly available licenses that are applicable to this
+   * backup. This is applicable if the original image had licenses attached,
+   * e.g. Windows image
+   * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + + /** + * + * + *
+   * Optional. A list of publicly available licenses that are applicable to this
+   * backup. This is applicable if the original image had licenses attached,
+   * e.g. Windows image
+   * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + + public static final int GUEST_OS_FEATURE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List guestOsFeature_; + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getGuestOsFeatureList() { + return guestOsFeature_; + } + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getGuestOsFeatureOrBuilderList() { + return guestOsFeature_; + } + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getGuestOsFeatureCount() { + return guestOsFeature_.size(); + } + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index) { + return guestOsFeature_.get(index); + } + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder( + int index) { + return guestOsFeature_.get(index); + } + + public static final int DISK_ENCRYPTION_KEY_FIELD_NUMBER = 6; + private com.google.cloud.backupdr.v1beta.CustomerEncryptionKey diskEncryptionKey_; + + /** + * + * + *
+   * Optional. Encrypts the disk using a
+   * customer-supplied encryption key or a customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskEncryptionKey field is set. + */ + @java.lang.Override + public boolean hasDiskEncryptionKey() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Encrypts the disk using a
+   * customer-supplied encryption key or a customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskEncryptionKey. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getDiskEncryptionKey() { + return diskEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : diskEncryptionKey_; + } + + /** + * + * + *
+   * Optional. Encrypts the disk using a
+   * customer-supplied encryption key or a customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder + getDiskEncryptionKeyOrBuilder() { + return diskEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : diskEncryptionKey_; + } + + public static final int PHYSICAL_BLOCK_SIZE_BYTES_FIELD_NUMBER = 7; + private long physicalBlockSizeBytes_ = 0L; + + /** + * + * + *
+   * Optional. Physical block size of the persistent disk, in bytes.
+   * If not present in a request, a default value is used.
+   * Currently, the supported size is 4096.
+   * 
+ * + * optional int64 physical_block_size_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the physicalBlockSizeBytes field is set. + */ + @java.lang.Override + public boolean hasPhysicalBlockSizeBytes() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Physical block size of the persistent disk, in bytes.
+   * If not present in a request, a default value is used.
+   * Currently, the supported size is 4096.
+   * 
+ * + * optional int64 physical_block_size_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The physicalBlockSizeBytes. + */ + @java.lang.Override + public long getPhysicalBlockSizeBytes() { + return physicalBlockSizeBytes_; + } + + public static final int PROVISIONED_IOPS_FIELD_NUMBER = 8; + private long provisionedIops_ = 0L; + + /** + * + * + *
+   * Optional. Indicates how many IOPS to provision for the disk. This sets the
+   * number of I/O operations per second that the disk can handle.
+   * 
+ * + * optional int64 provisioned_iops = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the provisionedIops field is set. + */ + @java.lang.Override + public boolean hasProvisionedIops() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Indicates how many IOPS to provision for the disk. This sets the
+   * number of I/O operations per second that the disk can handle.
+   * 
+ * + * optional int64 provisioned_iops = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The provisionedIops. + */ + @java.lang.Override + public long getProvisionedIops() { + return provisionedIops_; + } + + public static final int PROVISIONED_THROUGHPUT_FIELD_NUMBER = 9; + private long provisionedThroughput_ = 0L; + + /** + * + * + *
+   * Optional. Indicates how much throughput to provision for the disk. This
+   * sets the number of throughput MB per second that the disk can handle.
+   * 
+ * + * optional int64 provisioned_throughput = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provisionedThroughput field is set. + */ + @java.lang.Override + public boolean hasProvisionedThroughput() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. Indicates how much throughput to provision for the disk. This
+   * sets the number of throughput MB per second that the disk can handle.
+   * 
+ * + * optional int64 provisioned_throughput = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisionedThroughput. + */ + @java.lang.Override + public long getProvisionedThroughput() { + return provisionedThroughput_; + } + + public static final int ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER = 10; + private boolean enableConfidentialCompute_ = false; + + /** + * + * + *
+   * Optional. Indicates whether this disk is using confidential compute mode.
+   * Encryption with a Cloud KMS key is required to enable this option.
+   * 
+ * + * optional bool enable_confidential_compute = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableConfidentialCompute field is set. + */ + @java.lang.Override + public boolean hasEnableConfidentialCompute() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. Indicates whether this disk is using confidential compute mode.
+   * Encryption with a Cloud KMS key is required to enable this option.
+   * 
+ * + * optional bool enable_confidential_compute = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableConfidentialCompute. + */ + @java.lang.Override + public boolean getEnableConfidentialCompute() { + return enableConfidentialCompute_; + } + + public static final int STORAGE_POOL_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object storagePool_ = ""; + + /** + * + * + *
+   * Optional. The storage pool in which the new disk is created. You can
+   * provide this as a partial or full URL to the resource.
+   * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the storagePool field is set. + */ + @java.lang.Override + public boolean hasStoragePool() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. The storage pool in which the new disk is created. You can
+   * provide this as a partial or full URL to the resource.
+   * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The storagePool. + */ + @java.lang.Override + public java.lang.String getStoragePool() { + java.lang.Object ref = storagePool_; + 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(); + storagePool_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The storage pool in which the new disk is created. You can
+   * provide this as a partial or full URL to the resource.
+   * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for storagePool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStoragePoolBytes() { + java.lang.Object ref = storagePool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storagePool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCESS_MODE_FIELD_NUMBER = 12; + private int accessMode_ = 0; + + /** + * + * + *
+   * Optional. The access mode of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the accessMode field is set. + */ + @java.lang.Override + public boolean hasAccessMode() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Optional. The access mode of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for accessMode. + */ + @java.lang.Override + public int getAccessModeValue() { + return accessMode_; + } + + /** + * + * + *
+   * Optional. The access mode of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessMode. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode getAccessMode() { + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode result = + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode.forNumber(accessMode_); + return result == null + ? com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode.UNRECOGNIZED + : result; + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 14; + private int architecture_ = 0; + + /** + * + * + *
+   * Optional. The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the architecture field is set. + */ + @java.lang.Override + public boolean hasArchitecture() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+   * Optional. The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override + public int getArchitectureValue() { + return architecture_; + } + + /** + * + * + *
+   * Optional. The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The architecture. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture getArchitecture() { + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture result = + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture.forNumber( + architecture_); + return result == null + ? com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_POLICY_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList resourcePolicy_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Resource policies applied to this disk.
+   * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the resourcePolicy. + */ + public com.google.protobuf.ProtocolStringList getResourcePolicyList() { + return resourcePolicy_; + } + + /** + * + * + *
+   * Optional. Resource policies applied to this disk.
+   * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of resourcePolicy. + */ + public int getResourcePolicyCount() { + return resourcePolicy_.size(); + } + + /** + * + * + *
+   * Optional. Resource policies applied to this disk.
+   * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The resourcePolicy at the given index. + */ + public java.lang.String getResourcePolicy(int index) { + return resourcePolicy_.get(index); + } + + /** + * + * + *
+   * Optional. Resource policies applied to this disk.
+   * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the resourcePolicy at the given index. + */ + public com.google.protobuf.ByteString getResourcePolicyBytes(int index) { + return resourcePolicy_.getByteString(index); + } + + public static final int TYPE_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * Required. URL of the disk type resource describing which disk type to use
+   * to create the disk.
+   * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+   * Required. URL of the disk type resource describing which disk type to use
+   * to create the disk.
+   * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. URL of the disk type resource describing which disk type to use
+   * to create the disk.
+   * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 17; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskRestoreProperties_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(); + } + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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 RESOURCE_MANAGER_TAGS_FIELD_NUMBER = 18; + + private static final class ResourceManagerTagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskRestoreProperties_ResourceManagerTagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField resourceManagerTags_; + + private com.google.protobuf.MapField + internalGetResourceManagerTags() { + if (resourceManagerTags_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourceManagerTagsDefaultEntryHolder.defaultEntry); + } + return resourceManagerTags_; + } + + public int getResourceManagerTagsCount() { + return internalGetResourceManagerTags().getMap().size(); + } + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsResourceManagerTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetResourceManagerTags().getMap().containsKey(key); + } + + /** Use {@link #getResourceManagerTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResourceManagerTags() { + return getResourceManagerTagsMap(); + } + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getResourceManagerTagsMap() { + return internalGetResourceManagerTags().getMap(); + } + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getResourceManagerTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetResourceManagerTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getResourceManagerTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetResourceManagerTags().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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt64(3, sizeGb_); + } + for (int i = 0; i < licenses_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, licenses_.getRaw(i)); + } + for (int i = 0; i < guestOsFeature_.size(); i++) { + output.writeMessage(5, guestOsFeature_.get(i)); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getDiskEncryptionKey()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeInt64(7, physicalBlockSizeBytes_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeInt64(8, provisionedIops_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeInt64(9, provisionedThroughput_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeBool(10, enableConfidentialCompute_); + } + if (((bitField0_ & 0x00000100) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, storagePool_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeEnum(12, accessMode_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeEnum(14, architecture_); + } + for (int i = 0; i < resourcePolicy_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, resourcePolicy_.getRaw(i)); + } + if (((bitField0_ & 0x00000800) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 16, type_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 17); + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, + internalGetResourceManagerTags(), + ResourceManagerTagsDefaultEntryHolder.defaultEntry, + 18); + if (sourceOptionsCase_ == 19) { + output.writeMessage( + 19, (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) sourceOptions_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, sizeGb_); + } + { + int dataSize = 0; + for (int i = 0; i < licenses_.size(); i++) { + dataSize += computeStringSizeNoTag(licenses_.getRaw(i)); + } + size += dataSize; + size += 1 * getLicensesList().size(); + } + for (int i = 0; i < guestOsFeature_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, guestOsFeature_.get(i)); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDiskEncryptionKey()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, physicalBlockSizeBytes_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, provisionedIops_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, provisionedThroughput_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, enableConfidentialCompute_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, storagePool_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, accessMode_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, architecture_); + } + { + int dataSize = 0; + for (int i = 0; i < resourcePolicy_.size(); i++) { + dataSize += computeStringSizeNoTag(resourcePolicy_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourcePolicyList().size(); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(16, type_); + } + 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(17, labels__); + } + for (java.util.Map.Entry entry : + internalGetResourceManagerTags().getMap().entrySet()) { + com.google.protobuf.MapEntry resourceManagerTags__ = + ResourceManagerTagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, resourceManagerTags__); + } + if (sourceOptionsCase_ == 19) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) sourceOptions_); + } + 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.backupdr.v1beta.DiskRestoreProperties)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DiskRestoreProperties other = + (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) obj; + + if (hasName() != other.hasName()) return false; + if (hasName()) { + if (!getName().equals(other.getName())) return false; + } + if (hasDescription() != other.hasDescription()) return false; + if (hasDescription()) { + if (!getDescription().equals(other.getDescription())) return false; + } + if (hasSizeGb() != other.hasSizeGb()) return false; + if (hasSizeGb()) { + if (getSizeGb() != other.getSizeGb()) return false; + } + if (!getLicensesList().equals(other.getLicensesList())) return false; + if (!getGuestOsFeatureList().equals(other.getGuestOsFeatureList())) return false; + if (hasDiskEncryptionKey() != other.hasDiskEncryptionKey()) return false; + if (hasDiskEncryptionKey()) { + if (!getDiskEncryptionKey().equals(other.getDiskEncryptionKey())) return false; + } + if (hasPhysicalBlockSizeBytes() != other.hasPhysicalBlockSizeBytes()) return false; + if (hasPhysicalBlockSizeBytes()) { + if (getPhysicalBlockSizeBytes() != other.getPhysicalBlockSizeBytes()) return false; + } + if (hasProvisionedIops() != other.hasProvisionedIops()) return false; + if (hasProvisionedIops()) { + if (getProvisionedIops() != other.getProvisionedIops()) return false; + } + if (hasProvisionedThroughput() != other.hasProvisionedThroughput()) return false; + if (hasProvisionedThroughput()) { + if (getProvisionedThroughput() != other.getProvisionedThroughput()) return false; + } + if (hasEnableConfidentialCompute() != other.hasEnableConfidentialCompute()) return false; + if (hasEnableConfidentialCompute()) { + if (getEnableConfidentialCompute() != other.getEnableConfidentialCompute()) return false; + } + if (hasStoragePool() != other.hasStoragePool()) return false; + if (hasStoragePool()) { + if (!getStoragePool().equals(other.getStoragePool())) return false; + } + if (hasAccessMode() != other.hasAccessMode()) return false; + if (hasAccessMode()) { + if (accessMode_ != other.accessMode_) return false; + } + if (hasArchitecture() != other.hasArchitecture()) return false; + if (hasArchitecture()) { + if (architecture_ != other.architecture_) return false; + } + if (!getResourcePolicyList().equals(other.getResourcePolicyList())) return false; + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (!getType().equals(other.getType())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetResourceManagerTags().equals(other.internalGetResourceManagerTags())) + return false; + if (!getSourceOptionsCase().equals(other.getSourceOptionsCase())) return false; + switch (sourceOptionsCase_) { + case 19: + if (!getInstanceBackupSource().equals(other.getInstanceBackupSource())) return false; + break; + case 0: + default: + } + 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 (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + if (hasDescription()) { + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + } + if (hasSizeGb()) { + hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeGb()); + } + if (getLicensesCount() > 0) { + hash = (37 * hash) + LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getLicensesList().hashCode(); + } + if (getGuestOsFeatureCount() > 0) { + hash = (37 * hash) + GUEST_OS_FEATURE_FIELD_NUMBER; + hash = (53 * hash) + getGuestOsFeatureList().hashCode(); + } + if (hasDiskEncryptionKey()) { + hash = (37 * hash) + DISK_ENCRYPTION_KEY_FIELD_NUMBER; + hash = (53 * hash) + getDiskEncryptionKey().hashCode(); + } + if (hasPhysicalBlockSizeBytes()) { + hash = (37 * hash) + PHYSICAL_BLOCK_SIZE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPhysicalBlockSizeBytes()); + } + if (hasProvisionedIops()) { + hash = (37 * hash) + PROVISIONED_IOPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProvisionedIops()); + } + if (hasProvisionedThroughput()) { + hash = (37 * hash) + PROVISIONED_THROUGHPUT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProvisionedThroughput()); + } + if (hasEnableConfidentialCompute()) { + hash = (37 * hash) + ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableConfidentialCompute()); + } + if (hasStoragePool()) { + hash = (37 * hash) + STORAGE_POOL_FIELD_NUMBER; + hash = (53 * hash) + getStoragePool().hashCode(); + } + if (hasAccessMode()) { + hash = (37 * hash) + ACCESS_MODE_FIELD_NUMBER; + hash = (53 * hash) + accessMode_; + } + if (hasArchitecture()) { + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + architecture_; + } + if (getResourcePolicyCount() > 0) { + hash = (37 * hash) + RESOURCE_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getResourcePolicyList().hashCode(); + } + if (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetResourceManagerTags().getMap().isEmpty()) { + hash = (37 * hash) + RESOURCE_MANAGER_TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetResourceManagerTags().hashCode(); + } + switch (sourceOptionsCase_) { + case 19: + hash = (37 * hash) + INSTANCE_BACKUP_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getInstanceBackupSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties 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.backupdr.v1beta.DiskRestoreProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties 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.backupdr.v1beta.DiskRestoreProperties parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DiskRestoreProperties 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * DiskRestoreProperties represents the properties of a Disk restore.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskRestoreProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DiskRestoreProperties) + com.google.cloud.backupdr.v1beta.DiskRestorePropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskRestoreProperties_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 17: + return internalGetLabels(); + case 18: + return internalGetResourceManagerTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 17: + return internalGetMutableLabels(); + case 18: + return internalGetMutableResourceManagerTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskRestoreProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.class, + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DiskRestoreProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetGuestOsFeatureFieldBuilder(); + internalGetDiskEncryptionKeyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (instanceBackupSourceBuilder_ != null) { + instanceBackupSourceBuilder_.clear(); + } + name_ = ""; + description_ = ""; + sizeGb_ = 0L; + licenses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (guestOsFeatureBuilder_ == null) { + guestOsFeature_ = java.util.Collections.emptyList(); + } else { + guestOsFeature_ = null; + guestOsFeatureBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + diskEncryptionKey_ = null; + if (diskEncryptionKeyBuilder_ != null) { + diskEncryptionKeyBuilder_.dispose(); + diskEncryptionKeyBuilder_ = null; + } + physicalBlockSizeBytes_ = 0L; + provisionedIops_ = 0L; + provisionedThroughput_ = 0L; + enableConfidentialCompute_ = false; + storagePool_ = ""; + accessMode_ = 0; + architecture_ = 0; + resourcePolicy_ = com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = ""; + internalGetMutableLabels().clear(); + internalGetMutableResourceManagerTags().clear(); + sourceOptionsCase_ = 0; + sourceOptions_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskRestoreProperties_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties build() { + com.google.cloud.backupdr.v1beta.DiskRestoreProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties buildPartial() { + com.google.cloud.backupdr.v1beta.DiskRestoreProperties result = + new com.google.cloud.backupdr.v1beta.DiskRestoreProperties(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.DiskRestoreProperties result) { + if (guestOsFeatureBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + guestOsFeature_ = java.util.Collections.unmodifiableList(guestOsFeature_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.guestOsFeature_ = guestOsFeature_; + } else { + result.guestOsFeature_ = guestOsFeatureBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DiskRestoreProperties result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sizeGb_ = sizeGb_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + licenses_.makeImmutable(); + result.licenses_ = licenses_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.diskEncryptionKey_ = + diskEncryptionKeyBuilder_ == null + ? diskEncryptionKey_ + : diskEncryptionKeyBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.physicalBlockSizeBytes_ = physicalBlockSizeBytes_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.provisionedIops_ = provisionedIops_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.provisionedThroughput_ = provisionedThroughput_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.enableConfidentialCompute_ = enableConfidentialCompute_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.storagePool_ = storagePool_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.accessMode_ = accessMode_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.architecture_ = architecture_; + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + resourcePolicy_.makeImmutable(); + result.resourcePolicy_ = resourcePolicy_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.resourceManagerTags_ = internalGetResourceManagerTags(); + result.resourceManagerTags_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.DiskRestoreProperties result) { + result.sourceOptionsCase_ = sourceOptionsCase_; + result.sourceOptions_ = this.sourceOptions_; + if (sourceOptionsCase_ == 19 && instanceBackupSourceBuilder_ != null) { + result.sourceOptions_ = instanceBackupSourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DiskRestoreProperties) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DiskRestoreProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DiskRestoreProperties other) { + if (other == com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance()) + return this; + if (other.hasName()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDescription()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasSizeGb()) { + setSizeGb(other.getSizeGb()); + } + if (!other.licenses_.isEmpty()) { + if (licenses_.isEmpty()) { + licenses_ = other.licenses_; + bitField0_ |= 0x00000010; + } else { + ensureLicensesIsMutable(); + licenses_.addAll(other.licenses_); + } + onChanged(); + } + if (guestOsFeatureBuilder_ == null) { + if (!other.guestOsFeature_.isEmpty()) { + if (guestOsFeature_.isEmpty()) { + guestOsFeature_ = other.guestOsFeature_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.addAll(other.guestOsFeature_); + } + onChanged(); + } + } else { + if (!other.guestOsFeature_.isEmpty()) { + if (guestOsFeatureBuilder_.isEmpty()) { + guestOsFeatureBuilder_.dispose(); + guestOsFeatureBuilder_ = null; + guestOsFeature_ = other.guestOsFeature_; + bitField0_ = (bitField0_ & ~0x00000020); + guestOsFeatureBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGuestOsFeatureFieldBuilder() + : null; + } else { + guestOsFeatureBuilder_.addAllMessages(other.guestOsFeature_); + } + } + } + if (other.hasDiskEncryptionKey()) { + mergeDiskEncryptionKey(other.getDiskEncryptionKey()); + } + if (other.hasPhysicalBlockSizeBytes()) { + setPhysicalBlockSizeBytes(other.getPhysicalBlockSizeBytes()); + } + if (other.hasProvisionedIops()) { + setProvisionedIops(other.getProvisionedIops()); + } + if (other.hasProvisionedThroughput()) { + setProvisionedThroughput(other.getProvisionedThroughput()); + } + if (other.hasEnableConfidentialCompute()) { + setEnableConfidentialCompute(other.getEnableConfidentialCompute()); + } + if (other.hasStoragePool()) { + storagePool_ = other.storagePool_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.hasAccessMode()) { + setAccessModeValue(other.getAccessModeValue()); + } + if (other.hasArchitecture()) { + setArchitectureValue(other.getArchitectureValue()); + } + if (!other.resourcePolicy_.isEmpty()) { + if (resourcePolicy_.isEmpty()) { + resourcePolicy_ = other.resourcePolicy_; + bitField0_ |= 0x00004000; + } else { + ensureResourcePolicyIsMutable(); + resourcePolicy_.addAll(other.resourcePolicy_); + } + onChanged(); + } + if (other.hasType()) { + type_ = other.type_; + bitField0_ |= 0x00008000; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00010000; + internalGetMutableResourceManagerTags().mergeFrom(other.internalGetResourceManagerTags()); + bitField0_ |= 0x00020000; + switch (other.getSourceOptionsCase()) { + case INSTANCE_BACKUP_SOURCE: + { + mergeInstanceBackupSource(other.getInstanceBackupSource()); + break; + } + case SOURCEOPTIONS_NOT_SET: + { + break; + } + } + 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_ |= 0x00000002; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 24: + { + sizeGb_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case 34 + case 42: + { + com.google.cloud.backupdr.v1beta.GuestOsFeature m = + input.readMessage( + com.google.cloud.backupdr.v1beta.GuestOsFeature.parser(), + extensionRegistry); + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(m); + } else { + guestOsFeatureBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 56: + { + physicalBlockSizeBytes_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 56 + case 64: + { + provisionedIops_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 64 + case 72: + { + provisionedThroughput_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 80: + { + enableConfidentialCompute_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 80 + case 90: + { + storagePool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 90 + case 96: + { + accessMode_ = input.readEnum(); + bitField0_ |= 0x00001000; + break; + } // case 96 + case 112: + { + architecture_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 112 + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePolicyIsMutable(); + resourcePolicy_.add(s); + break; + } // case 122 + case 130: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: + { + com.google.protobuf.MapEntry + resourceManagerTags__ = + input.readMessage( + ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableResourceManagerTags() + .getMutableMap() + .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); + bitField0_ |= 0x00020000; + break; + } // case 146 + case 154: + { + input.readMessage( + internalGetInstanceBackupSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceOptionsCase_ = 19; + break; + } // case 154 + 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 sourceOptionsCase_ = 0; + private java.lang.Object sourceOptions_; + + public SourceOptionsCase getSourceOptionsCase() { + return SourceOptionsCase.forNumber(sourceOptionsCase_); + } + + public Builder clearSourceOptions() { + sourceOptionsCase_ = 0; + sourceOptions_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions, + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.Builder, + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptionsOrBuilder> + instanceBackupSourceBuilder_; + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + * + * @return Whether the instanceBackupSource field is set. + */ + @java.lang.Override + public boolean hasInstanceBackupSource() { + return sourceOptionsCase_ == 19; + } + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + * + * @return The instanceBackupSource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions + getInstanceBackupSource() { + if (instanceBackupSourceBuilder_ == null) { + if (sourceOptionsCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) sourceOptions_; + } + return com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.getDefaultInstance(); + } else { + if (sourceOptionsCase_ == 19) { + return instanceBackupSourceBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + public Builder setInstanceBackupSource( + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions value) { + if (instanceBackupSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sourceOptions_ = value; + onChanged(); + } else { + instanceBackupSourceBuilder_.setMessage(value); + } + sourceOptionsCase_ = 19; + return this; + } + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + public Builder setInstanceBackupSource( + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.Builder builderForValue) { + if (instanceBackupSourceBuilder_ == null) { + sourceOptions_ = builderForValue.build(); + onChanged(); + } else { + instanceBackupSourceBuilder_.setMessage(builderForValue.build()); + } + sourceOptionsCase_ = 19; + return this; + } + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + public Builder mergeInstanceBackupSource( + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions value) { + if (instanceBackupSourceBuilder_ == null) { + if (sourceOptionsCase_ == 19 + && sourceOptions_ + != com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions + .getDefaultInstance()) { + sourceOptions_ = + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.newBuilder( + (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) + sourceOptions_) + .mergeFrom(value) + .buildPartial(); + } else { + sourceOptions_ = value; + } + onChanged(); + } else { + if (sourceOptionsCase_ == 19) { + instanceBackupSourceBuilder_.mergeFrom(value); + } else { + instanceBackupSourceBuilder_.setMessage(value); + } + } + sourceOptionsCase_ = 19; + return this; + } + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + public Builder clearInstanceBackupSource() { + if (instanceBackupSourceBuilder_ == null) { + if (sourceOptionsCase_ == 19) { + sourceOptionsCase_ = 0; + sourceOptions_ = null; + onChanged(); + } + } else { + if (sourceOptionsCase_ == 19) { + sourceOptionsCase_ = 0; + sourceOptions_ = null; + } + instanceBackupSourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + public com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.Builder + getInstanceBackupSourceBuilder() { + return internalGetInstanceBackupSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptionsOrBuilder + getInstanceBackupSourceOrBuilder() { + if ((sourceOptionsCase_ == 19) && (instanceBackupSourceBuilder_ != null)) { + return instanceBackupSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceOptionsCase_ == 19) { + return (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) sourceOptions_; + } + return com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Options for creating a disk from a source Compute Instance backup.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions, + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.Builder, + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptionsOrBuilder> + internalGetInstanceBackupSourceFieldBuilder() { + if (instanceBackupSourceBuilder_ == null) { + if (!(sourceOptionsCase_ == 19)) { + sourceOptions_ = + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.getDefaultInstance(); + } + instanceBackupSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions, + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.Builder, + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptionsOrBuilder>( + (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) sourceOptions_, + getParentForChildren(), + isClean()); + sourceOptions_ = null; + } + sourceOptionsCase_ = 19; + onChanged(); + return instanceBackupSourceBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the disk.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the name field is set. + */ + public boolean hasName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Name of the disk.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Name of the disk.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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. Name of the disk.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the disk.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the disk.
+     * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this property
+     * when you create the resource.
+     * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 sizeGb_; + + /** + * + * + *
+     * Required. The size of the disk in GB.
+     * 
+ * + * optional int64 size_gb = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the sizeGb field is set. + */ + @java.lang.Override + public boolean hasSizeGb() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. The size of the disk in GB.
+     * 
+ * + * optional int64 size_gb = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sizeGb. + */ + @java.lang.Override + public long getSizeGb() { + return sizeGb_; + } + + /** + * + * + *
+     * Required. The size of the disk in GB.
+     * 
+ * + * optional int64 size_gb = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The sizeGb to set. + * @return This builder for chaining. + */ + public Builder setSizeGb(long value) { + + sizeGb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The size of the disk in GB.
+     * 
+ * + * optional int64 size_gb = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSizeGb() { + bitField0_ = (bitField0_ & ~0x00000008); + sizeGb_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList licenses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLicensesIsMutable() { + if (!licenses_.isModifiable()) { + licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the licenses. + */ + public com.google.protobuf.ProtocolStringList getLicensesList() { + licenses_.makeImmutable(); + return licenses_; + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of licenses. + */ + public int getLicensesCount() { + return licenses_.size(); + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + public java.lang.String getLicenses(int index) { + return licenses_.get(index); + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + public com.google.protobuf.ByteString getLicensesBytes(int index) { + return licenses_.getByteString(index); + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The licenses to set. + * @return This builder for chaining. + */ + public Builder setLicenses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The licenses to add. + * @return This builder for chaining. + */ + public Builder addLicenses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicensesIsMutable(); + licenses_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The licenses to add. + * @return This builder for chaining. + */ + public Builder addAllLicenses(java.lang.Iterable values) { + ensureLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenses_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLicenses() { + licenses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of publicly available licenses that are applicable to this
+     * backup. This is applicable if the original image had licenses attached,
+     * e.g. Windows image
+     * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the licenses to add. + * @return This builder for chaining. + */ + public Builder addLicensesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLicensesIsMutable(); + licenses_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.util.List guestOsFeature_ = + java.util.Collections.emptyList(); + + private void ensureGuestOsFeatureIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + guestOsFeature_ = + new java.util.ArrayList( + guestOsFeature_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder> + guestOsFeatureBuilder_; + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getGuestOsFeatureList() { + if (guestOsFeatureBuilder_ == null) { + return java.util.Collections.unmodifiableList(guestOsFeature_); + } else { + return guestOsFeatureBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getGuestOsFeatureCount() { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.size(); + } else { + return guestOsFeatureBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index) { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.get(index); + } else { + return guestOsFeatureBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.set(index, value); + onChanged(); + } else { + guestOsFeatureBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.set(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestOsFeature(com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(value); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature value) { + if (guestOsFeatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(index, value); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestOsFeature( + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGuestOsFeature( + int index, com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder builderForValue) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.add(index, builderForValue.build()); + onChanged(); + } else { + guestOsFeatureBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllGuestOsFeature( + java.lang.Iterable values) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, guestOsFeature_); + onChanged(); + } else { + guestOsFeatureBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGuestOsFeature() { + if (guestOsFeatureBuilder_ == null) { + guestOsFeature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + guestOsFeatureBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeGuestOsFeature(int index) { + if (guestOsFeatureBuilder_ == null) { + ensureGuestOsFeatureIsMutable(); + guestOsFeature_.remove(index); + onChanged(); + } else { + guestOsFeatureBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder getGuestOsFeatureBuilder( + int index) { + return internalGetGuestOsFeatureFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder( + int index) { + if (guestOsFeatureBuilder_ == null) { + return guestOsFeature_.get(index); + } else { + return guestOsFeatureBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGuestOsFeatureOrBuilderList() { + if (guestOsFeatureBuilder_ != null) { + return guestOsFeatureBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(guestOsFeature_); + } + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder addGuestOsFeatureBuilder() { + return internalGetGuestOsFeatureFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.GuestOsFeature.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder addGuestOsFeatureBuilder( + int index) { + return internalGetGuestOsFeatureFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.GuestOsFeature.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of features to enable in the guest operating system. This
+     * is applicable only for bootable images.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGuestOsFeatureBuilderList() { + return internalGetGuestOsFeatureFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder> + internalGetGuestOsFeatureFieldBuilder() { + if (guestOsFeatureBuilder_ == null) { + guestOsFeatureBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.GuestOsFeature, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder, + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder>( + guestOsFeature_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + guestOsFeature_ = null; + } + return guestOsFeatureBuilder_; + } + + private com.google.cloud.backupdr.v1beta.CustomerEncryptionKey diskEncryptionKey_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder> + diskEncryptionKeyBuilder_; + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskEncryptionKey field is set. + */ + public boolean hasDiskEncryptionKey() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskEncryptionKey. + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getDiskEncryptionKey() { + if (diskEncryptionKeyBuilder_ == null) { + return diskEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : diskEncryptionKey_; + } else { + return diskEncryptionKeyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDiskEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey value) { + if (diskEncryptionKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diskEncryptionKey_ = value; + } else { + diskEncryptionKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDiskEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder builderForValue) { + if (diskEncryptionKeyBuilder_ == null) { + diskEncryptionKey_ = builderForValue.build(); + } else { + diskEncryptionKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDiskEncryptionKey( + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey value) { + if (diskEncryptionKeyBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && diskEncryptionKey_ != null + && diskEncryptionKey_ + != com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance()) { + getDiskEncryptionKeyBuilder().mergeFrom(value); + } else { + diskEncryptionKey_ = value; + } + } else { + diskEncryptionKeyBuilder_.mergeFrom(value); + } + if (diskEncryptionKey_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDiskEncryptionKey() { + bitField0_ = (bitField0_ & ~0x00000040); + diskEncryptionKey_ = null; + if (diskEncryptionKeyBuilder_ != null) { + diskEncryptionKeyBuilder_.dispose(); + diskEncryptionKeyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder + getDiskEncryptionKeyBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetDiskEncryptionKeyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder + getDiskEncryptionKeyOrBuilder() { + if (diskEncryptionKeyBuilder_ != null) { + return diskEncryptionKeyBuilder_.getMessageOrBuilder(); + } else { + return diskEncryptionKey_ == null + ? com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.getDefaultInstance() + : diskEncryptionKey_; + } + } + + /** + * + * + *
+     * Optional. Encrypts the disk using a
+     * customer-supplied encryption key or a customer-managed encryption key.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder> + internalGetDiskEncryptionKeyFieldBuilder() { + if (diskEncryptionKeyBuilder_ == null) { + diskEncryptionKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey.Builder, + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder>( + getDiskEncryptionKey(), getParentForChildren(), isClean()); + diskEncryptionKey_ = null; + } + return diskEncryptionKeyBuilder_; + } + + private long physicalBlockSizeBytes_; + + /** + * + * + *
+     * Optional. Physical block size of the persistent disk, in bytes.
+     * If not present in a request, a default value is used.
+     * Currently, the supported size is 4096.
+     * 
+ * + * optional int64 physical_block_size_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the physicalBlockSizeBytes field is set. + */ + @java.lang.Override + public boolean hasPhysicalBlockSizeBytes() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. Physical block size of the persistent disk, in bytes.
+     * If not present in a request, a default value is used.
+     * Currently, the supported size is 4096.
+     * 
+ * + * optional int64 physical_block_size_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The physicalBlockSizeBytes. + */ + @java.lang.Override + public long getPhysicalBlockSizeBytes() { + return physicalBlockSizeBytes_; + } + + /** + * + * + *
+     * Optional. Physical block size of the persistent disk, in bytes.
+     * If not present in a request, a default value is used.
+     * Currently, the supported size is 4096.
+     * 
+ * + * optional int64 physical_block_size_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The physicalBlockSizeBytes to set. + * @return This builder for chaining. + */ + public Builder setPhysicalBlockSizeBytes(long value) { + + physicalBlockSizeBytes_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Physical block size of the persistent disk, in bytes.
+     * If not present in a request, a default value is used.
+     * Currently, the supported size is 4096.
+     * 
+ * + * optional int64 physical_block_size_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPhysicalBlockSizeBytes() { + bitField0_ = (bitField0_ & ~0x00000080); + physicalBlockSizeBytes_ = 0L; + onChanged(); + return this; + } + + private long provisionedIops_; + + /** + * + * + *
+     * Optional. Indicates how many IOPS to provision for the disk. This sets the
+     * number of I/O operations per second that the disk can handle.
+     * 
+ * + * optional int64 provisioned_iops = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the provisionedIops field is set. + */ + @java.lang.Override + public boolean hasProvisionedIops() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. Indicates how many IOPS to provision for the disk. This sets the
+     * number of I/O operations per second that the disk can handle.
+     * 
+ * + * optional int64 provisioned_iops = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The provisionedIops. + */ + @java.lang.Override + public long getProvisionedIops() { + return provisionedIops_; + } + + /** + * + * + *
+     * Optional. Indicates how many IOPS to provision for the disk. This sets the
+     * number of I/O operations per second that the disk can handle.
+     * 
+ * + * optional int64 provisioned_iops = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The provisionedIops to set. + * @return This builder for chaining. + */ + public Builder setProvisionedIops(long value) { + + provisionedIops_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates how many IOPS to provision for the disk. This sets the
+     * number of I/O operations per second that the disk can handle.
+     * 
+ * + * optional int64 provisioned_iops = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearProvisionedIops() { + bitField0_ = (bitField0_ & ~0x00000100); + provisionedIops_ = 0L; + onChanged(); + return this; + } + + private long provisionedThroughput_; + + /** + * + * + *
+     * Optional. Indicates how much throughput to provision for the disk. This
+     * sets the number of throughput MB per second that the disk can handle.
+     * 
+ * + * optional int64 provisioned_throughput = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provisionedThroughput field is set. + */ + @java.lang.Override + public boolean hasProvisionedThroughput() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. Indicates how much throughput to provision for the disk. This
+     * sets the number of throughput MB per second that the disk can handle.
+     * 
+ * + * optional int64 provisioned_throughput = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisionedThroughput. + */ + @java.lang.Override + public long getProvisionedThroughput() { + return provisionedThroughput_; + } + + /** + * + * + *
+     * Optional. Indicates how much throughput to provision for the disk. This
+     * sets the number of throughput MB per second that the disk can handle.
+     * 
+ * + * optional int64 provisioned_throughput = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The provisionedThroughput to set. + * @return This builder for chaining. + */ + public Builder setProvisionedThroughput(long value) { + + provisionedThroughput_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates how much throughput to provision for the disk. This
+     * sets the number of throughput MB per second that the disk can handle.
+     * 
+ * + * optional int64 provisioned_throughput = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearProvisionedThroughput() { + bitField0_ = (bitField0_ & ~0x00000200); + provisionedThroughput_ = 0L; + onChanged(); + return this; + } + + private boolean enableConfidentialCompute_; + + /** + * + * + *
+     * Optional. Indicates whether this disk is using confidential compute mode.
+     * Encryption with a Cloud KMS key is required to enable this option.
+     * 
+ * + * + * optional bool enable_confidential_compute = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableConfidentialCompute field is set. + */ + @java.lang.Override + public boolean hasEnableConfidentialCompute() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. Indicates whether this disk is using confidential compute mode.
+     * Encryption with a Cloud KMS key is required to enable this option.
+     * 
+ * + * + * optional bool enable_confidential_compute = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableConfidentialCompute. + */ + @java.lang.Override + public boolean getEnableConfidentialCompute() { + return enableConfidentialCompute_; + } + + /** + * + * + *
+     * Optional. Indicates whether this disk is using confidential compute mode.
+     * Encryption with a Cloud KMS key is required to enable this option.
+     * 
+ * + * + * optional bool enable_confidential_compute = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableConfidentialCompute to set. + * @return This builder for chaining. + */ + public Builder setEnableConfidentialCompute(boolean value) { + + enableConfidentialCompute_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates whether this disk is using confidential compute mode.
+     * Encryption with a Cloud KMS key is required to enable this option.
+     * 
+ * + * + * optional bool enable_confidential_compute = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableConfidentialCompute() { + bitField0_ = (bitField0_ & ~0x00000400); + enableConfidentialCompute_ = false; + onChanged(); + return this; + } + + private java.lang.Object storagePool_ = ""; + + /** + * + * + *
+     * Optional. The storage pool in which the new disk is created. You can
+     * provide this as a partial or full URL to the resource.
+     * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the storagePool field is set. + */ + public boolean hasStoragePool() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Optional. The storage pool in which the new disk is created. You can
+     * provide this as a partial or full URL to the resource.
+     * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The storagePool. + */ + public java.lang.String getStoragePool() { + java.lang.Object ref = storagePool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storagePool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The storage pool in which the new disk is created. You can
+     * provide this as a partial or full URL to the resource.
+     * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for storagePool. + */ + public com.google.protobuf.ByteString getStoragePoolBytes() { + java.lang.Object ref = storagePool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storagePool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The storage pool in which the new disk is created. You can
+     * provide this as a partial or full URL to the resource.
+     * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The storagePool to set. + * @return This builder for chaining. + */ + public Builder setStoragePool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + storagePool_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The storage pool in which the new disk is created. You can
+     * provide this as a partial or full URL to the resource.
+     * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearStoragePool() { + storagePool_ = getDefaultInstance().getStoragePool(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The storage pool in which the new disk is created. You can
+     * provide this as a partial or full URL to the resource.
+     * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for storagePool to set. + * @return This builder for chaining. + */ + public Builder setStoragePoolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + storagePool_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private int accessMode_ = 0; + + /** + * + * + *
+     * Optional. The access mode of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the accessMode field is set. + */ + @java.lang.Override + public boolean hasAccessMode() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Optional. The access mode of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for accessMode. + */ + @java.lang.Override + public int getAccessModeValue() { + return accessMode_; + } + + /** + * + * + *
+     * Optional. The access mode of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for accessMode to set. + * @return This builder for chaining. + */ + public Builder setAccessModeValue(int value) { + accessMode_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The access mode of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessMode. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode getAccessMode() { + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode result = + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode.forNumber(accessMode_); + return result == null + ? com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The access mode of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The accessMode to set. + * @return This builder for chaining. + */ + public Builder setAccessMode( + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + accessMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The access mode of the disk.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAccessMode() { + bitField0_ = (bitField0_ & ~0x00001000); + accessMode_ = 0; + onChanged(); + return this; + } + + private int architecture_ = 0; + + /** + * + * + *
+     * Optional. The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the architecture field is set. + */ + @java.lang.Override + public boolean hasArchitecture() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+     * Optional. The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for architecture. + */ + @java.lang.Override + public int getArchitectureValue() { + return architecture_; + } + + /** + * + * + *
+     * Optional. The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureValue(int value) { + architecture_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The architecture. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture getArchitecture() { + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture result = + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture.forNumber( + architecture_); + return result == null + ? com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture( + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + architecture_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The architecture of the source disk. Valid values are
+     * ARM64 or X86_64.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + bitField0_ = (bitField0_ & ~0x00002000); + architecture_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList resourcePolicy_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureResourcePolicyIsMutable() { + if (!resourcePolicy_.isModifiable()) { + resourcePolicy_ = new com.google.protobuf.LazyStringArrayList(resourcePolicy_); + } + bitField0_ |= 0x00004000; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the resourcePolicy. + */ + public com.google.protobuf.ProtocolStringList getResourcePolicyList() { + resourcePolicy_.makeImmutable(); + return resourcePolicy_; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of resourcePolicy. + */ + public int getResourcePolicyCount() { + return resourcePolicy_.size(); + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The resourcePolicy at the given index. + */ + public java.lang.String getResourcePolicy(int index) { + return resourcePolicy_.get(index); + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the resourcePolicy at the given index. + */ + public com.google.protobuf.ByteString getResourcePolicyBytes(int index) { + return resourcePolicy_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The resourcePolicy to set. + * @return This builder for chaining. + */ + public Builder setResourcePolicy(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcePolicyIsMutable(); + resourcePolicy_.set(index, value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The resourcePolicy to add. + * @return This builder for chaining. + */ + public Builder addResourcePolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcePolicyIsMutable(); + resourcePolicy_.add(value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The resourcePolicy to add. + * @return This builder for chaining. + */ + public Builder addAllResourcePolicy(java.lang.Iterable values) { + ensureResourcePolicyIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourcePolicy_); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearResourcePolicy() { + resourcePolicy_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource policies applied to this disk.
+     * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the resourcePolicy to add. + * @return This builder for chaining. + */ + public Builder addResourcePolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourcePolicyIsMutable(); + resourcePolicy_.add(value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * Required. URL of the disk type resource describing which disk type to use
+     * to create the disk.
+     * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the type field is set. + */ + public boolean hasType() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+     * Required. URL of the disk type resource describing which disk type to use
+     * to create the disk.
+     * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. URL of the disk type resource describing which disk type to use
+     * to create the disk.
+     * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. URL of the disk type resource describing which disk type to use
+     * to create the disk.
+     * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. URL of the disk type resource describing which disk type to use
+     * to create the disk.
+     * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. URL of the disk type resource describing which disk type to use
+     * to create the disk.
+     * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00008000; + 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_ |= 0x00010000; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be modified later using
+     * <code>setLabels</code> method. Label values can be empty.
+     * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be modified later using
+     * <code>setLabels</code> method. Label values can be empty.
+     * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be modified later using
+     * <code>setLabels</code> method. Label values can be empty.
+     * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be modified later using
+     * <code>setLabels</code> method. Label values can be empty.
+     * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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_ & ~0x00010000); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be modified later using
+     * <code>setLabels</code> method. Label values can be empty.
+     * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00010000; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be modified later using
+     * <code>setLabels</code> method. Label values can be empty.
+     * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00010000; + return this; + } + + /** + * + * + *
+     * Optional. Labels to apply to this disk. These can be modified later using
+     * <code>setLabels</code> method. Label values can be empty.
+     * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00010000; + return this; + } + + private com.google.protobuf.MapField resourceManagerTags_; + + private com.google.protobuf.MapField + internalGetResourceManagerTags() { + if (resourceManagerTags_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourceManagerTagsDefaultEntryHolder.defaultEntry); + } + return resourceManagerTags_; + } + + private com.google.protobuf.MapField + internalGetMutableResourceManagerTags() { + if (resourceManagerTags_ == null) { + resourceManagerTags_ = + com.google.protobuf.MapField.newMapField( + ResourceManagerTagsDefaultEntryHolder.defaultEntry); + } + if (!resourceManagerTags_.isMutable()) { + resourceManagerTags_ = resourceManagerTags_.copy(); + } + bitField0_ |= 0x00020000; + onChanged(); + return resourceManagerTags_; + } + + public int getResourceManagerTagsCount() { + return internalGetResourceManagerTags().getMap().size(); + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the disk.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsResourceManagerTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetResourceManagerTags().getMap().containsKey(key); + } + + /** Use {@link #getResourceManagerTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResourceManagerTags() { + return getResourceManagerTagsMap(); + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the disk.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getResourceManagerTagsMap() { + return internalGetResourceManagerTags().getMap(); + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the disk.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getResourceManagerTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetResourceManagerTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the disk.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getResourceManagerTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetResourceManagerTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearResourceManagerTags() { + bitField0_ = (bitField0_ & ~0x00020000); + internalGetMutableResourceManagerTags().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the disk.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeResourceManagerTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableResourceManagerTags().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableResourceManagerTags() { + bitField0_ |= 0x00020000; + return internalGetMutableResourceManagerTags().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the disk.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putResourceManagerTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableResourceManagerTags().getMutableMap().put(key, value); + bitField0_ |= 0x00020000; + return this; + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the disk.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllResourceManagerTags( + java.util.Map values) { + internalGetMutableResourceManagerTags().getMutableMap().putAll(values); + bitField0_ |= 0x00020000; + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DiskRestoreProperties) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DiskRestoreProperties) + private static final com.google.cloud.backupdr.v1beta.DiskRestoreProperties DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DiskRestoreProperties(); + } + + public static com.google.cloud.backupdr.v1beta.DiskRestoreProperties getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskRestoreProperties 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.backupdr.v1beta.DiskRestoreProperties getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskRestorePropertiesOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskRestorePropertiesOrBuilder.java new file mode 100644 index 000000000000..61c4f5c16fe9 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskRestorePropertiesOrBuilder.java @@ -0,0 +1,855 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DiskRestorePropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DiskRestoreProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Options for creating a disk from a source Compute Instance backup.
+   * 
+ * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + * + * @return Whether the instanceBackupSource field is set. + */ + boolean hasInstanceBackupSource(); + + /** + * + * + *
+   * Options for creating a disk from a source Compute Instance backup.
+   * 
+ * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + * + * @return The instanceBackupSource. + */ + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions getInstanceBackupSource(); + + /** + * + * + *
+   * Options for creating a disk from a source Compute Instance backup.
+   * 
+ * + * .google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions instance_backup_source = 19; + * + */ + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptionsOrBuilder + getInstanceBackupSourceOrBuilder(); + + /** + * + * + *
+   * Required. Name of the disk.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the name field is set. + */ + boolean hasName(); + + /** + * + * + *
+   * Required. Name of the disk.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the disk.
+   * 
+ * + * optional string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the description field is set. + */ + boolean hasDescription(); + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this property
+   * when you create the resource.
+   * 
+ * + * optional string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The size of the disk in GB.
+   * 
+ * + * optional int64 size_gb = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the sizeGb field is set. + */ + boolean hasSizeGb(); + + /** + * + * + *
+   * Required. The size of the disk in GB.
+   * 
+ * + * optional int64 size_gb = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sizeGb. + */ + long getSizeGb(); + + /** + * + * + *
+   * Optional. A list of publicly available licenses that are applicable to this
+   * backup. This is applicable if the original image had licenses attached,
+   * e.g. Windows image
+   * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the licenses. + */ + java.util.List getLicensesList(); + + /** + * + * + *
+   * Optional. A list of publicly available licenses that are applicable to this
+   * backup. This is applicable if the original image had licenses attached,
+   * e.g. Windows image
+   * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of licenses. + */ + int getLicensesCount(); + + /** + * + * + *
+   * Optional. A list of publicly available licenses that are applicable to this
+   * backup. This is applicable if the original image had licenses attached,
+   * e.g. Windows image
+   * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The licenses at the given index. + */ + java.lang.String getLicenses(int index); + + /** + * + * + *
+   * Optional. A list of publicly available licenses that are applicable to this
+   * backup. This is applicable if the original image had licenses attached,
+   * e.g. Windows image
+   * 
+ * + * repeated string licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the licenses at the given index. + */ + com.google.protobuf.ByteString getLicensesBytes(int index); + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getGuestOsFeatureList(); + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.GuestOsFeature getGuestOsFeature(int index); + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getGuestOsFeatureCount(); + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getGuestOsFeatureOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of features to enable in the guest operating system. This
+   * is applicable only for bootable images.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.GuestOsFeature guest_os_feature = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder getGuestOsFeatureOrBuilder(int index); + + /** + * + * + *
+   * Optional. Encrypts the disk using a
+   * customer-supplied encryption key or a customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the diskEncryptionKey field is set. + */ + boolean hasDiskEncryptionKey(); + + /** + * + * + *
+   * Optional. Encrypts the disk using a
+   * customer-supplied encryption key or a customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The diskEncryptionKey. + */ + com.google.cloud.backupdr.v1beta.CustomerEncryptionKey getDiskEncryptionKey(); + + /** + * + * + *
+   * Optional. Encrypts the disk using a
+   * customer-supplied encryption key or a customer-managed encryption key.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.CustomerEncryptionKey disk_encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.CustomerEncryptionKeyOrBuilder getDiskEncryptionKeyOrBuilder(); + + /** + * + * + *
+   * Optional. Physical block size of the persistent disk, in bytes.
+   * If not present in a request, a default value is used.
+   * Currently, the supported size is 4096.
+   * 
+ * + * optional int64 physical_block_size_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the physicalBlockSizeBytes field is set. + */ + boolean hasPhysicalBlockSizeBytes(); + + /** + * + * + *
+   * Optional. Physical block size of the persistent disk, in bytes.
+   * If not present in a request, a default value is used.
+   * Currently, the supported size is 4096.
+   * 
+ * + * optional int64 physical_block_size_bytes = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The physicalBlockSizeBytes. + */ + long getPhysicalBlockSizeBytes(); + + /** + * + * + *
+   * Optional. Indicates how many IOPS to provision for the disk. This sets the
+   * number of I/O operations per second that the disk can handle.
+   * 
+ * + * optional int64 provisioned_iops = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the provisionedIops field is set. + */ + boolean hasProvisionedIops(); + + /** + * + * + *
+   * Optional. Indicates how many IOPS to provision for the disk. This sets the
+   * number of I/O operations per second that the disk can handle.
+   * 
+ * + * optional int64 provisioned_iops = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The provisionedIops. + */ + long getProvisionedIops(); + + /** + * + * + *
+   * Optional. Indicates how much throughput to provision for the disk. This
+   * sets the number of throughput MB per second that the disk can handle.
+   * 
+ * + * optional int64 provisioned_throughput = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provisionedThroughput field is set. + */ + boolean hasProvisionedThroughput(); + + /** + * + * + *
+   * Optional. Indicates how much throughput to provision for the disk. This
+   * sets the number of throughput MB per second that the disk can handle.
+   * 
+ * + * optional int64 provisioned_throughput = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisionedThroughput. + */ + long getProvisionedThroughput(); + + /** + * + * + *
+   * Optional. Indicates whether this disk is using confidential compute mode.
+   * Encryption with a Cloud KMS key is required to enable this option.
+   * 
+ * + * optional bool enable_confidential_compute = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the enableConfidentialCompute field is set. + */ + boolean hasEnableConfidentialCompute(); + + /** + * + * + *
+   * Optional. Indicates whether this disk is using confidential compute mode.
+   * Encryption with a Cloud KMS key is required to enable this option.
+   * 
+ * + * optional bool enable_confidential_compute = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableConfidentialCompute. + */ + boolean getEnableConfidentialCompute(); + + /** + * + * + *
+   * Optional. The storage pool in which the new disk is created. You can
+   * provide this as a partial or full URL to the resource.
+   * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the storagePool field is set. + */ + boolean hasStoragePool(); + + /** + * + * + *
+   * Optional. The storage pool in which the new disk is created. You can
+   * provide this as a partial or full URL to the resource.
+   * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The storagePool. + */ + java.lang.String getStoragePool(); + + /** + * + * + *
+   * Optional. The storage pool in which the new disk is created. You can
+   * provide this as a partial or full URL to the resource.
+   * 
+ * + * + * optional string storage_pool = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for storagePool. + */ + com.google.protobuf.ByteString getStoragePoolBytes(); + + /** + * + * + *
+   * Optional. The access mode of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the accessMode field is set. + */ + boolean hasAccessMode(); + + /** + * + * + *
+   * Optional. The access mode of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for accessMode. + */ + int getAccessModeValue(); + + /** + * + * + *
+   * Optional. The access mode of the disk.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode access_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessMode. + */ + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.AccessMode getAccessMode(); + + /** + * + * + *
+   * Optional. The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the architecture field is set. + */ + boolean hasArchitecture(); + + /** + * + * + *
+   * Optional. The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for architecture. + */ + int getArchitectureValue(); + + /** + * + * + *
+   * Optional. The architecture of the source disk. Valid values are
+   * ARM64 or X86_64.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture architecture = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The architecture. + */ + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Architecture getArchitecture(); + + /** + * + * + *
+   * Optional. Resource policies applied to this disk.
+   * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the resourcePolicy. + */ + java.util.List getResourcePolicyList(); + + /** + * + * + *
+   * Optional. Resource policies applied to this disk.
+   * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of resourcePolicy. + */ + int getResourcePolicyCount(); + + /** + * + * + *
+   * Optional. Resource policies applied to this disk.
+   * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The resourcePolicy at the given index. + */ + java.lang.String getResourcePolicy(int index); + + /** + * + * + *
+   * Optional. Resource policies applied to this disk.
+   * 
+ * + * repeated string resource_policy = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the resourcePolicy at the given index. + */ + com.google.protobuf.ByteString getResourcePolicyBytes(int index); + + /** + * + * + *
+   * Required. URL of the disk type resource describing which disk type to use
+   * to create the disk.
+   * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
+   * Required. URL of the disk type resource describing which disk type to use
+   * to create the disk.
+   * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * Required. URL of the disk type resource describing which disk type to use
+   * to create the disk.
+   * 
+ * + * optional string type = 16 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels to apply to this disk. These can be modified later using
+   * <code>setLabels</code> method. Label values can be empty.
+   * 
+ * + * map<string, string> labels = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getResourceManagerTagsCount(); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsResourceManagerTags(java.lang.String key); + + /** Use {@link #getResourceManagerTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getResourceManagerTags(); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getResourceManagerTagsMap(); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getResourceManagerTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the disk.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getResourceManagerTagsOrThrow(java.lang.String key); + + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.SourceOptionsCase getSourceOptionsCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskTargetEnvironment.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskTargetEnvironment.java new file mode 100644 index 000000000000..40d182a37c25 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskTargetEnvironment.java @@ -0,0 +1,934 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * DiskTargetEnvironment represents the target environment for the disk.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskTargetEnvironment} + */ +@com.google.protobuf.Generated +public final class DiskTargetEnvironment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DiskTargetEnvironment) + DiskTargetEnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DiskTargetEnvironment"); + } + + // Use DiskTargetEnvironment.newBuilder() to construct. + private DiskTargetEnvironment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DiskTargetEnvironment() { + project_ = ""; + zone_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskTargetEnvironment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskTargetEnvironment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.class, + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object project_ = ""; + + /** + * + * + *
+   * Required. Target project for the disk.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + 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(); + project_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Target project for the disk.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + + /** + * + * + *
+   * Required. Target zone for the disk.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + 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(); + zone_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Target zone for the disk.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USE_PROJECT_SERVICE_ACCOUNT_FIELD_NUMBER = 3; + private boolean useProjectServiceAccount_ = false; + + /** + * + * + *
+   * Optional. Whether to use the project service account for the disk restore.
+   * 
+ * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + @java.lang.Override + public boolean hasUseProjectServiceAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Whether to use the project service account for the disk restore.
+   * 
+ * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + @java.lang.Override + public boolean getUseProjectServiceAccount() { + return useProjectServiceAccount_; + } + + 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.GeneratedMessage.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, project_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, zone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(3, useProjectServiceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, project_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, zone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, useProjectServiceAccount_); + } + 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.backupdr.v1beta.DiskTargetEnvironment)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment other = + (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) obj; + + if (!getProject().equals(other.getProject())) return false; + if (!getZone().equals(other.getZone())) return false; + if (hasUseProjectServiceAccount() != other.hasUseProjectServiceAccount()) return false; + if (hasUseProjectServiceAccount()) { + if (getUseProjectServiceAccount() != other.getUseProjectServiceAccount()) 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) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + if (hasUseProjectServiceAccount()) { + hash = (37 * hash) + USE_PROJECT_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseProjectServiceAccount()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment 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.backupdr.v1beta.DiskTargetEnvironment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment 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.backupdr.v1beta.DiskTargetEnvironment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DiskTargetEnvironment 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * DiskTargetEnvironment represents the target environment for the disk.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DiskTargetEnvironment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DiskTargetEnvironment) + com.google.cloud.backupdr.v1beta.DiskTargetEnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskTargetEnvironment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskTargetEnvironment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.class, + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + project_ = ""; + zone_ = ""; + useProjectServiceAccount_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_DiskTargetEnvironment_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskTargetEnvironment getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskTargetEnvironment build() { + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskTargetEnvironment buildPartial() { + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment result = + new com.google.cloud.backupdr.v1beta.DiskTargetEnvironment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DiskTargetEnvironment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.project_ = project_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.zone_ = zone_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.useProjectServiceAccount_ = useProjectServiceAccount_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DiskTargetEnvironment other) { + if (other == com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance()) + return this; + if (!other.getProject().isEmpty()) { + project_ = other.project_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasUseProjectServiceAccount()) { + setUseProjectServiceAccount(other.getUseProjectServiceAccount()); + } + 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: + { + project_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + useProjectServiceAccount_ = 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 java.lang.Object project_ = ""; + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProject() { + project_ = getDefaultInstance().getProject(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + + /** + * + * + *
+     * Required. Target zone for the disk.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Target zone for the disk.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Target zone for the disk.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target zone for the disk.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target zone for the disk.
+     * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean useProjectServiceAccount_; + + /** + * + * + *
+     * Optional. Whether to use the project service account for the disk restore.
+     * 
+ * + * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + @java.lang.Override + public boolean hasUseProjectServiceAccount() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the disk restore.
+     * 
+ * + * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + @java.lang.Override + public boolean getUseProjectServiceAccount() { + return useProjectServiceAccount_; + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the disk restore.
+     * 
+ * + * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The useProjectServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setUseProjectServiceAccount(boolean value) { + + useProjectServiceAccount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the disk restore.
+     * 
+ * + * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearUseProjectServiceAccount() { + bitField0_ = (bitField0_ & ~0x00000004); + useProjectServiceAccount_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DiskTargetEnvironment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DiskTargetEnvironment) + private static final com.google.cloud.backupdr.v1beta.DiskTargetEnvironment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DiskTargetEnvironment(); + } + + public static com.google.cloud.backupdr.v1beta.DiskTargetEnvironment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DiskTargetEnvironment 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.backupdr.v1beta.DiskTargetEnvironment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskTargetEnvironmentOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskTargetEnvironmentOrBuilder.java new file mode 100644 index 000000000000..76c3335431e7 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DiskTargetEnvironmentOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DiskTargetEnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DiskTargetEnvironment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Target project for the disk.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + java.lang.String getProject(); + + /** + * + * + *
+   * Required. Target project for the disk.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * Required. Target zone for the disk.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The zone. + */ + java.lang.String getZone(); + + /** + * + * + *
+   * Required. Target zone for the disk.
+   * 
+ * + * string zone = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Optional. Whether to use the project service account for the disk restore.
+   * 
+ * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + boolean hasUseProjectServiceAccount(); + + /** + * + * + *
+   * Optional. Whether to use the project service account for the disk restore.
+   * 
+ * + * optional bool use_project_service_account = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + boolean getUseProjectServiceAccount(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DisplayDevice.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DisplayDevice.java new file mode 100644 index 000000000000..17208ddaf77d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DisplayDevice.java @@ -0,0 +1,543 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A set of Display Device options
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DisplayDevice} + */ +@com.google.protobuf.Generated +public final class DisplayDevice extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.DisplayDevice) + DisplayDeviceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DisplayDevice"); + } + + // Use DisplayDevice.newBuilder() to construct. + private DisplayDevice(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DisplayDevice() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_DisplayDevice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_DisplayDevice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DisplayDevice.class, + com.google.cloud.backupdr.v1beta.DisplayDevice.Builder.class); + } + + private int bitField0_; + public static final int ENABLE_DISPLAY_FIELD_NUMBER = 1; + private boolean enableDisplay_ = false; + + /** + * + * + *
+   * Optional. Enables display for the Compute Engine VM
+   * 
+ * + * optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableDisplay field is set. + */ + @java.lang.Override + public boolean hasEnableDisplay() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Enables display for the Compute Engine VM
+   * 
+ * + * optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableDisplay. + */ + @java.lang.Override + public boolean getEnableDisplay() { + return enableDisplay_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(1, enableDisplay_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableDisplay_); + } + 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.backupdr.v1beta.DisplayDevice)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.DisplayDevice other = + (com.google.cloud.backupdr.v1beta.DisplayDevice) obj; + + if (hasEnableDisplay() != other.hasEnableDisplay()) return false; + if (hasEnableDisplay()) { + if (getEnableDisplay() != other.getEnableDisplay()) 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 (hasEnableDisplay()) { + hash = (37 * hash) + ENABLE_DISPLAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDisplay()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice 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.backupdr.v1beta.DisplayDevice parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice 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.backupdr.v1beta.DisplayDevice parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DisplayDevice 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A set of Display Device options
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.DisplayDevice} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.DisplayDevice) + com.google.cloud.backupdr.v1beta.DisplayDeviceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_DisplayDevice_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_DisplayDevice_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.DisplayDevice.class, + com.google.cloud.backupdr.v1beta.DisplayDevice.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.DisplayDevice.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableDisplay_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_DisplayDevice_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DisplayDevice getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.DisplayDevice.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DisplayDevice build() { + com.google.cloud.backupdr.v1beta.DisplayDevice result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DisplayDevice buildPartial() { + com.google.cloud.backupdr.v1beta.DisplayDevice result = + new com.google.cloud.backupdr.v1beta.DisplayDevice(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.DisplayDevice result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableDisplay_ = enableDisplay_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.DisplayDevice) { + return mergeFrom((com.google.cloud.backupdr.v1beta.DisplayDevice) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.DisplayDevice other) { + if (other == com.google.cloud.backupdr.v1beta.DisplayDevice.getDefaultInstance()) return this; + if (other.hasEnableDisplay()) { + setEnableDisplay(other.getEnableDisplay()); + } + 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 8: + { + enableDisplay_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 boolean enableDisplay_; + + /** + * + * + *
+     * Optional. Enables display for the Compute Engine VM
+     * 
+ * + * optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableDisplay field is set. + */ + @java.lang.Override + public boolean hasEnableDisplay() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Enables display for the Compute Engine VM
+     * 
+ * + * optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableDisplay. + */ + @java.lang.Override + public boolean getEnableDisplay() { + return enableDisplay_; + } + + /** + * + * + *
+     * Optional. Enables display for the Compute Engine VM
+     * 
+ * + * optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableDisplay to set. + * @return This builder for chaining. + */ + public Builder setEnableDisplay(boolean value) { + + enableDisplay_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Enables display for the Compute Engine VM
+     * 
+ * + * optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableDisplay() { + bitField0_ = (bitField0_ & ~0x00000001); + enableDisplay_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.DisplayDevice) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.DisplayDevice) + private static final com.google.cloud.backupdr.v1beta.DisplayDevice DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.DisplayDevice(); + } + + public static com.google.cloud.backupdr.v1beta.DisplayDevice getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisplayDevice 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.backupdr.v1beta.DisplayDevice getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DisplayDeviceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DisplayDeviceOrBuilder.java new file mode 100644 index 000000000000..d290e027b65f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/DisplayDeviceOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface DisplayDeviceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.DisplayDevice) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Enables display for the Compute Engine VM
+   * 
+ * + * optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the enableDisplay field is set. + */ + boolean hasEnableDisplay(); + + /** + * + * + *
+   * Optional. Enables display for the Compute Engine VM
+   * 
+ * + * optional bool enable_display = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableDisplay. + */ + boolean getEnableDisplay(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Entry.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Entry.java new file mode 100644 index 000000000000..1ad9a3454266 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Entry.java @@ -0,0 +1,887 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A key/value pair to be used for storing metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Entry} + */ +@com.google.protobuf.Generated +public final class Entry extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.Entry) + EntryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Entry"); + } + + // Use Entry.newBuilder() to construct. + private Entry(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Entry() { + key_ = ""; + value_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Entry.class, + com.google.cloud.backupdr.v1beta.Entry.Builder.class); + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
+   * Optional. Key for the metadata entry.
+   * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Key for the metadata entry.
+   * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Key for the metadata entry.
+   * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; + + /** + * + * + *
+   * Optional. Value for the metadata entry. These are free-form strings, and
+   * only have meaning as interpreted by the image running in the instance. The
+   * only restriction placed on values is that their size must be less than
+   * or equal to 262144 bytes (256 KiB).
+   * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Value for the metadata entry. These are free-form strings, and
+   * only have meaning as interpreted by the image running in the instance. The
+   * only restriction placed on values is that their size must be less than
+   * or equal to 262144 bytes (256 KiB).
+   * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Value for the metadata entry. These are free-form strings, and
+   * only have meaning as interpreted by the image running in the instance. The
+   * only restriction placed on values is that their size must be less than
+   * or equal to 262144 bytes (256 KiB).
+   * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, value_); + } + 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.backupdr.v1beta.Entry)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.Entry other = (com.google.cloud.backupdr.v1beta.Entry) obj; + + if (hasKey() != other.hasKey()) return false; + if (hasKey()) { + if (!getKey().equals(other.getKey())) return false; + } + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) 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 (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.Entry parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Entry 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.backupdr.v1beta.Entry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Entry 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.backupdr.v1beta.Entry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Entry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Entry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Entry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Entry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Entry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Entry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Entry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.Entry 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A key/value pair to be used for storing metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Entry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.Entry) + com.google.cloud.backupdr.v1beta.EntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Entry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Entry.class, + com.google.cloud.backupdr.v1beta.Entry.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.Entry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + value_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Entry_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Entry getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.Entry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Entry build() { + com.google.cloud.backupdr.v1beta.Entry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Entry buildPartial() { + com.google.cloud.backupdr.v1beta.Entry result = + new com.google.cloud.backupdr.v1beta.Entry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.Entry result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.Entry) { + return mergeFrom((com.google.cloud.backupdr.v1beta.Entry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.Entry other) { + if (other == com.google.cloud.backupdr.v1beta.Entry.getDefaultInstance()) return this; + if (other.hasKey()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasValue()) { + value_ = other.value_; + bitField0_ |= 0x00000002; + 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: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + value_ = input.readStringRequireUtf8(); + 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 java.lang.Object key_ = ""; + + /** + * + * + *
+     * Optional. Key for the metadata entry.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Key for the metadata entry.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Key for the metadata entry.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Key for the metadata entry.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Key for the metadata entry.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Key for the metadata entry.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + + /** + * + * + *
+     * Optional. Value for the metadata entry. These are free-form strings, and
+     * only have meaning as interpreted by the image running in the instance. The
+     * only restriction placed on values is that their size must be less than
+     * or equal to 262144 bytes (256 KiB).
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Value for the metadata entry. These are free-form strings, and
+     * only have meaning as interpreted by the image running in the instance. The
+     * only restriction placed on values is that their size must be less than
+     * or equal to 262144 bytes (256 KiB).
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Value for the metadata entry. These are free-form strings, and
+     * only have meaning as interpreted by the image running in the instance. The
+     * only restriction placed on values is that their size must be less than
+     * or equal to 262144 bytes (256 KiB).
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Value for the metadata entry. These are free-form strings, and
+     * only have meaning as interpreted by the image running in the instance. The
+     * only restriction placed on values is that their size must be less than
+     * or equal to 262144 bytes (256 KiB).
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Value for the metadata entry. These are free-form strings, and
+     * only have meaning as interpreted by the image running in the instance. The
+     * only restriction placed on values is that their size must be less than
+     * or equal to 262144 bytes (256 KiB).
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Value for the metadata entry. These are free-form strings, and
+     * only have meaning as interpreted by the image running in the instance. The
+     * only restriction placed on values is that their size must be less than
+     * or equal to 262144 bytes (256 KiB).
+     * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.Entry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.Entry) + private static final com.google.cloud.backupdr.v1beta.Entry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.Entry(); + } + + public static com.google.cloud.backupdr.v1beta.Entry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entry 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.backupdr.v1beta.Entry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/EntryOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/EntryOrBuilder.java new file mode 100644 index 000000000000..c56783d128e1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/EntryOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface EntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.Entry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Key for the metadata entry.
+   * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + boolean hasKey(); + + /** + * + * + *
+   * Optional. Key for the metadata entry.
+   * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
+   * Optional. Key for the metadata entry.
+   * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * Optional. Value for the metadata entry. These are free-form strings, and
+   * only have meaning as interpreted by the image running in the instance. The
+   * only restriction placed on values is that their size must be less than
+   * or equal to 262144 bytes (256 KiB).
+   * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + + /** + * + * + *
+   * Optional. Value for the metadata entry. These are free-form strings, and
+   * only have meaning as interpreted by the image running in the instance. The
+   * only restriction placed on values is that their size must be less than
+   * or equal to 262144 bytes (256 KiB).
+   * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The value. + */ + java.lang.String getValue(); + + /** + * + * + *
+   * Optional. Value for the metadata entry. These are free-form strings, and
+   * only have meaning as interpreted by the image running in the instance. The
+   * only restriction placed on values is that their size must be less than
+   * or equal to 262144 bytes (256 KiB).
+   * 
+ * + * optional string value = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeRequest.java new file mode 100644 index 000000000000..ebfbb3fe6cb6 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeRequest.java @@ -0,0 +1,1657 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request for the FetchBackupPlanAssociationsForResourceType method.
+ * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest} + */ +@com.google.protobuf.Generated +public final class FetchBackupPlanAssociationsForResourceTypeRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) + FetchBackupPlanAssociationsForResourceTypeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FetchBackupPlanAssociationsForResourceTypeRequest"); + } + + // Use FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder() to construct. + private FetchBackupPlanAssociationsForResourceTypeRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchBackupPlanAssociationsForResourceTypeRequest() { + parent_ = ""; + resourceType_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + .class, + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + .Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/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 parent resource name.
+   * Format: projects/{project}/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 RESOURCE_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + + /** + * + * + *
+   * Required. The type of the Google Cloud resource.
+   * Ex: sql.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The type of the Google Cloud resource.
+   * Ex: sql.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of BackupPlanAssociations to return. The
+   * service may return fewer than this value. If unspecified, at most 50
+   * BackupPlanAssociations will be returned. The maximum value is 100; values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchBackupPlanAssociationsForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchBackupPlanAssociationsForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchBackupPlanAssociationsForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchBackupPlanAssociationsForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * resource
+   * * backup_plan
+   * * state
+   * * data_source
+   * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * resource
+   * * backup_plan
+   * * state
+   * * data_source
+   * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceType_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceType_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, 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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest other = + (com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getResourceType().equals(other.getResourceType())) 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) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + 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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + 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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for the FetchBackupPlanAssociationsForResourceType method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + .class, + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + resourceType_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + build() { + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + buildPartial() { + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest result = + new com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + 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: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + 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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 resourceType_ = ""; + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of BackupPlanAssociations to return. The
+     * service may return fewer than this value. If unspecified, at most 50
+     * BackupPlanAssociations will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of BackupPlanAssociations to return. The
+     * service may return fewer than this value. If unspecified, at most 50
+     * BackupPlanAssociations will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of BackupPlanAssociations to return. The
+     * service may return fewer than this value. If unspecified, at most 50
+     * BackupPlanAssociations will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupPlanAssociationsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupPlanAssociationsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupPlanAssociationsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupPlanAssociationsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupPlanAssociationsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupPlanAssociationsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupPlanAssociationsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupPlanAssociationsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupPlanAssociationsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupPlanAssociationsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * resource
+     * * backup_plan
+     * * state
+     * * data_source
+     * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * resource
+     * * backup_plan
+     * * state
+     * * data_source
+     * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * resource
+     * * backup_plan
+     * * state
+     * * data_source
+     * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * resource
+     * * backup_plan
+     * * state
+     * * data_source
+     * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * resource
+     * * backup_plan
+     * * state
+     * * data_source
+     * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) + private static final com.google.cloud.backupdr.v1beta + .FetchBackupPlanAssociationsForResourceTypeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser< + FetchBackupPlanAssociationsForResourceTypeRequest>() { + @java.lang.Override + public FetchBackupPlanAssociationsForResourceTypeRequest 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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeRequestOrBuilder.java new file mode 100644 index 000000000000..d2b3eab868e1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeRequestOrBuilder.java @@ -0,0 +1,218 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface FetchBackupPlanAssociationsForResourceTypeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/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 type of the Google Cloud resource.
+   * Ex: sql.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + + /** + * + * + *
+   * Required. The type of the Google Cloud resource.
+   * Ex: sql.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+   * Optional. The maximum number of BackupPlanAssociations to return. The
+   * service may return fewer than this value. If unspecified, at most 50
+   * BackupPlanAssociations will be returned. The maximum value is 100; values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchBackupPlanAssociationsForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchBackupPlanAssociationsForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchBackupPlanAssociationsForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchBackupPlanAssociationsForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * resource
+   * * backup_plan
+   * * state
+   * * data_source
+   * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * resource
+   * * backup_plan
+   * * state
+   * * data_source
+   * * cloud_sql_instance_backup_plan_association_properties.instance_create_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeResponse.java new file mode 100644 index 000000000000..2f12700d8d7b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeResponse.java @@ -0,0 +1,1234 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response for the FetchBackupPlanAssociationsForResourceType method.
+ * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse} + */ +@com.google.protobuf.Generated +public final class FetchBackupPlanAssociationsForResourceTypeResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) + FetchBackupPlanAssociationsForResourceTypeResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FetchBackupPlanAssociationsForResourceTypeResponse"); + } + + // Use FetchBackupPlanAssociationsForResourceTypeResponse.newBuilder() to construct. + private FetchBackupPlanAssociationsForResourceTypeResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchBackupPlanAssociationsForResourceTypeResponse() { + backupPlanAssociations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + .class, + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + .Builder.class); + } + + public static final int BACKUP_PLAN_ASSOCIATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + backupPlanAssociations_; + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanAssociationsList() { + return backupPlanAssociations_; + } + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanAssociationsOrBuilderList() { + return backupPlanAssociations_; + } + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getBackupPlanAssociationsCount() { + return backupPlanAssociations_.size(); + } + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociations( + int index) { + return backupPlanAssociations_.get(index); + } + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationsOrBuilder(int index) { + return backupPlanAssociations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * Output only. A token, which can be sent as `page_token` to retrieve the
+   * next page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+   * Output only. A token, which can be sent as `page_token` to retrieve the
+   * next page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + 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 < backupPlanAssociations_.size(); i++) { + output.writeMessage(1, backupPlanAssociations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < backupPlanAssociations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, backupPlanAssociations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse other = + (com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) obj; + + if (!getBackupPlanAssociationsList().equals(other.getBackupPlanAssociationsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getBackupPlanAssociationsCount() > 0) { + hash = (37 * hash) + BACKUP_PLAN_ASSOCIATIONS_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanAssociationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + 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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + 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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for the FetchBackupPlanAssociationsForResourceType method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + .class, + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupPlanAssociationsBuilder_ == null) { + backupPlanAssociations_ = java.util.Collections.emptyList(); + } else { + backupPlanAssociations_ = null; + backupPlanAssociationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupPlanAssociationsForResourceTypeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + build() { + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + buildPartial() { + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse result = + new com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + result) { + if (backupPlanAssociationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backupPlanAssociations_ = java.util.Collections.unmodifiableList(backupPlanAssociations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backupPlanAssociations_ = backupPlanAssociations_; + } else { + result.backupPlanAssociations_ = backupPlanAssociationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + .getDefaultInstance()) return this; + if (backupPlanAssociationsBuilder_ == null) { + if (!other.backupPlanAssociations_.isEmpty()) { + if (backupPlanAssociations_.isEmpty()) { + backupPlanAssociations_ = other.backupPlanAssociations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.addAll(other.backupPlanAssociations_); + } + onChanged(); + } + } else { + if (!other.backupPlanAssociations_.isEmpty()) { + if (backupPlanAssociationsBuilder_.isEmpty()) { + backupPlanAssociationsBuilder_.dispose(); + backupPlanAssociationsBuilder_ = null; + backupPlanAssociations_ = other.backupPlanAssociations_; + bitField0_ = (bitField0_ & ~0x00000001); + backupPlanAssociationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupPlanAssociationsFieldBuilder() + : null; + } else { + backupPlanAssociationsBuilder_.addAllMessages(other.backupPlanAssociations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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.backupdr.v1beta.BackupPlanAssociation m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.parser(), + extensionRegistry); + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(m); + } else { + backupPlanAssociationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List + backupPlanAssociations_ = java.util.Collections.emptyList(); + + private void ensureBackupPlanAssociationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backupPlanAssociations_ = + new java.util.ArrayList( + backupPlanAssociations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder> + backupPlanAssociationsBuilder_; + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getBackupPlanAssociationsList() { + if (backupPlanAssociationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupPlanAssociations_); + } else { + return backupPlanAssociationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getBackupPlanAssociationsCount() { + if (backupPlanAssociationsBuilder_ == null) { + return backupPlanAssociations_.size(); + } else { + return backupPlanAssociationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociations( + int index) { + if (backupPlanAssociationsBuilder_ == null) { + return backupPlanAssociations_.get(index); + } else { + return backupPlanAssociationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBackupPlanAssociations( + int index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.set(index, value); + onChanged(); + } else { + backupPlanAssociationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBackupPlanAssociations( + int index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder builderForValue) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.set(index, builderForValue.build()); + onChanged(); + } else { + backupPlanAssociationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(value); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBackupPlanAssociations( + int index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(index, value); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder builderForValue) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(builderForValue.build()); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBackupPlanAssociations( + int index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder builderForValue) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(index, builderForValue.build()); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllBackupPlanAssociations( + java.lang.Iterable + values) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPlanAssociations_); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBackupPlanAssociations() { + if (backupPlanAssociationsBuilder_ == null) { + backupPlanAssociations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupPlanAssociationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeBackupPlanAssociations(int index) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.remove(index); + onChanged(); + } else { + backupPlanAssociationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder + getBackupPlanAssociationsBuilder(int index) { + return internalGetBackupPlanAssociationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationsOrBuilder(int index) { + if (backupPlanAssociationsBuilder_ == null) { + return backupPlanAssociations_.get(index); + } else { + return backupPlanAssociationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getBackupPlanAssociationsOrBuilderList() { + if (backupPlanAssociationsBuilder_ != null) { + return backupPlanAssociationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupPlanAssociations_); + } + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder + addBackupPlanAssociationsBuilder() { + return internalGetBackupPlanAssociationsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder + addBackupPlanAssociationsBuilder(int index) { + return internalGetBackupPlanAssociationsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The BackupPlanAssociations from the specified parent.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getBackupPlanAssociationsBuilderList() { + return internalGetBackupPlanAssociationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder> + internalGetBackupPlanAssociationsFieldBuilder() { + if (backupPlanAssociationsBuilder_ == null) { + backupPlanAssociationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder>( + backupPlanAssociations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + backupPlanAssociations_ = null; + } + return backupPlanAssociationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * Output only. A token, which can be sent as `page_token` to retrieve the
+     * next page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. A token, which can be sent as `page_token` to retrieve the
+     * next page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. A token, which can be sent as `page_token` to retrieve the
+     * next page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + + /** + * + * + *
+     * Output only. A token, which can be sent as `page_token` to retrieve the
+     * next page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A token, which can be sent as `page_token` to retrieve the
+     * next page. If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) + private static final com.google.cloud.backupdr.v1beta + .FetchBackupPlanAssociationsForResourceTypeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse(); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + FetchBackupPlanAssociationsForResourceTypeResponse> + PARSER = + new com.google.protobuf.AbstractParser< + FetchBackupPlanAssociationsForResourceTypeResponse>() { + @java.lang.Override + public FetchBackupPlanAssociationsForResourceTypeResponse 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.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeResponseOrBuilder.java new file mode 100644 index 000000000000..d1afd6b0ed1d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupPlanAssociationsForResourceTypeResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface FetchBackupPlanAssociationsForResourceTypeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getBackupPlanAssociationsList(); + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociations(int index); + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getBackupPlanAssociationsCount(); + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getBackupPlanAssociationsOrBuilderList(); + + /** + * + * + *
+   * Output only. The BackupPlanAssociations from the specified parent.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationsOrBuilder(int index); + + /** + * + * + *
+   * Output only. A token, which can be sent as `page_token` to retrieve the
+   * next page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * Output only. A token, which can be sent as `page_token` to retrieve the
+   * next page. If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeRequest.java new file mode 100644 index 000000000000..55a3f53c9921 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeRequest.java @@ -0,0 +1,1839 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request for the FetchBackupsForResourceType method.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest} + */ +@com.google.protobuf.Generated +public final class FetchBackupsForResourceTypeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) + FetchBackupsForResourceTypeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FetchBackupsForResourceTypeRequest"); + } + + // Use FetchBackupsForResourceTypeRequest.newBuilder() to construct. + private FetchBackupsForResourceTypeRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchBackupsForResourceTypeRequest() { + parent_ = ""; + resourceType_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest.class, + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Datasources are the parent resource for the backups.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+   * 
+ * + * + * 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. Datasources are the parent resource for the backups.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+   * 
+ * + * + * 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 RESOURCE_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + + /** + * + * + *
+   * Required. The type of the GCP resource.
+   * Ex: sqladmin.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The type of the GCP resource.
+   * Ex: sqladmin.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of Backups to return. The service may
+   * return fewer than this value. If unspecified, at most 50
+   * Backups will be returned. The maximum value is 100; values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchBackupsForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchBackupsForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchBackupsForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchBackupsForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * name
+   * * state
+   * * backup_type
+   * * create_time
+   * * expire_time
+   * * enforced_retention_end_time
+   * * gcp_backup_plan_info.backup_plan
+   * * cloud_sql_instance_backup_properties.instance_tier
+   * * cloud_sql_instance_backup_properties.database_installed_version
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * name
+   * * state
+   * * backup_type
+   * * create_time
+   * * expire_time
+   * * enforced_retention_end_time
+   * * gcp_backup_plan_info.backup_plan
+   * * cloud_sql_instance_backup_properties.instance_tier
+   * * cloud_sql_instance_backup_properties.database_installed_version
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 VIEW_FIELD_NUMBER = 7; + private int view_ = 0; + + /** + * + * + *
+   * Optional. This parameter is used to specify the view of the backup.
+   * If not specified, the default view is BASIC.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. This parameter is used to specify the view of the backup.
+   * If not specified, the default view is BASIC.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupView getView() { + com.google.cloud.backupdr.v1beta.BackupView result = + com.google.cloud.backupdr.v1beta.BackupView.forNumber(view_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupView.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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceType_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, orderBy_); + } + if (view_ != com.google.cloud.backupdr.v1beta.BackupView.BACKUP_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(7, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceType_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, orderBy_); + } + if (view_ != com.google.cloud.backupdr.v1beta.BackupView.BACKUP_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, view_); + } + 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.backupdr.v1beta.FetchBackupsForResourceTypeRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest other = + (com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getResourceType().equals(other.getResourceType())) 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 (view_ != other.view_) 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) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().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 = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest 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.backupdr.v1beta.FetchBackupsForResourceTypeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest 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.backupdr.v1beta.FetchBackupsForResourceTypeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchBackupsForResourceTypeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for the FetchBackupsForResourceType method.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest.class, + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + resourceType_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest build() { + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest buildPartial() { + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest result = + new com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + 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. Datasources are the parent resource for the backups.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+     * 
+ * + * + * 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. Datasources are the parent resource for the backups.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+     * 
+ * + * + * 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. Datasources are the parent resource for the backups.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+     * 
+ * + * + * 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. Datasources are the parent resource for the backups.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+     * 
+ * + * + * 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. Datasources are the parent resource for the backups.
+     * Format:
+     * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+     * 
+ * + * + * 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 resourceType_ = ""; + + /** + * + * + *
+     * Required. The type of the GCP resource.
+     * Ex: sqladmin.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The type of the GCP resource.
+     * Ex: sqladmin.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The type of the GCP resource.
+     * Ex: sqladmin.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the GCP resource.
+     * Ex: sqladmin.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the GCP resource.
+     * Ex: sqladmin.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of Backups to return. The service may
+     * return fewer than this value. If unspecified, at most 50
+     * Backups will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of Backups to return. The service may
+     * return fewer than this value. If unspecified, at most 50
+     * Backups will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of Backups to return. The service may
+     * return fewer than this value. If unspecified, at most 50
+     * Backups will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchBackupsForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchBackupsForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * name
+     * * state
+     * * backup_type
+     * * create_time
+     * * expire_time
+     * * enforced_retention_end_time
+     * * gcp_backup_plan_info.backup_plan
+     * * cloud_sql_instance_backup_properties.instance_tier
+     * * cloud_sql_instance_backup_properties.database_installed_version
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * name
+     * * state
+     * * backup_type
+     * * create_time
+     * * expire_time
+     * * enforced_retention_end_time
+     * * gcp_backup_plan_info.backup_plan
+     * * cloud_sql_instance_backup_properties.instance_tier
+     * * cloud_sql_instance_backup_properties.database_installed_version
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * name
+     * * state
+     * * backup_type
+     * * create_time
+     * * expire_time
+     * * enforced_retention_end_time
+     * * gcp_backup_plan_info.backup_plan
+     * * cloud_sql_instance_backup_properties.instance_tier
+     * * cloud_sql_instance_backup_properties.database_installed_version
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * name
+     * * state
+     * * backup_type
+     * * create_time
+     * * expire_time
+     * * enforced_retention_end_time
+     * * gcp_backup_plan_info.backup_plan
+     * * cloud_sql_instance_backup_properties.instance_tier
+     * * cloud_sql_instance_backup_properties.database_installed_version
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * name
+     * * state
+     * * backup_type
+     * * create_time
+     * * expire_time
+     * * enforced_retention_end_time
+     * * gcp_backup_plan_info.backup_plan
+     * * cloud_sql_instance_backup_properties.instance_tier
+     * * cloud_sql_instance_backup_properties.database_installed_version
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. This parameter is used to specify the view of the backup.
+     * If not specified, the default view is BASIC.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. This parameter is used to specify the view of the backup.
+     * If not specified, the default view is BASIC.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This parameter is used to specify the view of the backup.
+     * If not specified, the default view is BASIC.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupView getView() { + com.google.cloud.backupdr.v1beta.BackupView result = + com.google.cloud.backupdr.v1beta.BackupView.forNumber(view_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupView.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. This parameter is used to specify the view of the backup.
+     * If not specified, the default view is BASIC.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.backupdr.v1beta.BackupView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This parameter is used to specify the view of the backup.
+     * If not specified, the default view is BASIC.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000040); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) + private static final com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest(); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchBackupsForResourceTypeRequest 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.backupdr.v1beta.FetchBackupsForResourceTypeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeRequestOrBuilder.java new file mode 100644 index 000000000000..0ad5483a63de --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeRequestOrBuilder.java @@ -0,0 +1,260 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface FetchBackupsForResourceTypeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Datasources are the parent resource for the backups.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Datasources are the parent resource for the backups.
+   * Format:
+   * projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The type of the GCP resource.
+   * Ex: sqladmin.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + + /** + * + * + *
+   * Required. The type of the GCP resource.
+   * Ex: sqladmin.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+   * Optional. The maximum number of Backups to return. The service may
+   * return fewer than this value. If unspecified, at most 50
+   * Backups will be returned. The maximum value is 100; values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchBackupsForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchBackupsForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchBackupsForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchBackupsForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * name
+   * * state
+   * * backup_type
+   * * create_time
+   * * expire_time
+   * * enforced_retention_end_time
+   * * gcp_backup_plan_info.backup_plan
+   * * cloud_sql_instance_backup_properties.instance_tier
+   * * cloud_sql_instance_backup_properties.database_installed_version
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * name
+   * * state
+   * * backup_type
+   * * create_time
+   * * expire_time
+   * * enforced_retention_end_time
+   * * gcp_backup_plan_info.backup_plan
+   * * cloud_sql_instance_backup_properties.instance_tier
+   * * cloud_sql_instance_backup_properties.database_installed_version
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. This parameter is used to specify the view of the backup.
+   * If not specified, the default view is BASIC.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. This parameter is used to specify the view of the backup.
+   * If not specified, the default view is BASIC.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.backupdr.v1beta.BackupView getView(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeResponse.java new file mode 100644 index 000000000000..313832b5e94e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeResponse.java @@ -0,0 +1,1130 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response for the FetchBackupsForResourceType method.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse} + */ +@com.google.protobuf.Generated +public final class FetchBackupsForResourceTypeResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) + FetchBackupsForResourceTypeResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FetchBackupsForResourceTypeResponse"); + } + + // Use FetchBackupsForResourceTypeResponse.newBuilder() to construct. + private FetchBackupsForResourceTypeResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchBackupsForResourceTypeResponse() { + backups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.class, + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.Builder.class); + } + + public static final int BACKUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backups_; + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public java.util.List getBackupsList() { + return backups_; + } + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public java.util.List + getBackupsOrBuilderList() { + return backups_; + } + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public int getBackupsCount() { + return backups_.size(); + } + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup getBackups(int index) { + return backups_.get(index); + } + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.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_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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; + } + } + + 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.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + 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.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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.backupdr.v1beta.FetchBackupsForResourceTypeResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse other = + (com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) obj; + + if (!getBackupsList().equals(other.getBackupsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse 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.backupdr.v1beta.FetchBackupsForResourceTypeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse 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.backupdr.v1beta.FetchBackupsForResourceTypeResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchBackupsForResourceTypeResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for the FetchBackupsForResourceType method.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.class, + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchBackupsForResourceTypeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse build() { + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse buildPartial() { + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse result = + new com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse 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.backupdr.v1beta.FetchBackupsForResourceTypeResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + .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.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupsFieldBuilder() + : null; + } else { + backupsBuilder_.addAllMessages(other.backups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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.backupdr.v1beta.Backup m = + input.readMessage( + com.google.cloud.backupdr.v1beta.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 + 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.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder> + backupsBuilder_; + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public java.util.List getBackupsList() { + if (backupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backups_); + } else { + return backupsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public int getBackupsCount() { + if (backupsBuilder_ == null) { + return backups_.size(); + } else { + return backupsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.Backup getBackups(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder setBackups(int index, com.google.cloud.backupdr.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.set(index, value); + onChanged(); + } else { + backupsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.backupdr.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.set(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.backupdr.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(value); + onChanged(); + } else { + backupsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder addBackups(int index, com.google.cloud.backupdr.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(index, value); + onChanged(); + } else { + backupsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.backupdr.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.backupdr.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.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; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder clearBackups() { + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder removeBackups(int index) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.remove(index); + onChanged(); + } else { + backupsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.Backup.Builder getBackupsBuilder(int index) { + return internalGetBackupsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupOrBuilder getBackupsOrBuilder(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public java.util.List + getBackupsOrBuilderList() { + if (backupsBuilder_ != null) { + return backupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backups_); + } + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.Backup.Builder addBackupsBuilder() { + return internalGetBackupsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance()); + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.Backup.Builder addBackupsBuilder(int index) { + return internalGetBackupsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance()); + } + + /** + * + * + *
+     * The Backups from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public java.util.List getBackupsBuilderList() { + return internalGetBackupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder> + internalGetBackupsFieldBuilder() { + if (backupsBuilder_ == null) { + backupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder>( + backups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backups_ = null; + } + return backupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) + private static final com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse(); + } + + public static com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchBackupsForResourceTypeResponse 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.backupdr.v1beta.FetchBackupsForResourceTypeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeResponseOrBuilder.java new file mode 100644 index 000000000000..04219d45ef37 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchBackupsForResourceTypeResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface FetchBackupsForResourceTypeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + java.util.List getBackupsList(); + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + com.google.cloud.backupdr.v1beta.Backup getBackups(int index); + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + int getBackupsCount(); + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + java.util.List + getBackupsOrBuilderList(); + + /** + * + * + *
+   * The Backups from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + com.google.cloud.backupdr.v1beta.BackupOrBuilder getBackupsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeRequest.java new file mode 100644 index 000000000000..7839fb6a8ab6 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeRequest.java @@ -0,0 +1,1683 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request for the FetchDataSourceReferencesForResourceType method.
+ * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest} + */ +@com.google.protobuf.Generated +public final class FetchDataSourceReferencesForResourceTypeRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) + FetchDataSourceReferencesForResourceTypeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FetchDataSourceReferencesForResourceTypeRequest"); + } + + // Use FetchDataSourceReferencesForResourceTypeRequest.newBuilder() to construct. + private FetchDataSourceReferencesForResourceTypeRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchDataSourceReferencesForResourceTypeRequest() { + parent_ = ""; + resourceType_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest.class, + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/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 parent resource name.
+   * Format: projects/{project}/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 RESOURCE_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + + /** + * + * + *
+   * Required. The type of the Google Cloud resource.
+   * Ex: sql.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The type of the Google Cloud resource.
+   * Ex: sql.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of DataSourceReferences to return. The service
+   * may return fewer than this value. If unspecified, at most 50
+   * DataSourceReferences will be returned. The maximum value is 100; values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchDataSourceReferencesForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchDataSourceReferencesForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchDataSourceReferencesForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchDataSourceReferencesForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * data_source
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * * data_source_backup_config_state
+   * * data_source_backup_count
+   * * data_source_backup_config_info.last_backup_state
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * * data_source_gcp_resource_info.type
+   * * data_source_gcp_resource_info.location
+   * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * data_source
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * * data_source_backup_config_state
+   * * data_source_backup_count
+   * * data_source_backup_config_info.last_backup_state
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * * data_source_gcp_resource_info.type
+   * * data_source_gcp_resource_info.location
+   * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceType_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceType_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, 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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest other = + (com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getResourceType().equals(other.getResourceType())) 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) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + 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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + 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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for the FetchDataSourceReferencesForResourceType method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + .class, + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + resourceType_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + build() { + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + buildPartial() { + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest result = + new com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + 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: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + 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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 resourceType_ = ""; + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the Google Cloud resource.
+     * Ex: sql.googleapis.com/Instance
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of DataSourceReferences to return. The service
+     * may return fewer than this value. If unspecified, at most 50
+     * DataSourceReferences will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of DataSourceReferences to return. The service
+     * may return fewer than this value. If unspecified, at most 50
+     * DataSourceReferences will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of DataSourceReferences to return. The service
+     * may return fewer than this value. If unspecified, at most 50
+     * DataSourceReferences will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchDataSourceReferencesForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchDataSourceReferencesForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchDataSourceReferencesForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchDataSourceReferencesForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchDataSourceReferencesForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchDataSourceReferencesForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchDataSourceReferencesForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchDataSourceReferencesForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous call of
+     * `FetchDataSourceReferencesForResourceType`.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `FetchDataSourceReferencesForResourceType` must match
+     * the call that provided the page token.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_backup_config_state
+     * * data_source_backup_count
+     * * data_source_backup_config_info.last_backup_state
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_gcp_resource_info.type
+     * * data_source_gcp_resource_info.location
+     * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_backup_config_state
+     * * data_source_backup_count
+     * * data_source_backup_config_info.last_backup_state
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_gcp_resource_info.type
+     * * data_source_gcp_resource_info.location
+     * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_backup_config_state
+     * * data_source_backup_count
+     * * data_source_backup_config_info.last_backup_state
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_gcp_resource_info.type
+     * * data_source_gcp_resource_info.location
+     * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_backup_config_state
+     * * data_source_backup_count
+     * * data_source_backup_config_info.last_backup_state
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_gcp_resource_info.type
+     * * data_source_gcp_resource_info.location
+     * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results fetched in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering. Supported
+     * fields:
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_backup_config_state
+     * * data_source_backup_count
+     * * data_source_backup_config_info.last_backup_state
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * * data_source_gcp_resource_info.type
+     * * data_source_gcp_resource_info.location
+     * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     * * name
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) + private static final com.google.cloud.backupdr.v1beta + .FetchDataSourceReferencesForResourceTypeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest(); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser< + FetchDataSourceReferencesForResourceTypeRequest>() { + @java.lang.Override + public FetchDataSourceReferencesForResourceTypeRequest 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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeRequestOrBuilder.java new file mode 100644 index 000000000000..740db7129956 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeRequestOrBuilder.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface FetchDataSourceReferencesForResourceTypeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/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 type of the Google Cloud resource.
+   * Ex: sql.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + + /** + * + * + *
+   * Required. The type of the Google Cloud resource.
+   * Ex: sql.googleapis.com/Instance
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+   * Optional. The maximum number of DataSourceReferences to return. The service
+   * may return fewer than this value. If unspecified, at most 50
+   * DataSourceReferences will be returned. The maximum value is 100; values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchDataSourceReferencesForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchDataSourceReferencesForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous call of
+   * `FetchDataSourceReferencesForResourceType`.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `FetchDataSourceReferencesForResourceType` must match
+   * the call that provided the page token.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * data_source
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * * data_source_backup_config_state
+   * * data_source_backup_count
+   * * data_source_backup_config_info.last_backup_state
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * * data_source_gcp_resource_info.type
+   * * data_source_gcp_resource_info.location
+   * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A filter expression that filters the results fetched in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering. Supported
+   * fields:
+   * * data_source
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * * data_source_backup_config_state
+   * * data_source_backup_count
+   * * data_source_backup_config_info.last_backup_state
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * * data_source_gcp_resource_info.type
+   * * data_source_gcp_resource_info.location
+   * * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   * * name
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeResponse.java new file mode 100644 index 000000000000..d7f29673c3ce --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeResponse.java @@ -0,0 +1,1201 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response for the FetchDataSourceReferencesForResourceType method.
+ * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse} + */ +@com.google.protobuf.Generated +public final class FetchDataSourceReferencesForResourceTypeResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) + FetchDataSourceReferencesForResourceTypeResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FetchDataSourceReferencesForResourceTypeResponse"); + } + + // Use FetchDataSourceReferencesForResourceTypeResponse.newBuilder() to construct. + private FetchDataSourceReferencesForResourceTypeResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchDataSourceReferencesForResourceTypeResponse() { + dataSourceReferences_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse.class, + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + .Builder.class); + } + + public static final int DATA_SOURCE_REFERENCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + dataSourceReferences_; + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public java.util.List + getDataSourceReferencesList() { + return dataSourceReferences_; + } + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public java.util.List + getDataSourceReferencesOrBuilderList() { + return dataSourceReferences_; + } + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public int getDataSourceReferencesCount() { + return dataSourceReferences_.size(); + } + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceReference getDataSourceReferences(int index) { + return dataSourceReferences_.get(index); + } + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder + getDataSourceReferencesOrBuilder(int index) { + return dataSourceReferences_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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; + } + } + + 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 < dataSourceReferences_.size(); i++) { + output.writeMessage(1, dataSourceReferences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataSourceReferences_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataSourceReferences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse other = + (com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) obj; + + if (!getDataSourceReferencesList().equals(other.getDataSourceReferencesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getDataSourceReferencesCount() > 0) { + hash = (37 * hash) + DATA_SOURCE_REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceReferencesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + 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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + 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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for the FetchDataSourceReferencesForResourceType method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + .class, + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataSourceReferencesBuilder_ == null) { + dataSourceReferences_ = java.util.Collections.emptyList(); + } else { + dataSourceReferences_ = null; + dataSourceReferencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_FetchDataSourceReferencesForResourceTypeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + build() { + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + buildPartial() { + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse result = + new com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse result) { + if (dataSourceReferencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataSourceReferences_ = java.util.Collections.unmodifiableList(dataSourceReferences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataSourceReferences_ = dataSourceReferences_; + } else { + result.dataSourceReferences_ = dataSourceReferencesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + .getDefaultInstance()) return this; + if (dataSourceReferencesBuilder_ == null) { + if (!other.dataSourceReferences_.isEmpty()) { + if (dataSourceReferences_.isEmpty()) { + dataSourceReferences_ = other.dataSourceReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.addAll(other.dataSourceReferences_); + } + onChanged(); + } + } else { + if (!other.dataSourceReferences_.isEmpty()) { + if (dataSourceReferencesBuilder_.isEmpty()) { + dataSourceReferencesBuilder_.dispose(); + dataSourceReferencesBuilder_ = null; + dataSourceReferences_ = other.dataSourceReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + dataSourceReferencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataSourceReferencesFieldBuilder() + : null; + } else { + dataSourceReferencesBuilder_.addAllMessages(other.dataSourceReferences_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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.backupdr.v1beta.DataSourceReference m = + input.readMessage( + com.google.cloud.backupdr.v1beta.DataSourceReference.parser(), + extensionRegistry); + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(m); + } else { + dataSourceReferencesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List + dataSourceReferences_ = java.util.Collections.emptyList(); + + private void ensureDataSourceReferencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataSourceReferences_ = + new java.util.ArrayList( + dataSourceReferences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceReference, + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder, + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder> + dataSourceReferencesBuilder_; + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public java.util.List + getDataSourceReferencesList() { + if (dataSourceReferencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataSourceReferences_); + } else { + return dataSourceReferencesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public int getDataSourceReferencesCount() { + if (dataSourceReferencesBuilder_ == null) { + return dataSourceReferences_.size(); + } else { + return dataSourceReferencesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReference getDataSourceReferences(int index) { + if (dataSourceReferencesBuilder_ == null) { + return dataSourceReferences_.get(index); + } else { + return dataSourceReferencesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder setDataSourceReferences( + int index, com.google.cloud.backupdr.v1beta.DataSourceReference value) { + if (dataSourceReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.set(index, value); + onChanged(); + } else { + dataSourceReferencesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder setDataSourceReferences( + int index, com.google.cloud.backupdr.v1beta.DataSourceReference.Builder builderForValue) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.set(index, builderForValue.build()); + onChanged(); + } else { + dataSourceReferencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addDataSourceReferences( + com.google.cloud.backupdr.v1beta.DataSourceReference value) { + if (dataSourceReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(value); + onChanged(); + } else { + dataSourceReferencesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addDataSourceReferences( + int index, com.google.cloud.backupdr.v1beta.DataSourceReference value) { + if (dataSourceReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(index, value); + onChanged(); + } else { + dataSourceReferencesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addDataSourceReferences( + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder builderForValue) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(builderForValue.build()); + onChanged(); + } else { + dataSourceReferencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addDataSourceReferences( + int index, com.google.cloud.backupdr.v1beta.DataSourceReference.Builder builderForValue) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(index, builderForValue.build()); + onChanged(); + } else { + dataSourceReferencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addAllDataSourceReferences( + java.lang.Iterable values) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataSourceReferences_); + onChanged(); + } else { + dataSourceReferencesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder clearDataSourceReferences() { + if (dataSourceReferencesBuilder_ == null) { + dataSourceReferences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataSourceReferencesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder removeDataSourceReferences(int index) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.remove(index); + onChanged(); + } else { + dataSourceReferencesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReference.Builder + getDataSourceReferencesBuilder(int index) { + return internalGetDataSourceReferencesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder + getDataSourceReferencesOrBuilder(int index) { + if (dataSourceReferencesBuilder_ == null) { + return dataSourceReferences_.get(index); + } else { + return dataSourceReferencesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public java.util.List + getDataSourceReferencesOrBuilderList() { + if (dataSourceReferencesBuilder_ != null) { + return dataSourceReferencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataSourceReferences_); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReference.Builder + addDataSourceReferencesBuilder() { + return internalGetDataSourceReferencesFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.DataSourceReference.getDefaultInstance()); + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReference.Builder + addDataSourceReferencesBuilder(int index) { + return internalGetDataSourceReferencesFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.DataSourceReference.getDefaultInstance()); + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public java.util.List + getDataSourceReferencesBuilderList() { + return internalGetDataSourceReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceReference, + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder, + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder> + internalGetDataSourceReferencesFieldBuilder() { + if (dataSourceReferencesBuilder_ == null) { + dataSourceReferencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceReference, + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder, + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder>( + dataSourceReferences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataSourceReferences_ = null; + } + return dataSourceReferencesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) + private static final com.google.cloud.backupdr.v1beta + .FetchDataSourceReferencesForResourceTypeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse(); + } + + public static com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser< + FetchDataSourceReferencesForResourceTypeResponse>() { + @java.lang.Override + public FetchDataSourceReferencesForResourceTypeResponse 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.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeResponseOrBuilder.java new file mode 100644 index 000000000000..b779e09f088d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchDataSourceReferencesForResourceTypeResponseOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface FetchDataSourceReferencesForResourceTypeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + java.util.List + getDataSourceReferencesList(); + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + com.google.cloud.backupdr.v1beta.DataSourceReference getDataSourceReferences(int index); + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + int getDataSourceReferencesCount(); + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + java.util.List + getDataSourceReferencesOrBuilderList(); + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder getDataSourceReferencesOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsRequest.java new file mode 100644 index 000000000000..3dfcd3e38a07 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsRequest.java @@ -0,0 +1,1328 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for fetching usable BackupVaults.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest} + */ +@com.google.protobuf.Generated +public final class FetchUsableBackupVaultsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) + FetchUsableBackupVaultsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FetchUsableBackupVaultsRequest"); + } + + // Use FetchUsableBackupVaultsRequest.newBuilder() to construct. + private FetchUsableBackupVaultsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchUsableBackupVaultsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.class, + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve backupvault stores
+   * information, in the format 'projects/{project_id}/locations/{location}'. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**.
+   * To retrieve backupvault stores for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+   * information, in the format 'projects/{project_id}/locations/{location}'. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**.
+   * To retrieve backupvault stores for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchUsableBackupVaultsRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest other = + (com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) 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.backupdr.v1beta.FetchUsableBackupVaultsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest 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.backupdr.v1beta.FetchUsableBackupVaultsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest 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.backupdr.v1beta.FetchUsableBackupVaultsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchUsableBackupVaultsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for fetching usable BackupVaults.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.class, + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest build() { + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest buildPartial() { + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest result = + new com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest.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. The project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) + private static final com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest(); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchUsableBackupVaultsRequest 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.backupdr.v1beta.FetchUsableBackupVaultsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsRequestOrBuilder.java new file mode 100644 index 000000000000..7838d3a6973b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsRequestOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface FetchUsableBackupVaultsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve backupvault stores
+   * information, in the format 'projects/{project_id}/locations/{location}'. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**.
+   * To retrieve backupvault stores for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve backupvault stores
+   * information, in the format 'projects/{project_id}/locations/{location}'. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**.
+   * To retrieve backupvault stores for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsResponse.java new file mode 100644 index 000000000000..8821209d8c33 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsResponse.java @@ -0,0 +1,1573 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for fetching usable BackupVaults.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse} + */ +@com.google.protobuf.Generated +public final class FetchUsableBackupVaultsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) + FetchUsableBackupVaultsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FetchUsableBackupVaultsResponse"); + } + + // Use FetchUsableBackupVaultsResponse.newBuilder() to construct. + private FetchUsableBackupVaultsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FetchUsableBackupVaultsResponse() { + backupVaults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.class, + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.Builder.class); + } + + public static final int BACKUP_VAULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backupVaults_; + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public java.util.List getBackupVaultsList() { + return backupVaults_; + } + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public java.util.List + getBackupVaultsOrBuilderList() { + return backupVaults_; + } + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public int getBackupVaultsCount() { + return backupVaults_.size(); + } + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVaults(int index) { + return backupVaults_.get(index); + } + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.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_ = ""; + + /** + * + * + *
+   * 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 < backupVaults_.size(); i++) { + output.writeMessage(1, backupVaults_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchUsableBackupVaultsResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse other = + (com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) 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.backupdr.v1beta.FetchUsableBackupVaultsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse 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.backupdr.v1beta.FetchUsableBackupVaultsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse 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.backupdr.v1beta.FetchUsableBackupVaultsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.FetchUsableBackupVaultsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for fetching usable BackupVaults.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.class, + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_FetchUsableBackupVaultsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse build() { + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse buildPartial() { + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse result = + new com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse 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.backupdr.v1beta.FetchUsableBackupVaultsResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse.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.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupVaultsFieldBuilder() + : 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.backupdr.v1beta.BackupVault m = + input.readMessage( + com.google.cloud.backupdr.v1beta.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.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder> + backupVaultsBuilder_; + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public java.util.List getBackupVaultsList() { + if (backupVaultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupVaults_); + } else { + return backupVaultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public int getBackupVaultsCount() { + if (backupVaultsBuilder_ == null) { + return backupVaults_.size(); + } else { + return backupVaultsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVaults(int index) { + if (backupVaultsBuilder_ == null) { + return backupVaults_.get(index); + } else { + return backupVaultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder setBackupVaults(int index, com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.set(index, value); + onChanged(); + } else { + backupVaultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder setBackupVaults( + int index, com.google.cloud.backupdr.v1beta.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.set(index, builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults(com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.add(value); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults(int index, com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.add(index, value); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults( + com.google.cloud.backupdr.v1beta.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.add(builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults( + int index, com.google.cloud.backupdr.v1beta.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.add(index, builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.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; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder clearBackupVaults() { + if (backupVaultsBuilder_ == null) { + backupVaults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupVaultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder removeBackupVaults(int index) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.remove(index); + onChanged(); + } else { + backupVaultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVault.Builder getBackupVaultsBuilder(int index) { + return internalGetBackupVaultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultsOrBuilder( + int index) { + if (backupVaultsBuilder_ == null) { + return backupVaults_.get(index); + } else { + return backupVaultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public java.util.List + getBackupVaultsOrBuilderList() { + if (backupVaultsBuilder_ != null) { + return backupVaultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupVaults_); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVault.Builder addBackupVaultsBuilder() { + return internalGetBackupVaultsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVault.Builder addBackupVaultsBuilder(int index) { + return internalGetBackupVaultsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public java.util.List + getBackupVaultsBuilderList() { + return internalGetBackupVaultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder> + internalGetBackupVaultsFieldBuilder() { + if (backupVaultsBuilder_ == null) { + backupVaultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder>( + backupVaults_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backupVaults_ = null; + } + return backupVaultsBuilder_; + } + + 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) + private static final com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse(); + } + + public static com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchUsableBackupVaultsResponse 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.backupdr.v1beta.FetchUsableBackupVaultsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsResponseOrBuilder.java new file mode 100644 index 000000000000..98c79a490fe6 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/FetchUsableBackupVaultsResponseOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface FetchUsableBackupVaultsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + java.util.List getBackupVaultsList(); + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + com.google.cloud.backupdr.v1beta.BackupVault getBackupVaults(int index); + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + int getBackupVaultsCount(); + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + java.util.List + getBackupVaultsOrBuilderList(); + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultsOrBuilder(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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpBackupConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpBackupConfig.java new file mode 100644 index 000000000000..4916f41025c0 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpBackupConfig.java @@ -0,0 +1,1879 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * GcpBackupConfig captures the Backup configuration details for Google Cloud
+ * resources. All Google Cloud resources regardless of type are protected with
+ * backup plan associations.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GcpBackupConfig} + */ +@com.google.protobuf.Generated +public final class GcpBackupConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GcpBackupConfig) + GcpBackupConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GcpBackupConfig"); + } + + // Use GcpBackupConfig.newBuilder() to construct. + private GcpBackupConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GcpBackupConfig() { + backupPlan_ = ""; + backupPlanDescription_ = ""; + backupPlanAssociation_ = ""; + backupPlanRules_ = com.google.protobuf.LazyStringArrayList.emptyList(); + backupPlanRevisionName_ = ""; + backupPlanRevisionId_ = ""; + autoProtectionPolicyBinding_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GcpBackupConfig.class, + com.google.cloud.backupdr.v1beta.GcpBackupConfig.Builder.class); + } + + public static final int BACKUP_PLAN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlan_ = ""; + + /** + * + * + *
+   * The name of the backup plan.
+   * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlan. + */ + @java.lang.Override + public java.lang.String getBackupPlan() { + java.lang.Object ref = backupPlan_; + 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(); + backupPlan_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the backup plan.
+   * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlan. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanBytes() { + java.lang.Object ref = backupPlan_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlan_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanDescription_ = ""; + + /** + * + * + *
+   * The description of the backup plan.
+   * 
+ * + * string backup_plan_description = 2; + * + * @return The backupPlanDescription. + */ + @java.lang.Override + public java.lang.String getBackupPlanDescription() { + java.lang.Object ref = backupPlanDescription_; + 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(); + backupPlanDescription_ = s; + return s; + } + } + + /** + * + * + *
+   * The description of the backup plan.
+   * 
+ * + * string backup_plan_description = 2; + * + * @return The bytes for backupPlanDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanDescriptionBytes() { + java.lang.Object ref = backupPlanDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_ASSOCIATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanAssociation_ = ""; + + /** + * + * + *
+   * The name of the backup plan association.
+   * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlanAssociation. + */ + @java.lang.Override + public java.lang.String getBackupPlanAssociation() { + java.lang.Object ref = backupPlanAssociation_; + 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(); + backupPlanAssociation_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the backup plan association.
+   * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlanAssociation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanAssociationBytes() { + java.lang.Object ref = backupPlanAssociation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanAssociation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_RULES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList backupPlanRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The names of the backup plan rules which point to this backupvault
+   * 
+ * + * repeated string backup_plan_rules = 4; + * + * @return A list containing the backupPlanRules. + */ + public com.google.protobuf.ProtocolStringList getBackupPlanRulesList() { + return backupPlanRules_; + } + + /** + * + * + *
+   * The names of the backup plan rules which point to this backupvault
+   * 
+ * + * repeated string backup_plan_rules = 4; + * + * @return The count of backupPlanRules. + */ + public int getBackupPlanRulesCount() { + return backupPlanRules_.size(); + } + + /** + * + * + *
+   * The names of the backup plan rules which point to this backupvault
+   * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param index The index of the element to return. + * @return The backupPlanRules at the given index. + */ + public java.lang.String getBackupPlanRules(int index) { + return backupPlanRules_.get(index); + } + + /** + * + * + *
+   * The names of the backup plan rules which point to this backupvault
+   * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the backupPlanRules at the given index. + */ + public com.google.protobuf.ByteString getBackupPlanRulesBytes(int index) { + return backupPlanRules_.getByteString(index); + } + + public static final int BACKUP_PLAN_REVISION_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanRevisionName_ = ""; + + /** + * + * + *
+   * The name of the backup plan revision.
+   * 
+ * + * string backup_plan_revision_name = 5; + * + * @return The backupPlanRevisionName. + */ + @java.lang.Override + public java.lang.String getBackupPlanRevisionName() { + java.lang.Object ref = backupPlanRevisionName_; + 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(); + backupPlanRevisionName_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the backup plan revision.
+   * 
+ * + * string backup_plan_revision_name = 5; + * + * @return The bytes for backupPlanRevisionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanRevisionNameBytes() { + java.lang.Object ref = backupPlanRevisionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_REVISION_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanRevisionId_ = ""; + + /** + * + * + *
+   * The user friendly id of the backup plan revision.
+   * E.g. v0, v1 etc.
+   * 
+ * + * string backup_plan_revision_id = 6; + * + * @return The backupPlanRevisionId. + */ + @java.lang.Override + public java.lang.String getBackupPlanRevisionId() { + java.lang.Object ref = backupPlanRevisionId_; + 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(); + backupPlanRevisionId_ = s; + return s; + } + } + + /** + * + * + *
+   * The user friendly id of the backup plan revision.
+   * E.g. v0, v1 etc.
+   * 
+ * + * string backup_plan_revision_id = 6; + * + * @return The bytes for backupPlanRevisionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanRevisionIdBytes() { + java.lang.Object ref = backupPlanRevisionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTO_PROTECTION_POLICY_BINDING_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object autoProtectionPolicyBinding_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+   * manages this datasource, if any.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + @java.lang.Override + public java.lang.String getAutoProtectionPolicyBinding() { + java.lang.Object ref = autoProtectionPolicyBinding_; + 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(); + autoProtectionPolicyBinding_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+   * manages this datasource, if any.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyBinding_ = 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.GeneratedMessage.isStringEmpty(backupPlan_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, backupPlan_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanDescription_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupPlanDescription_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanAssociation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, backupPlanAssociation_); + } + for (int i = 0; i < backupPlanRules_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, backupPlanRules_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, backupPlanRevisionName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, backupPlanRevisionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyBinding_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, autoProtectionPolicyBinding_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlan_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, backupPlan_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanDescription_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupPlanDescription_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanAssociation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, backupPlanAssociation_); + } + { + int dataSize = 0; + for (int i = 0; i < backupPlanRules_.size(); i++) { + dataSize += computeStringSizeNoTag(backupPlanRules_.getRaw(i)); + } + size += dataSize; + size += 1 * getBackupPlanRulesList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, backupPlanRevisionName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanRevisionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, backupPlanRevisionId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(autoProtectionPolicyBinding_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(7, autoProtectionPolicyBinding_); + } + 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.backupdr.v1beta.GcpBackupConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GcpBackupConfig other = + (com.google.cloud.backupdr.v1beta.GcpBackupConfig) obj; + + if (!getBackupPlan().equals(other.getBackupPlan())) return false; + if (!getBackupPlanDescription().equals(other.getBackupPlanDescription())) return false; + if (!getBackupPlanAssociation().equals(other.getBackupPlanAssociation())) return false; + if (!getBackupPlanRulesList().equals(other.getBackupPlanRulesList())) return false; + if (!getBackupPlanRevisionName().equals(other.getBackupPlanRevisionName())) return false; + if (!getBackupPlanRevisionId().equals(other.getBackupPlanRevisionId())) return false; + if (!getAutoProtectionPolicyBinding().equals(other.getAutoProtectionPolicyBinding())) + 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) + BACKUP_PLAN_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlan().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanDescription().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_ASSOCIATION_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanAssociation().hashCode(); + if (getBackupPlanRulesCount() > 0) { + hash = (37 * hash) + BACKUP_PLAN_RULES_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRulesList().hashCode(); + } + hash = (37 * hash) + BACKUP_PLAN_REVISION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRevisionName().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_REVISION_ID_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRevisionId().hashCode(); + hash = (37 * hash) + AUTO_PROTECTION_POLICY_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicyBinding().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig 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.backupdr.v1beta.GcpBackupConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig 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.backupdr.v1beta.GcpBackupConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GcpBackupConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * GcpBackupConfig captures the Backup configuration details for Google Cloud
+   * resources. All Google Cloud resources regardless of type are protected with
+   * backup plan associations.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GcpBackupConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GcpBackupConfig) + com.google.cloud.backupdr.v1beta.GcpBackupConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GcpBackupConfig.class, + com.google.cloud.backupdr.v1beta.GcpBackupConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GcpBackupConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupPlan_ = ""; + backupPlanDescription_ = ""; + backupPlanAssociation_ = ""; + backupPlanRules_ = com.google.protobuf.LazyStringArrayList.emptyList(); + backupPlanRevisionName_ = ""; + backupPlanRevisionId_ = ""; + autoProtectionPolicyBinding_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpBackupConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpBackupConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpBackupConfig build() { + com.google.cloud.backupdr.v1beta.GcpBackupConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpBackupConfig buildPartial() { + com.google.cloud.backupdr.v1beta.GcpBackupConfig result = + new com.google.cloud.backupdr.v1beta.GcpBackupConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.GcpBackupConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backupPlan_ = backupPlan_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPlanDescription_ = backupPlanDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backupPlanAssociation_ = backupPlanAssociation_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + backupPlanRules_.makeImmutable(); + result.backupPlanRules_ = backupPlanRules_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.backupPlanRevisionName_ = backupPlanRevisionName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.backupPlanRevisionId_ = backupPlanRevisionId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.autoProtectionPolicyBinding_ = autoProtectionPolicyBinding_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GcpBackupConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GcpBackupConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GcpBackupConfig other) { + if (other == com.google.cloud.backupdr.v1beta.GcpBackupConfig.getDefaultInstance()) + return this; + if (!other.getBackupPlan().isEmpty()) { + backupPlan_ = other.backupPlan_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupPlanDescription().isEmpty()) { + backupPlanDescription_ = other.backupPlanDescription_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getBackupPlanAssociation().isEmpty()) { + backupPlanAssociation_ = other.backupPlanAssociation_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.backupPlanRules_.isEmpty()) { + if (backupPlanRules_.isEmpty()) { + backupPlanRules_ = other.backupPlanRules_; + bitField0_ |= 0x00000008; + } else { + ensureBackupPlanRulesIsMutable(); + backupPlanRules_.addAll(other.backupPlanRules_); + } + onChanged(); + } + if (!other.getBackupPlanRevisionName().isEmpty()) { + backupPlanRevisionName_ = other.backupPlanRevisionName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getBackupPlanRevisionId().isEmpty()) { + backupPlanRevisionId_ = other.backupPlanRevisionId_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getAutoProtectionPolicyBinding().isEmpty()) { + autoProtectionPolicyBinding_ = other.autoProtectionPolicyBinding_; + bitField0_ |= 0x00000040; + 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: + { + backupPlan_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + backupPlanDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + backupPlanAssociation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBackupPlanRulesIsMutable(); + backupPlanRules_.add(s); + break; + } // case 34 + case 42: + { + backupPlanRevisionName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + backupPlanRevisionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + autoProtectionPolicyBinding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + 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 backupPlan_ = ""; + + /** + * + * + *
+     * The name of the backup plan.
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlan. + */ + public java.lang.String getBackupPlan() { + java.lang.Object ref = backupPlan_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlan_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the backup plan.
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlan. + */ + public com.google.protobuf.ByteString getBackupPlanBytes() { + java.lang.Object ref = backupPlan_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlan_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the backup plan.
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The backupPlan to set. + * @return This builder for chaining. + */ + public Builder setBackupPlan(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlan_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the backup plan.
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearBackupPlan() { + backupPlan_ = getDefaultInstance().getBackupPlan(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the backup plan.
+     * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for backupPlan to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlan_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupPlanDescription_ = ""; + + /** + * + * + *
+     * The description of the backup plan.
+     * 
+ * + * string backup_plan_description = 2; + * + * @return The backupPlanDescription. + */ + public java.lang.String getBackupPlanDescription() { + java.lang.Object ref = backupPlanDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The description of the backup plan.
+     * 
+ * + * string backup_plan_description = 2; + * + * @return The bytes for backupPlanDescription. + */ + public com.google.protobuf.ByteString getBackupPlanDescriptionBytes() { + java.lang.Object ref = backupPlanDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The description of the backup plan.
+     * 
+ * + * string backup_plan_description = 2; + * + * @param value The backupPlanDescription to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The description of the backup plan.
+     * 
+ * + * string backup_plan_description = 2; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanDescription() { + backupPlanDescription_ = getDefaultInstance().getBackupPlanDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The description of the backup plan.
+     * 
+ * + * string backup_plan_description = 2; + * + * @param value The bytes for backupPlanDescription to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanDescription_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object backupPlanAssociation_ = ""; + + /** + * + * + *
+     * The name of the backup plan association.
+     * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlanAssociation. + */ + public java.lang.String getBackupPlanAssociation() { + java.lang.Object ref = backupPlanAssociation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanAssociation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the backup plan association.
+     * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlanAssociation. + */ + public com.google.protobuf.ByteString getBackupPlanAssociationBytes() { + java.lang.Object ref = backupPlanAssociation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanAssociation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the backup plan association.
+     * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The backupPlanAssociation to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanAssociation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanAssociation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the backup plan association.
+     * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanAssociation() { + backupPlanAssociation_ = getDefaultInstance().getBackupPlanAssociation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the backup plan association.
+     * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for backupPlanAssociation to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanAssociationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanAssociation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList backupPlanRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureBackupPlanRulesIsMutable() { + if (!backupPlanRules_.isModifiable()) { + backupPlanRules_ = new com.google.protobuf.LazyStringArrayList(backupPlanRules_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @return A list containing the backupPlanRules. + */ + public com.google.protobuf.ProtocolStringList getBackupPlanRulesList() { + backupPlanRules_.makeImmutable(); + return backupPlanRules_; + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @return The count of backupPlanRules. + */ + public int getBackupPlanRulesCount() { + return backupPlanRules_.size(); + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param index The index of the element to return. + * @return The backupPlanRules at the given index. + */ + public java.lang.String getBackupPlanRules(int index) { + return backupPlanRules_.get(index); + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the backupPlanRules at the given index. + */ + public com.google.protobuf.ByteString getBackupPlanRulesBytes(int index) { + return backupPlanRules_.getByteString(index); + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param index The index to set the value at. + * @param value The backupPlanRules to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRules(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanRulesIsMutable(); + backupPlanRules_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param value The backupPlanRules to add. + * @return This builder for chaining. + */ + public Builder addBackupPlanRules(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanRulesIsMutable(); + backupPlanRules_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param values The backupPlanRules to add. + * @return This builder for chaining. + */ + public Builder addAllBackupPlanRules(java.lang.Iterable values) { + ensureBackupPlanRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPlanRules_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanRules() { + backupPlanRules_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The names of the backup plan rules which point to this backupvault
+     * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param value The bytes of the backupPlanRules to add. + * @return This builder for chaining. + */ + public Builder addBackupPlanRulesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureBackupPlanRulesIsMutable(); + backupPlanRules_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object backupPlanRevisionName_ = ""; + + /** + * + * + *
+     * The name of the backup plan revision.
+     * 
+ * + * string backup_plan_revision_name = 5; + * + * @return The backupPlanRevisionName. + */ + public java.lang.String getBackupPlanRevisionName() { + java.lang.Object ref = backupPlanRevisionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanRevisionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the backup plan revision.
+     * 
+ * + * string backup_plan_revision_name = 5; + * + * @return The bytes for backupPlanRevisionName. + */ + public com.google.protobuf.ByteString getBackupPlanRevisionNameBytes() { + java.lang.Object ref = backupPlanRevisionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the backup plan revision.
+     * 
+ * + * string backup_plan_revision_name = 5; + * + * @param value The backupPlanRevisionName to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanRevisionName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the backup plan revision.
+     * 
+ * + * string backup_plan_revision_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanRevisionName() { + backupPlanRevisionName_ = getDefaultInstance().getBackupPlanRevisionName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the backup plan revision.
+     * 
+ * + * string backup_plan_revision_name = 5; + * + * @param value The bytes for backupPlanRevisionName to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanRevisionName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object backupPlanRevisionId_ = ""; + + /** + * + * + *
+     * The user friendly id of the backup plan revision.
+     * E.g. v0, v1 etc.
+     * 
+ * + * string backup_plan_revision_id = 6; + * + * @return The backupPlanRevisionId. + */ + public java.lang.String getBackupPlanRevisionId() { + java.lang.Object ref = backupPlanRevisionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanRevisionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The user friendly id of the backup plan revision.
+     * E.g. v0, v1 etc.
+     * 
+ * + * string backup_plan_revision_id = 6; + * + * @return The bytes for backupPlanRevisionId. + */ + public com.google.protobuf.ByteString getBackupPlanRevisionIdBytes() { + java.lang.Object ref = backupPlanRevisionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanRevisionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The user friendly id of the backup plan revision.
+     * E.g. v0, v1 etc.
+     * 
+ * + * string backup_plan_revision_id = 6; + * + * @param value The backupPlanRevisionId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanRevisionId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * The user friendly id of the backup plan revision.
+     * E.g. v0, v1 etc.
+     * 
+ * + * string backup_plan_revision_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanRevisionId() { + backupPlanRevisionId_ = getDefaultInstance().getBackupPlanRevisionId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * The user friendly id of the backup plan revision.
+     * E.g. v0, v1 etc.
+     * 
+ * + * string backup_plan_revision_id = 6; + * + * @param value The bytes for backupPlanRevisionId to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanRevisionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanRevisionId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object autoProtectionPolicyBinding_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this datasource, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + public java.lang.String getAutoProtectionPolicyBinding() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + autoProtectionPolicyBinding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this datasource, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + public com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes() { + java.lang.Object ref = autoProtectionPolicyBinding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + autoProtectionPolicyBinding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this datasource, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The autoProtectionPolicyBinding to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyBinding(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionPolicyBinding_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this datasource, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAutoProtectionPolicyBinding() { + autoProtectionPolicyBinding_ = getDefaultInstance().getAutoProtectionPolicyBinding(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+     * manages this datasource, if any.
+     * Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+     * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for autoProtectionPolicyBinding to set. + * @return This builder for chaining. + */ + public Builder setAutoProtectionPolicyBindingBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + autoProtectionPolicyBinding_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GcpBackupConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GcpBackupConfig) + private static final com.google.cloud.backupdr.v1beta.GcpBackupConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GcpBackupConfig(); + } + + public static com.google.cloud.backupdr.v1beta.GcpBackupConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcpBackupConfig 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.backupdr.v1beta.GcpBackupConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpBackupConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpBackupConfigOrBuilder.java new file mode 100644 index 000000000000..36bebdfddcf2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpBackupConfigOrBuilder.java @@ -0,0 +1,250 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GcpBackupConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GcpBackupConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the backup plan.
+   * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlan. + */ + java.lang.String getBackupPlan(); + + /** + * + * + *
+   * The name of the backup plan.
+   * 
+ * + * string backup_plan = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlan. + */ + com.google.protobuf.ByteString getBackupPlanBytes(); + + /** + * + * + *
+   * The description of the backup plan.
+   * 
+ * + * string backup_plan_description = 2; + * + * @return The backupPlanDescription. + */ + java.lang.String getBackupPlanDescription(); + + /** + * + * + *
+   * The description of the backup plan.
+   * 
+ * + * string backup_plan_description = 2; + * + * @return The bytes for backupPlanDescription. + */ + com.google.protobuf.ByteString getBackupPlanDescriptionBytes(); + + /** + * + * + *
+   * The name of the backup plan association.
+   * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @return The backupPlanAssociation. + */ + java.lang.String getBackupPlanAssociation(); + + /** + * + * + *
+   * The name of the backup plan association.
+   * 
+ * + * string backup_plan_association = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for backupPlanAssociation. + */ + com.google.protobuf.ByteString getBackupPlanAssociationBytes(); + + /** + * + * + *
+   * The names of the backup plan rules which point to this backupvault
+   * 
+ * + * repeated string backup_plan_rules = 4; + * + * @return A list containing the backupPlanRules. + */ + java.util.List getBackupPlanRulesList(); + + /** + * + * + *
+   * The names of the backup plan rules which point to this backupvault
+   * 
+ * + * repeated string backup_plan_rules = 4; + * + * @return The count of backupPlanRules. + */ + int getBackupPlanRulesCount(); + + /** + * + * + *
+   * The names of the backup plan rules which point to this backupvault
+   * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param index The index of the element to return. + * @return The backupPlanRules at the given index. + */ + java.lang.String getBackupPlanRules(int index); + + /** + * + * + *
+   * The names of the backup plan rules which point to this backupvault
+   * 
+ * + * repeated string backup_plan_rules = 4; + * + * @param index The index of the value to return. + * @return The bytes of the backupPlanRules at the given index. + */ + com.google.protobuf.ByteString getBackupPlanRulesBytes(int index); + + /** + * + * + *
+   * The name of the backup plan revision.
+   * 
+ * + * string backup_plan_revision_name = 5; + * + * @return The backupPlanRevisionName. + */ + java.lang.String getBackupPlanRevisionName(); + + /** + * + * + *
+   * The name of the backup plan revision.
+   * 
+ * + * string backup_plan_revision_name = 5; + * + * @return The bytes for backupPlanRevisionName. + */ + com.google.protobuf.ByteString getBackupPlanRevisionNameBytes(); + + /** + * + * + *
+   * The user friendly id of the backup plan revision.
+   * E.g. v0, v1 etc.
+   * 
+ * + * string backup_plan_revision_id = 6; + * + * @return The backupPlanRevisionId. + */ + java.lang.String getBackupPlanRevisionId(); + + /** + * + * + *
+   * The user friendly id of the backup plan revision.
+   * E.g. v0, v1 etc.
+   * 
+ * + * string backup_plan_revision_id = 6; + * + * @return The bytes for backupPlanRevisionId. + */ + com.google.protobuf.ByteString getBackupPlanRevisionIdBytes(); + + /** + * + * + *
+   * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+   * manages this datasource, if any.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The autoProtectionPolicyBinding. + */ + java.lang.String getAutoProtectionPolicyBinding(); + + /** + * + * + *
+   * Output only. The resource name of the `AutoProtectionPolicyBinding` that
+   * manages this datasource, if any.
+   * Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`.
+   * 
+ * + * + * string auto_protection_policy_binding = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for autoProtectionPolicyBinding. + */ + com.google.protobuf.ByteString getAutoProtectionPolicyBindingBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpResource.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpResource.java new file mode 100644 index 000000000000..7bf4c3b26e12 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpResource.java @@ -0,0 +1,980 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Minimum details to identify a Google Cloud resource
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GcpResource} + */ +@com.google.protobuf.Generated +public final class GcpResource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GcpResource) + GcpResourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GcpResource"); + } + + // Use GcpResource.newBuilder() to construct. + private GcpResource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GcpResource() { + gcpResourcename_ = ""; + location_ = ""; + type_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GcpResource.class, + com.google.cloud.backupdr.v1beta.GcpResource.Builder.class); + } + + public static final int GCP_RESOURCENAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object gcpResourcename_ = ""; + + /** + * + * + *
+   * Name of the Google Cloud resource.
+   * 
+ * + * string gcp_resourcename = 1; + * + * @return The gcpResourcename. + */ + @java.lang.Override + public java.lang.String getGcpResourcename() { + java.lang.Object ref = gcpResourcename_; + 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(); + gcpResourcename_ = s; + return s; + } + } + + /** + * + * + *
+   * Name of the Google Cloud resource.
+   * 
+ * + * string gcp_resourcename = 1; + * + * @return The bytes for gcpResourcename. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGcpResourcenameBytes() { + java.lang.Object ref = gcpResourcename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpResourcename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; + + /** + * + * + *
+   * Type of the resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } + } + + /** + * + * + *
+   * Type of the resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = 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.GeneratedMessage.isStringEmpty(gcpResourcename_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, gcpResourcename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gcpResourcename_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, gcpResourcename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, location_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, type_); + } + 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.backupdr.v1beta.GcpResource)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GcpResource other = + (com.google.cloud.backupdr.v1beta.GcpResource) obj; + + if (!getGcpResourcename().equals(other.getGcpResourcename())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (!getType().equals(other.getType())) 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) + GCP_RESOURCENAME_FIELD_NUMBER; + hash = (53 * hash) + getGcpResourcename().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.GcpResource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource 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.backupdr.v1beta.GcpResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource 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.backupdr.v1beta.GcpResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GcpResource 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Minimum details to identify a Google Cloud resource
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GcpResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GcpResource) + com.google.cloud.backupdr.v1beta.GcpResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GcpResource.class, + com.google.cloud.backupdr.v1beta.GcpResource.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GcpResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + gcpResourcename_ = ""; + location_ = ""; + type_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GcpResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpResource getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpResource build() { + com.google.cloud.backupdr.v1beta.GcpResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpResource buildPartial() { + com.google.cloud.backupdr.v1beta.GcpResource result = + new com.google.cloud.backupdr.v1beta.GcpResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.GcpResource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.gcpResourcename_ = gcpResourcename_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GcpResource) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GcpResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GcpResource other) { + if (other == com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance()) return this; + if (!other.getGcpResourcename().isEmpty()) { + gcpResourcename_ = other.gcpResourcename_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + 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: + { + gcpResourcename_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + type_ = 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 gcpResourcename_ = ""; + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @return The gcpResourcename. + */ + public java.lang.String getGcpResourcename() { + java.lang.Object ref = gcpResourcename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcpResourcename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @return The bytes for gcpResourcename. + */ + public com.google.protobuf.ByteString getGcpResourcenameBytes() { + java.lang.Object ref = gcpResourcename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcpResourcename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @param value The gcpResourcename to set. + * @return This builder for chaining. + */ + public Builder setGcpResourcename(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gcpResourcename_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @return This builder for chaining. + */ + public Builder clearGcpResourcename() { + gcpResourcename_ = getDefaultInstance().getGcpResourcename(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Name of the Google Cloud resource.
+     * 
+ * + * string gcp_resourcename = 1; + * + * @param value The bytes for gcpResourcename to set. + * @return This builder for chaining. + */ + public Builder setGcpResourcenameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gcpResourcename_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Location of the resource: <region>/<zone>/"global"/"unspecified".
+     * 
+ * + * string location = 2; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Type of the resource. Use the Unified Resource Type,
+     * eg. compute.googleapis.com/Instance.
+     * 
+ * + * string type = 3; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GcpResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GcpResource) + private static final com.google.cloud.backupdr.v1beta.GcpResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GcpResource(); + } + + public static com.google.cloud.backupdr.v1beta.GcpResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcpResource 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.backupdr.v1beta.GcpResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpResourceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpResourceOrBuilder.java new file mode 100644 index 000000000000..65049a9ed681 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GcpResourceOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GcpResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GcpResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the Google Cloud resource.
+   * 
+ * + * string gcp_resourcename = 1; + * + * @return The gcpResourcename. + */ + java.lang.String getGcpResourcename(); + + /** + * + * + *
+   * Name of the Google Cloud resource.
+   * 
+ * + * string gcp_resourcename = 1; + * + * @return The bytes for gcpResourcename. + */ + com.google.protobuf.ByteString getGcpResourcenameBytes(); + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
+   * Location of the resource: <region>/<zone>/"global"/"unspecified".
+   * 
+ * + * string location = 2; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Type of the resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The type. + */ + java.lang.String getType(); + + /** + * + * + *
+   * Type of the resource. Use the Unified Resource Type,
+   * eg. compute.googleapis.com/Instance.
+   * 
+ * + * string type = 3; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyBindingRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyBindingRequest.java new file mode 100644 index 000000000000..cbfa0e3ef3ad --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyBindingRequest.java @@ -0,0 +1,639 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for getting an AutoProtectionPolicyBinding.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class GetAutoProtectionPolicyBindingRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) + GetAutoProtectionPolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetAutoProtectionPolicyBindingRequest"); + } + + // Use GetAutoProtectionPolicyBindingRequest.newBuilder() to construct. + private GetAutoProtectionPolicyBindingRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAutoProtectionPolicyBindingRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest.class, + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the binding to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+   * 
+ * + * + * 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 name of the binding to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest other = + (com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) 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.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest 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.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest 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.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting an AutoProtectionPolicyBinding.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest.class, + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest build() { + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest result = + new com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + .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 name of the binding to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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 name of the binding to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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 name of the binding to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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 name of the binding to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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 name of the binding to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) + private static final com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAutoProtectionPolicyBindingRequest 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.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyBindingRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..805eeb9084ed --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyBindingRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetAutoProtectionPolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the binding to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the binding to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyRequest.java new file mode 100644 index 000000000000..ba56a1cca21e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyRequest.java @@ -0,0 +1,632 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for getting an AutoProtectionPolicy.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest} + */ +@com.google.protobuf.Generated +public final class GetAutoProtectionPolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) + GetAutoProtectionPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetAutoProtectionPolicyRequest"); + } + + // Use GetAutoProtectionPolicyRequest.newBuilder() to construct. + private GetAutoProtectionPolicyRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAutoProtectionPolicyRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.class, + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the policy to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * 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 name of the policy to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetAutoProtectionPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest other = + (com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) 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.backupdr.v1beta.GetAutoProtectionPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest 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.backupdr.v1beta.GetAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest 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.backupdr.v1beta.GetAutoProtectionPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetAutoProtectionPolicyRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting an AutoProtectionPolicy.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.class, + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_GetAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest build() { + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest result = + new com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest.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 name of the policy to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 name of the policy to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 name of the policy to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 name of the policy to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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 name of the policy to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) + private static final com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAutoProtectionPolicyRequest 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.backupdr.v1beta.GetAutoProtectionPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..66cdccf4c841 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetAutoProtectionPolicyRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetAutoProtectionPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the policy to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the policy to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanAssociationRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanAssociationRequest.java new file mode 100644 index 000000000000..580a1eb118ec --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanAssociationRequest.java @@ -0,0 +1,625 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for getting a BackupPlanAssociation resource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest} + */ +@com.google.protobuf.Generated +public final class GetBackupPlanAssociationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) + GetBackupPlanAssociationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetBackupPlanAssociationRequest"); + } + + // Use GetBackupPlanAssociationRequest.newBuilder() to construct. + private GetBackupPlanAssociationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetBackupPlanAssociationRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanAssociationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetBackupPlanAssociationRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest other = + (com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) 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.backupdr.v1beta.GetBackupPlanAssociationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest 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.backupdr.v1beta.GetBackupPlanAssociationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest 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.backupdr.v1beta.GetBackupPlanAssociationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetBackupPlanAssociationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting a BackupPlanAssociation resource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanAssociationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest build() { + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest result = + new com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest.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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) + private static final com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupPlanAssociationRequest 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.backupdr.v1beta.GetBackupPlanAssociationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanAssociationRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanAssociationRequestOrBuilder.java new file mode 100644 index 000000000000..76fb4ad01737 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanAssociationRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetBackupPlanAssociationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRequest.java new file mode 100644 index 000000000000..8fe3c8df1184 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRequest.java @@ -0,0 +1,625 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The request message for getting a `BackupPlan`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupPlanRequest} + */ +@com.google.protobuf.Generated +public final class GetBackupPlanRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetBackupPlanRequest) + GetBackupPlanRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetBackupPlanRequest"); + } + + // Use GetBackupPlanRequest.newBuilder() to construct. + private GetBackupPlanRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetBackupPlanRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the `BackupPlan` to retrieve.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * 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 resource name of the `BackupPlan` to retrieve.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetBackupPlanRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest other = + (com.google.cloud.backupdr.v1beta.GetBackupPlanRequest) 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.backupdr.v1beta.GetBackupPlanRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest 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.backupdr.v1beta.GetBackupPlanRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest 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.backupdr.v1beta.GetBackupPlanRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetBackupPlanRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request message for getting a `BackupPlan`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupPlanRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetBackupPlanRequest) + com.google.cloud.backupdr.v1beta.GetBackupPlanRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetBackupPlanRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetBackupPlanRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanRequest build() { + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetBackupPlanRequest result = + new com.google.cloud.backupdr.v1beta.GetBackupPlanRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.GetBackupPlanRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetBackupPlanRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetBackupPlanRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GetBackupPlanRequest other) { + if (other == com.google.cloud.backupdr.v1beta.GetBackupPlanRequest.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 resource name of the `BackupPlan` to retrieve.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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 resource name of the `BackupPlan` to retrieve.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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 resource name of the `BackupPlan` to retrieve.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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 resource name of the `BackupPlan` to retrieve.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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 resource name of the `BackupPlan` to retrieve.
+     *
+     * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetBackupPlanRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetBackupPlanRequest) + private static final com.google.cloud.backupdr.v1beta.GetBackupPlanRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetBackupPlanRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupPlanRequest 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.backupdr.v1beta.GetBackupPlanRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRequestOrBuilder.java new file mode 100644 index 000000000000..59d74af6eb92 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetBackupPlanRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetBackupPlanRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the `BackupPlan` to retrieve.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the `BackupPlan` to retrieve.
+   *
+   * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRevisionRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRevisionRequest.java new file mode 100644 index 000000000000..46243b81a45b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRevisionRequest.java @@ -0,0 +1,636 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The request message for getting a `BackupPlanRevision`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest} + */ +@com.google.protobuf.Generated +public final class GetBackupPlanRevisionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) + GetBackupPlanRevisionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetBackupPlanRevisionRequest"); + } + + // Use GetBackupPlanRevisionRequest.newBuilder() to construct. + private GetBackupPlanRevisionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetBackupPlanRevisionRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the `BackupPlanRevision` to retrieve.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+   * 
+ * + * + * 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 resource name of the `BackupPlanRevision` to retrieve.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetBackupPlanRevisionRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest other = + (com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) 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.backupdr.v1beta.GetBackupPlanRevisionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest 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.backupdr.v1beta.GetBackupPlanRevisionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest 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.backupdr.v1beta.GetBackupPlanRevisionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetBackupPlanRevisionRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request message for getting a `BackupPlanRevision`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRevisionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRevisionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupPlanRevisionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest build() { + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest result = + new com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest.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 resource name of the `BackupPlanRevision` to retrieve.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * 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 resource name of the `BackupPlanRevision` to retrieve.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * 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 resource name of the `BackupPlanRevision` to retrieve.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * 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 resource name of the `BackupPlanRevision` to retrieve.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * 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 resource name of the `BackupPlanRevision` to retrieve.
+     *
+     * Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) + private static final com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBackupPlanRevisionRequest 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.backupdr.v1beta.GetBackupPlanRevisionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRevisionRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRevisionRequestOrBuilder.java new file mode 100644 index 000000000000..09e9e7907522 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupPlanRevisionRequestOrBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetBackupPlanRevisionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the `BackupPlanRevision` to retrieve.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the `BackupPlanRevision` to retrieve.
+   *
+   * Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupRequest.java new file mode 100644 index 000000000000..17d85062bf82 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupRequest.java @@ -0,0 +1,793 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for getting a Backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupRequest} + */ +@com.google.protobuf.Generated +public final class GetBackupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetBackupRequest) + GetBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetBackupRequest"); + } + + // Use GetBackupRequest.newBuilder() to construct. + private GetBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetBackupRequest() { + name_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the data source resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+   * 
+ * + * + * 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. Name of the data source resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+   * 
+ * + * + * 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; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupView getView() { + com.google.cloud.backupdr.v1beta.BackupView result = + com.google.cloud.backupdr.v1beta.BackupView.forNumber(view_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupView.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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (view_ != com.google.cloud.backupdr.v1beta.BackupView.BACKUP_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (view_ != com.google.cloud.backupdr.v1beta.BackupView.BACKUP_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + 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.backupdr.v1beta.GetBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetBackupRequest other = + (com.google.cloud.backupdr.v1beta.GetBackupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.GetBackupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.GetBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.GetBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting a Backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetBackupRequest) + com.google.cloud.backupdr.v1beta.GetBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetBackupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupRequest build() { + com.google.cloud.backupdr.v1beta.GetBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetBackupRequest result = + new com.google.cloud.backupdr.v1beta.GetBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.GetBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetBackupRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GetBackupRequest other) { + if (other == com.google.cloud.backupdr.v1beta.GetBackupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+     * 
+ * + * + * 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+     * 
+ * + * + * 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+     * 
+ * + * + * 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+     * 
+ * + * + * 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+     * 
+ * + * + * 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; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupView getView() { + com.google.cloud.backupdr.v1beta.BackupView result = + com.google.cloud.backupdr.v1beta.BackupView.forNumber(view_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupView.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.backupdr.v1beta.BackupView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetBackupRequest) + private static final com.google.cloud.backupdr.v1beta.GetBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetBackupRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.GetBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupRequestOrBuilder.java new file mode 100644 index 000000000000..452440c79d66 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the data source resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the data source resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.backupdr.v1beta.BackupView getView(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupVaultRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupVaultRequest.java new file mode 100644 index 000000000000..250338914ad2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupVaultRequest.java @@ -0,0 +1,800 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for getting a BackupVault.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupVaultRequest} + */ +@com.google.protobuf.Generated +public final class GetBackupVaultRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetBackupVaultRequest) + GetBackupVaultRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetBackupVaultRequest"); + } + + // Use GetBackupVaultRequest.newBuilder() to construct. + private GetBackupVaultRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetBackupVaultRequest() { + name_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the backupvault store resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+   * 
+ * + * + * 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. Name of the backupvault store resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+   * 
+ * + * + * 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; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * Vault
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * Vault
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVaultView getView() { + com.google.cloud.backupdr.v1beta.BackupVaultView result = + com.google.cloud.backupdr.v1beta.BackupVaultView.forNumber(view_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupVaultView.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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (view_ + != com.google.cloud.backupdr.v1beta.BackupVaultView.BACKUP_VAULT_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (view_ + != com.google.cloud.backupdr.v1beta.BackupVaultView.BACKUP_VAULT_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + 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.backupdr.v1beta.GetBackupVaultRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest other = + (com.google.cloud.backupdr.v1beta.GetBackupVaultRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.GetBackupVaultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.GetBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.GetBackupVaultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupVaultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupVaultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupVaultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting a BackupVault.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBackupVaultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetBackupVaultRequest) + com.google.cloud.backupdr.v1beta.GetBackupVaultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest.class, + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetBackupVaultRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetBackupVaultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupVaultRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetBackupVaultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupVaultRequest build() { + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBackupVaultRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetBackupVaultRequest result = + new com.google.cloud.backupdr.v1beta.GetBackupVaultRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.GetBackupVaultRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetBackupVaultRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetBackupVaultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GetBackupVaultRequest other) { + if (other == com.google.cloud.backupdr.v1beta.GetBackupVaultRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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. Name of the backupvault store resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+     * 
+ * + * + * 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. Name of the backupvault store resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+     * 
+ * + * + * 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. Name of the backupvault store resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+     * 
+ * + * + * 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. Name of the backupvault store resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+     * 
+ * + * + * 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. Name of the backupvault store resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+     * 
+ * + * + * 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; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVaultView getView() { + com.google.cloud.backupdr.v1beta.BackupVaultView result = + com.google.cloud.backupdr.v1beta.BackupVaultView.forNumber(view_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVaultView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.backupdr.v1beta.BackupVaultView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetBackupVaultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetBackupVaultRequest) + private static final com.google.cloud.backupdr.v1beta.GetBackupVaultRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetBackupVaultRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.GetBackupVaultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupVaultRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupVaultRequestOrBuilder.java new file mode 100644 index 000000000000..15b78732ae1c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBackupVaultRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetBackupVaultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetBackupVaultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the backupvault store resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the backupvault store resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * Vault
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * Vault
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.backupdr.v1beta.BackupVaultView getView(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBindingMatchingResourceRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBindingMatchingResourceRequest.java new file mode 100644 index 000000000000..150b6522f4a4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBindingMatchingResourceRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for getting a BindingMatchingResource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest} + */ +@com.google.protobuf.Generated +public final class GetBindingMatchingResourceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) + GetBindingMatchingResourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetBindingMatchingResourceRequest"); + } + + // Use GetBindingMatchingResourceRequest.newBuilder() to construct. + private GetBindingMatchingResourceRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetBindingMatchingResourceRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_GetBindingMatchingResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_GetBindingMatchingResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest.class, + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the matching resource to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+   * 
+ * + * + * 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 name of the matching resource to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetBindingMatchingResourceRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest other = + (com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) 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.backupdr.v1beta.GetBindingMatchingResourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest 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.backupdr.v1beta.GetBindingMatchingResourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest 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.backupdr.v1beta.GetBindingMatchingResourceRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetBindingMatchingResourceRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting a BindingMatchingResource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_GetBindingMatchingResourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_GetBindingMatchingResourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest.class, + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_GetBindingMatchingResourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest build() { + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest result = + new com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest + .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 name of the matching resource to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+     * 
+ * + * + * 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 name of the matching resource to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+     * 
+ * + * + * 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 name of the matching resource to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+     * 
+ * + * + * 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 name of the matching resource to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+     * 
+ * + * + * 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 name of the matching resource to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) + private static final com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBindingMatchingResourceRequest 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.backupdr.v1beta.GetBindingMatchingResourceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBindingMatchingResourceRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBindingMatchingResourceRequestOrBuilder.java new file mode 100644 index 000000000000..ea5faa967717 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetBindingMatchingResourceRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetBindingMatchingResourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the matching resource to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the matching resource to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceReferenceRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceReferenceRequest.java new file mode 100644 index 000000000000..85ef3339cbae --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceReferenceRequest.java @@ -0,0 +1,631 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request for the GetDataSourceReference method.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest} + */ +@com.google.protobuf.Generated +public final class GetDataSourceReferenceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) + GetDataSourceReferenceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetDataSourceReferenceRequest"); + } + + // Use GetDataSourceReferenceRequest.newBuilder() to construct. + private GetDataSourceReferenceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetDataSourceReferenceRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceReferenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceReferenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.class, + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the DataSourceReference to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+   * 
+ * + * + * 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 name of the DataSourceReference to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetDataSourceReferenceRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest other = + (com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) 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.backupdr.v1beta.GetDataSourceReferenceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest 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.backupdr.v1beta.GetDataSourceReferenceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest 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.backupdr.v1beta.GetDataSourceReferenceRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetDataSourceReferenceRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for the GetDataSourceReference method.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceReferenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceReferenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.class, + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceReferenceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest build() { + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest result = + new com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest.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 name of the DataSourceReference to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * + * 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 name of the DataSourceReference to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * + * 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 name of the DataSourceReference to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * + * 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 name of the DataSourceReference to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * + * 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 name of the DataSourceReference to retrieve.
+     * Format:
+     * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) + private static final com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataSourceReferenceRequest 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.backupdr.v1beta.GetDataSourceReferenceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceReferenceRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceReferenceRequestOrBuilder.java new file mode 100644 index 000000000000..21b9bb3ee3bd --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceReferenceRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetDataSourceReferenceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the DataSourceReference to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the DataSourceReference to retrieve.
+   * Format:
+   * projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceRequest.java new file mode 100644 index 000000000000..ccf484177214 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceRequest.java @@ -0,0 +1,618 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for getting a DataSource instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetDataSourceRequest} + */ +@com.google.protobuf.Generated +public final class GetDataSourceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetDataSourceRequest) + GetDataSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetDataSourceRequest"); + } + + // Use GetDataSourceRequest.newBuilder() to construct. + private GetDataSourceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetDataSourceRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetDataSourceRequest.class, + com.google.cloud.backupdr.v1beta.GetDataSourceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the data source resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+   * 
+ * + * + * 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. Name of the data source resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetDataSourceRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetDataSourceRequest other = + (com.google.cloud.backupdr.v1beta.GetDataSourceRequest) 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.backupdr.v1beta.GetDataSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest 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.backupdr.v1beta.GetDataSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest 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.backupdr.v1beta.GetDataSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetDataSourceRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting a DataSource instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetDataSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetDataSourceRequest) + com.google.cloud.backupdr.v1beta.GetDataSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetDataSourceRequest.class, + com.google.cloud.backupdr.v1beta.GetDataSourceRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetDataSourceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_GetDataSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetDataSourceRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetDataSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetDataSourceRequest build() { + com.google.cloud.backupdr.v1beta.GetDataSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetDataSourceRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetDataSourceRequest result = + new com.google.cloud.backupdr.v1beta.GetDataSourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.GetDataSourceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetDataSourceRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetDataSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GetDataSourceRequest other) { + if (other == com.google.cloud.backupdr.v1beta.GetDataSourceRequest.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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+     * 
+ * + * + * 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+     * 
+ * + * + * 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+     * 
+ * + * + * 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+     * 
+ * + * + * 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. Name of the data source resource name, in the format
+     * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetDataSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetDataSourceRequest) + private static final com.google.cloud.backupdr.v1beta.GetDataSourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetDataSourceRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetDataSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataSourceRequest 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.backupdr.v1beta.GetDataSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceRequestOrBuilder.java new file mode 100644 index 000000000000..17c737ff91fe --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetDataSourceRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetDataSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetDataSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the data source resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the data source resource name, in the format
+   * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetManagementServerRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetManagementServerRequest.java new file mode 100644 index 000000000000..8e49fac45805 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetManagementServerRequest.java @@ -0,0 +1,618 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for getting a management server instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetManagementServerRequest} + */ +@com.google.protobuf.Generated +public final class GetManagementServerRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GetManagementServerRequest) + GetManagementServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetManagementServerRequest"); + } + + // Use GetManagementServerRequest.newBuilder() to construct. + private GetManagementServerRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetManagementServerRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_GetManagementServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_GetManagementServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetManagementServerRequest.class, + com.google.cloud.backupdr.v1beta.GetManagementServerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the management server resource name, in the format
+   * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+   * 
+ * + * + * 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. Name of the management server resource name, in the format
+   * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetManagementServerRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GetManagementServerRequest other = + (com.google.cloud.backupdr.v1beta.GetManagementServerRequest) 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.backupdr.v1beta.GetManagementServerRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest 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.backupdr.v1beta.GetManagementServerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest 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.backupdr.v1beta.GetManagementServerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GetManagementServerRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for getting a management server instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GetManagementServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GetManagementServerRequest) + com.google.cloud.backupdr.v1beta.GetManagementServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_GetManagementServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_GetManagementServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GetManagementServerRequest.class, + com.google.cloud.backupdr.v1beta.GetManagementServerRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GetManagementServerRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_GetManagementServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetManagementServerRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GetManagementServerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetManagementServerRequest build() { + com.google.cloud.backupdr.v1beta.GetManagementServerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GetManagementServerRequest buildPartial() { + com.google.cloud.backupdr.v1beta.GetManagementServerRequest result = + new com.google.cloud.backupdr.v1beta.GetManagementServerRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.GetManagementServerRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GetManagementServerRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GetManagementServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GetManagementServerRequest other) { + if (other == com.google.cloud.backupdr.v1beta.GetManagementServerRequest.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. Name of the management server resource name, in the format
+     * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+     * 
+ * + * + * 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. Name of the management server resource name, in the format
+     * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+     * 
+ * + * + * 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. Name of the management server resource name, in the format
+     * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+     * 
+ * + * + * 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. Name of the management server resource name, in the format
+     * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+     * 
+ * + * + * 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. Name of the management server resource name, in the format
+     * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GetManagementServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GetManagementServerRequest) + private static final com.google.cloud.backupdr.v1beta.GetManagementServerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GetManagementServerRequest(); + } + + public static com.google.cloud.backupdr.v1beta.GetManagementServerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetManagementServerRequest 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.backupdr.v1beta.GetManagementServerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetManagementServerRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetManagementServerRequestOrBuilder.java new file mode 100644 index 000000000000..741e84c93333 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GetManagementServerRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GetManagementServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GetManagementServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the management server resource name, in the format
+   * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the management server resource name, in the format
+   * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GuestOsFeature.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GuestOsFeature.java new file mode 100644 index 000000000000..91357bf438e0 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GuestOsFeature.java @@ -0,0 +1,1052 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Feature type of the Guest OS.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GuestOsFeature} + */ +@com.google.protobuf.Generated +public final class GuestOsFeature extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.GuestOsFeature) + GuestOsFeatureOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GuestOsFeature"); + } + + // Use GuestOsFeature.newBuilder() to construct. + private GuestOsFeature(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GuestOsFeature() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_GuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_GuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GuestOsFeature.class, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder.class); + } + + /** + * + * + *
+   * List of the Feature Types.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType} + */ + public enum FeatureType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value, which is unused.
+     * 
+ * + * FEATURE_TYPE_UNSPECIFIED = 0; + */ + FEATURE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * VIRTIO_SCSI_MULTIQUEUE feature type.
+     * 
+ * + * VIRTIO_SCSI_MULTIQUEUE = 1; + */ + VIRTIO_SCSI_MULTIQUEUE(1), + /** + * + * + *
+     * WINDOWS feature type.
+     * 
+ * + * WINDOWS = 2; + */ + WINDOWS(2), + /** + * + * + *
+     * MULTI_IP_SUBNET feature type.
+     * 
+ * + * MULTI_IP_SUBNET = 3; + */ + MULTI_IP_SUBNET(3), + /** + * + * + *
+     * UEFI_COMPATIBLE feature type.
+     * 
+ * + * UEFI_COMPATIBLE = 4; + */ + UEFI_COMPATIBLE(4), + /** + * + * + *
+     * SECURE_BOOT feature type.
+     * 
+ * + * SECURE_BOOT = 5; + */ + SECURE_BOOT(5), + /** + * + * + *
+     * GVNIC feature type.
+     * 
+ * + * GVNIC = 6; + */ + GVNIC(6), + /** + * + * + *
+     * SEV_CAPABLE feature type.
+     * 
+ * + * SEV_CAPABLE = 7; + */ + SEV_CAPABLE(7), + /** + * + * + *
+     * BARE_METAL_LINUX_COMPATIBLE feature type.
+     * 
+ * + * BARE_METAL_LINUX_COMPATIBLE = 8; + */ + BARE_METAL_LINUX_COMPATIBLE(8), + /** + * + * + *
+     * SUSPEND_RESUME_COMPATIBLE feature type.
+     * 
+ * + * SUSPEND_RESUME_COMPATIBLE = 9; + */ + SUSPEND_RESUME_COMPATIBLE(9), + /** + * + * + *
+     * SEV_LIVE_MIGRATABLE feature type.
+     * 
+ * + * SEV_LIVE_MIGRATABLE = 10; + */ + SEV_LIVE_MIGRATABLE(10), + /** + * + * + *
+     * SEV_SNP_CAPABLE feature type.
+     * 
+ * + * SEV_SNP_CAPABLE = 11; + */ + SEV_SNP_CAPABLE(11), + /** + * + * + *
+     * TDX_CAPABLE feature type.
+     * 
+ * + * TDX_CAPABLE = 12; + */ + TDX_CAPABLE(12), + /** + * + * + *
+     * IDPF feature type.
+     * 
+ * + * IDPF = 13; + */ + IDPF(13), + /** + * + * + *
+     * SEV_LIVE_MIGRATABLE_V2 feature type.
+     * 
+ * + * SEV_LIVE_MIGRATABLE_V2 = 14; + */ + SEV_LIVE_MIGRATABLE_V2(14), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "FeatureType"); + } + + /** + * + * + *
+     * Default value, which is unused.
+     * 
+ * + * FEATURE_TYPE_UNSPECIFIED = 0; + */ + public static final int FEATURE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * VIRTIO_SCSI_MULTIQUEUE feature type.
+     * 
+ * + * VIRTIO_SCSI_MULTIQUEUE = 1; + */ + public static final int VIRTIO_SCSI_MULTIQUEUE_VALUE = 1; + + /** + * + * + *
+     * WINDOWS feature type.
+     * 
+ * + * WINDOWS = 2; + */ + public static final int WINDOWS_VALUE = 2; + + /** + * + * + *
+     * MULTI_IP_SUBNET feature type.
+     * 
+ * + * MULTI_IP_SUBNET = 3; + */ + public static final int MULTI_IP_SUBNET_VALUE = 3; + + /** + * + * + *
+     * UEFI_COMPATIBLE feature type.
+     * 
+ * + * UEFI_COMPATIBLE = 4; + */ + public static final int UEFI_COMPATIBLE_VALUE = 4; + + /** + * + * + *
+     * SECURE_BOOT feature type.
+     * 
+ * + * SECURE_BOOT = 5; + */ + public static final int SECURE_BOOT_VALUE = 5; + + /** + * + * + *
+     * GVNIC feature type.
+     * 
+ * + * GVNIC = 6; + */ + public static final int GVNIC_VALUE = 6; + + /** + * + * + *
+     * SEV_CAPABLE feature type.
+     * 
+ * + * SEV_CAPABLE = 7; + */ + public static final int SEV_CAPABLE_VALUE = 7; + + /** + * + * + *
+     * BARE_METAL_LINUX_COMPATIBLE feature type.
+     * 
+ * + * BARE_METAL_LINUX_COMPATIBLE = 8; + */ + public static final int BARE_METAL_LINUX_COMPATIBLE_VALUE = 8; + + /** + * + * + *
+     * SUSPEND_RESUME_COMPATIBLE feature type.
+     * 
+ * + * SUSPEND_RESUME_COMPATIBLE = 9; + */ + public static final int SUSPEND_RESUME_COMPATIBLE_VALUE = 9; + + /** + * + * + *
+     * SEV_LIVE_MIGRATABLE feature type.
+     * 
+ * + * SEV_LIVE_MIGRATABLE = 10; + */ + public static final int SEV_LIVE_MIGRATABLE_VALUE = 10; + + /** + * + * + *
+     * SEV_SNP_CAPABLE feature type.
+     * 
+ * + * SEV_SNP_CAPABLE = 11; + */ + public static final int SEV_SNP_CAPABLE_VALUE = 11; + + /** + * + * + *
+     * TDX_CAPABLE feature type.
+     * 
+ * + * TDX_CAPABLE = 12; + */ + public static final int TDX_CAPABLE_VALUE = 12; + + /** + * + * + *
+     * IDPF feature type.
+     * 
+ * + * IDPF = 13; + */ + public static final int IDPF_VALUE = 13; + + /** + * + * + *
+     * SEV_LIVE_MIGRATABLE_V2 feature type.
+     * 
+ * + * SEV_LIVE_MIGRATABLE_V2 = 14; + */ + public static final int SEV_LIVE_MIGRATABLE_V2_VALUE = 14; + + 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 FeatureType 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 FeatureType forNumber(int value) { + switch (value) { + case 0: + return FEATURE_TYPE_UNSPECIFIED; + case 1: + return VIRTIO_SCSI_MULTIQUEUE; + case 2: + return WINDOWS; + case 3: + return MULTI_IP_SUBNET; + case 4: + return UEFI_COMPATIBLE; + case 5: + return SECURE_BOOT; + case 6: + return GVNIC; + case 7: + return SEV_CAPABLE; + case 8: + return BARE_METAL_LINUX_COMPATIBLE; + case 9: + return SUSPEND_RESUME_COMPATIBLE; + case 10: + return SEV_LIVE_MIGRATABLE; + case 11: + return SEV_SNP_CAPABLE; + case 12: + return TDX_CAPABLE; + case 13: + return IDPF; + case 14: + return SEV_LIVE_MIGRATABLE_V2; + 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 FeatureType findValueByNumber(int number) { + return FeatureType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.GuestOsFeature.getDescriptor().getEnumTypes().get(0); + } + + private static final FeatureType[] VALUES = values(); + + public static FeatureType 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 FeatureType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType) + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+   * The ID of a supported feature.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The ID of a supported feature.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * The ID of a supported feature.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType getType() { + com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType result = + com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + 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.backupdr.v1beta.GuestOsFeature)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.GuestOsFeature other = + (com.google.cloud.backupdr.v1beta.GuestOsFeature) obj; + + if (hasType() != other.hasType()) return false; + if (hasType()) { + if (type_ != other.type_) 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 (hasType()) { + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature 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.backupdr.v1beta.GuestOsFeature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature 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.backupdr.v1beta.GuestOsFeature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.GuestOsFeature 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Feature type of the Guest OS.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.GuestOsFeature} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.GuestOsFeature) + com.google.cloud.backupdr.v1beta.GuestOsFeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_GuestOsFeature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_GuestOsFeature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.GuestOsFeature.class, + com.google.cloud.backupdr.v1beta.GuestOsFeature.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.GuestOsFeature.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_GuestOsFeature_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeature getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.GuestOsFeature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeature build() { + com.google.cloud.backupdr.v1beta.GuestOsFeature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeature buildPartial() { + com.google.cloud.backupdr.v1beta.GuestOsFeature result = + new com.google.cloud.backupdr.v1beta.GuestOsFeature(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.GuestOsFeature result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.GuestOsFeature) { + return mergeFrom((com.google.cloud.backupdr.v1beta.GuestOsFeature) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.GuestOsFeature other) { + if (other == com.google.cloud.backupdr.v1beta.GuestOsFeature.getDefaultInstance()) + return this; + if (other.hasType()) { + setTypeValue(other.getTypeValue()); + } + 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 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 int type_ = 0; + + /** + * + * + *
+     * The ID of a supported feature.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return Whether the type field is set. + */ + @java.lang.Override + public boolean hasType() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The ID of a supported feature.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * The ID of a supported feature.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID of a supported feature.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType getType() { + com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType result = + com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The ID of a supported feature.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The ID of a supported feature.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.GuestOsFeature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.GuestOsFeature) + private static final com.google.cloud.backupdr.v1beta.GuestOsFeature DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.GuestOsFeature(); + } + + public static com.google.cloud.backupdr.v1beta.GuestOsFeature getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GuestOsFeature 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.backupdr.v1beta.GuestOsFeature getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GuestOsFeatureOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GuestOsFeatureOrBuilder.java new file mode 100644 index 000000000000..f4895430aa23 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/GuestOsFeatureOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface GuestOsFeatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.GuestOsFeature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The ID of a supported feature.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return Whether the type field is set. + */ + boolean hasType(); + + /** + * + * + *
+   * The ID of a supported feature.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * The ID of a supported feature.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType type = 1; + * + * @return The type. + */ + com.google.cloud.backupdr.v1beta.GuestOsFeature.FeatureType getType(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceRequest.java new file mode 100644 index 000000000000..bc82fe83a167 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceRequest.java @@ -0,0 +1,1872 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for initializing the service.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.InitializeServiceRequest} + */ +@com.google.protobuf.Generated +public final class InitializeServiceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.InitializeServiceRequest) + InitializeServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InitializeServiceRequest"); + } + + // Use InitializeServiceRequest.newBuilder() to construct. + private InitializeServiceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InitializeServiceRequest() { + name_ = ""; + resourceType_ = ""; + requestId_ = ""; + backupPlanLocation_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.InitializeServiceRequest.class, + com.google.cloud.backupdr.v1beta.InitializeServiceRequest.Builder.class); + } + + private int initializationConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object initializationConfig_; + + public enum InitializationConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_SQL_INSTANCE_INITIALIZATION_CONFIG(4), + INITIALIZATIONCONFIG_NOT_SET(0); + private final int value; + + private InitializationConfigCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InitializationConfigCase valueOf(int value) { + return forNumber(value); + } + + public static InitializationConfigCase forNumber(int value) { + switch (value) { + case 4: + return CLOUD_SQL_INSTANCE_INITIALIZATION_CONFIG; + case 0: + return INITIALIZATIONCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InitializationConfigCase getInitializationConfigCase() { + return InitializationConfigCase.forNumber(initializationConfigCase_); + } + + public static final int CLOUD_SQL_INSTANCE_INITIALIZATION_CONFIG_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Optional. The configuration for initializing a Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudSqlInstanceInitializationConfig field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceInitializationConfig() { + return initializationConfigCase_ == 4; + } + + /** + * + * + *
+   * Optional. The configuration for initializing a Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudSqlInstanceInitializationConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + getCloudSqlInstanceInitializationConfig() { + if (initializationConfigCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + initializationConfig_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. The configuration for initializing a Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfigOrBuilder + getCloudSqlInstanceInitializationConfigOrBuilder() { + if (initializationConfigCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + initializationConfig_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the serviceConfig used to initialize the
+   * service. The location must be the location of the BackupVault.
+   * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 resource name of the serviceConfig used to initialize the
+   * service. The location must be the location of the BackupVault.
+   * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 RESOURCE_TYPE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceType_ = ""; + + /** + * + * + *
+   * Required. The resource type to which the default service config will be
+   * applied. Examples include, "compute.googleapis.com/Instance" and
+   * "storage.googleapis.com/Bucket".
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + @java.lang.Override + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + 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(); + resourceType_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource type to which the default service config will be
+   * applied. Examples include, "compute.googleapis.com/Instance" and
+   * "storage.googleapis.com/Bucket".
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_LOCATION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanLocation_ = ""; + + /** + * + * + *
+   * Optional. The location where the BackupPlan will be created. This field is
+   * required for multi-region BackupVaults and is optional for regional
+   * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+   * allowing the BackupPlan to reside in a specific region within that
+   * multi-region. If this field is not provided, the BackupPlan will be created
+   * in the same location as specified in the `name` field.
+   * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The backupPlanLocation. + */ + @java.lang.Override + public java.lang.String getBackupPlanLocation() { + java.lang.Object ref = backupPlanLocation_; + 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(); + backupPlanLocation_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The location where the BackupPlan will be created. This field is
+   * required for multi-region BackupVaults and is optional for regional
+   * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+   * allowing the BackupPlan to reside in a specific region within that
+   * multi-region. If this field is not provided, the BackupPlan will be created
+   * in the same location as specified in the `name` field.
+   * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for backupPlanLocation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanLocationBytes() { + java.lang.Object ref = backupPlanLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 7; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validates the request and returns the result, but does
+   * not actually run it.
+   * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, resourceType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + if (initializationConfigCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + initializationConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanLocation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, backupPlanLocation_); + } + if (validateOnly_ != false) { + output.writeBool(7, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, resourceType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + if (initializationConfigCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + initializationConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanLocation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, backupPlanLocation_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, validateOnly_); + } + 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.backupdr.v1beta.InitializeServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.InitializeServiceRequest other = + (com.google.cloud.backupdr.v1beta.InitializeServiceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getResourceType().equals(other.getResourceType())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getBackupPlanLocation().equals(other.getBackupPlanLocation())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getInitializationConfigCase().equals(other.getInitializationConfigCase())) return false; + switch (initializationConfigCase_) { + case 4: + if (!getCloudSqlInstanceInitializationConfig() + .equals(other.getCloudSqlInstanceInitializationConfig())) return false; + break; + case 0: + default: + } + 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) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getResourceType().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanLocation().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + switch (initializationConfigCase_) { + case 4: + hash = (37 * hash) + CLOUD_SQL_INSTANCE_INITIALIZATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlInstanceInitializationConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest 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.backupdr.v1beta.InitializeServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest 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.backupdr.v1beta.InitializeServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.InitializeServiceRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for initializing the service.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.InitializeServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.InitializeServiceRequest) + com.google.cloud.backupdr.v1beta.InitializeServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.InitializeServiceRequest.class, + com.google.cloud.backupdr.v1beta.InitializeServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.InitializeServiceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (cloudSqlInstanceInitializationConfigBuilder_ != null) { + cloudSqlInstanceInitializationConfigBuilder_.clear(); + } + name_ = ""; + resourceType_ = ""; + requestId_ = ""; + backupPlanLocation_ = ""; + validateOnly_ = false; + initializationConfigCase_ = 0; + initializationConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitializeServiceRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.InitializeServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitializeServiceRequest build() { + com.google.cloud.backupdr.v1beta.InitializeServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitializeServiceRequest buildPartial() { + com.google.cloud.backupdr.v1beta.InitializeServiceRequest result = + new com.google.cloud.backupdr.v1beta.InitializeServiceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.InitializeServiceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.resourceType_ = resourceType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.backupPlanLocation_ = backupPlanLocation_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + private void buildPartialOneofs( + com.google.cloud.backupdr.v1beta.InitializeServiceRequest result) { + result.initializationConfigCase_ = initializationConfigCase_; + result.initializationConfig_ = this.initializationConfig_; + if (initializationConfigCase_ == 4 && cloudSqlInstanceInitializationConfigBuilder_ != null) { + result.initializationConfig_ = cloudSqlInstanceInitializationConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.InitializeServiceRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.InitializeServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.InitializeServiceRequest other) { + if (other == com.google.cloud.backupdr.v1beta.InitializeServiceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getResourceType().isEmpty()) { + resourceType_ = other.resourceType_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getBackupPlanLocation().isEmpty()) { + backupPlanLocation_ = other.backupPlanLocation_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + switch (other.getInitializationConfigCase()) { + case CLOUD_SQL_INSTANCE_INITIALIZATION_CONFIG: + { + mergeCloudSqlInstanceInitializationConfig( + other.getCloudSqlInstanceInitializationConfig()); + break; + } + case INITIALIZATIONCONFIG_NOT_SET: + { + break; + } + } + 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_ |= 0x00000002; + break; + } // case 10 + case 18: + { + resourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCloudSqlInstanceInitializationConfigFieldBuilder().getBuilder(), + extensionRegistry); + initializationConfigCase_ = 4; + break; + } // case 34 + case 50: + { + backupPlanLocation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 56: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 56 + 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 initializationConfigCase_ = 0; + private java.lang.Object initializationConfig_; + + public InitializationConfigCase getInitializationConfigCase() { + return InitializationConfigCase.forNumber(initializationConfigCase_); + } + + public Builder clearInitializationConfig() { + initializationConfigCase_ = 0; + initializationConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfigOrBuilder> + cloudSqlInstanceInitializationConfigBuilder_; + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudSqlInstanceInitializationConfig field is set. + */ + @java.lang.Override + public boolean hasCloudSqlInstanceInitializationConfig() { + return initializationConfigCase_ == 4; + } + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudSqlInstanceInitializationConfig. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + getCloudSqlInstanceInitializationConfig() { + if (cloudSqlInstanceInitializationConfigBuilder_ == null) { + if (initializationConfigCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + initializationConfig_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance(); + } else { + if (initializationConfigCase_ == 4) { + return cloudSqlInstanceInitializationConfigBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCloudSqlInstanceInitializationConfig( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig value) { + if (cloudSqlInstanceInitializationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + initializationConfig_ = value; + onChanged(); + } else { + cloudSqlInstanceInitializationConfigBuilder_.setMessage(value); + } + initializationConfigCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCloudSqlInstanceInitializationConfig( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Builder + builderForValue) { + if (cloudSqlInstanceInitializationConfigBuilder_ == null) { + initializationConfig_ = builderForValue.build(); + onChanged(); + } else { + cloudSqlInstanceInitializationConfigBuilder_.setMessage(builderForValue.build()); + } + initializationConfigCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCloudSqlInstanceInitializationConfig( + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig value) { + if (cloudSqlInstanceInitializationConfigBuilder_ == null) { + if (initializationConfigCase_ == 4 + && initializationConfig_ + != com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance()) { + initializationConfig_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.newBuilder( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + initializationConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + initializationConfig_ = value; + } + onChanged(); + } else { + if (initializationConfigCase_ == 4) { + cloudSqlInstanceInitializationConfigBuilder_.mergeFrom(value); + } else { + cloudSqlInstanceInitializationConfigBuilder_.setMessage(value); + } + } + initializationConfigCase_ = 4; + return this; + } + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCloudSqlInstanceInitializationConfig() { + if (cloudSqlInstanceInitializationConfigBuilder_ == null) { + if (initializationConfigCase_ == 4) { + initializationConfigCase_ = 0; + initializationConfig_ = null; + onChanged(); + } + } else { + if (initializationConfigCase_ == 4) { + initializationConfigCase_ = 0; + initializationConfig_ = null; + } + cloudSqlInstanceInitializationConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Builder + getCloudSqlInstanceInitializationConfigBuilder() { + return internalGetCloudSqlInstanceInitializationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfigOrBuilder + getCloudSqlInstanceInitializationConfigOrBuilder() { + if ((initializationConfigCase_ == 4) + && (cloudSqlInstanceInitializationConfigBuilder_ != null)) { + return cloudSqlInstanceInitializationConfigBuilder_.getMessageOrBuilder(); + } else { + if (initializationConfigCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + initializationConfig_; + } + return com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The configuration for initializing a Cloud SQL instance.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfigOrBuilder> + internalGetCloudSqlInstanceInitializationConfigFieldBuilder() { + if (cloudSqlInstanceInitializationConfigBuilder_ == null) { + if (!(initializationConfigCase_ == 4)) { + initializationConfig_ = + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + .getDefaultInstance(); + } + cloudSqlInstanceInitializationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig.Builder, + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfigOrBuilder>( + (com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig) + initializationConfig_, + getParentForChildren(), + isClean()); + initializationConfig_ = null; + } + initializationConfigCase_ = 4; + onChanged(); + return cloudSqlInstanceInitializationConfigBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the serviceConfig used to initialize the
+     * service. The location must be the location of the BackupVault.
+     * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 resource name of the serviceConfig used to initialize the
+     * service. The location must be the location of the BackupVault.
+     * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 resource name of the serviceConfig used to initialize the
+     * service. The location must be the location of the BackupVault.
+     * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the serviceConfig used to initialize the
+     * service. The location must be the location of the BackupVault.
+     * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the serviceConfig used to initialize the
+     * service. The location must be the location of the BackupVault.
+     * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object resourceType_ = ""; + + /** + * + * + *
+     * Required. The resource type to which the default service config will be
+     * applied. Examples include, "compute.googleapis.com/Instance" and
+     * "storage.googleapis.com/Bucket".
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + public java.lang.String getResourceType() { + java.lang.Object ref = resourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource type to which the default service config will be
+     * applied. Examples include, "compute.googleapis.com/Instance" and
+     * "storage.googleapis.com/Bucket".
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + public com.google.protobuf.ByteString getResourceTypeBytes() { + java.lang.Object ref = resourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource type to which the default service config will be
+     * applied. Examples include, "compute.googleapis.com/Instance" and
+     * "storage.googleapis.com/Bucket".
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource type to which the default service config will be
+     * applied. Examples include, "compute.googleapis.com/Instance" and
+     * "storage.googleapis.com/Bucket".
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + resourceType_ = getDefaultInstance().getResourceType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource type to which the default service config will be
+     * applied. Examples include, "compute.googleapis.com/Instance" and
+     * "storage.googleapis.com/Bucket".
+     * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object backupPlanLocation_ = ""; + + /** + * + * + *
+     * Optional. The location where the BackupPlan will be created. This field is
+     * required for multi-region BackupVaults and is optional for regional
+     * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+     * allowing the BackupPlan to reside in a specific region within that
+     * multi-region. If this field is not provided, the BackupPlan will be created
+     * in the same location as specified in the `name` field.
+     * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The backupPlanLocation. + */ + public java.lang.String getBackupPlanLocation() { + java.lang.Object ref = backupPlanLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The location where the BackupPlan will be created. This field is
+     * required for multi-region BackupVaults and is optional for regional
+     * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+     * allowing the BackupPlan to reside in a specific region within that
+     * multi-region. If this field is not provided, the BackupPlan will be created
+     * in the same location as specified in the `name` field.
+     * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for backupPlanLocation. + */ + public com.google.protobuf.ByteString getBackupPlanLocationBytes() { + java.lang.Object ref = backupPlanLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The location where the BackupPlan will be created. This field is
+     * required for multi-region BackupVaults and is optional for regional
+     * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+     * allowing the BackupPlan to reside in a specific region within that
+     * multi-region. If this field is not provided, the BackupPlan will be created
+     * in the same location as specified in the `name` field.
+     * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The backupPlanLocation to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanLocation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The location where the BackupPlan will be created. This field is
+     * required for multi-region BackupVaults and is optional for regional
+     * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+     * allowing the BackupPlan to reside in a specific region within that
+     * multi-region. If this field is not provided, the BackupPlan will be created
+     * in the same location as specified in the `name` field.
+     * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanLocation() { + backupPlanLocation_ = getDefaultInstance().getBackupPlanLocation(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The location where the BackupPlan will be created. This field is
+     * required for multi-region BackupVaults and is optional for regional
+     * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+     * allowing the BackupPlan to reside in a specific region within that
+     * multi-region. If this field is not provided, the BackupPlan will be created
+     * in the same location as specified in the `name` field.
+     * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for backupPlanLocation to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanLocation_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validates the request and returns the result, but does
+     * not actually run it.
+     * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validates the request and returns the result, but does
+     * not actually run it.
+     * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validates the request and returns the result, but does
+     * not actually run it.
+     * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000020); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.InitializeServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.InitializeServiceRequest) + private static final com.google.cloud.backupdr.v1beta.InitializeServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.InitializeServiceRequest(); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InitializeServiceRequest 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.backupdr.v1beta.InitializeServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceRequestOrBuilder.java new file mode 100644 index 000000000000..1f503ecf1ae8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceRequestOrBuilder.java @@ -0,0 +1,240 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface InitializeServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.InitializeServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The configuration for initializing a Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the cloudSqlInstanceInitializationConfig field is set. + */ + boolean hasCloudSqlInstanceInitializationConfig(); + + /** + * + * + *
+   * Optional. The configuration for initializing a Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudSqlInstanceInitializationConfig. + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig + getCloudSqlInstanceInitializationConfig(); + + /** + * + * + *
+   * Optional. The configuration for initializing a Cloud SQL instance.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfig cloud_sql_instance_initialization_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.CloudSqlInstanceInitializationConfigOrBuilder + getCloudSqlInstanceInitializationConfigOrBuilder(); + + /** + * + * + *
+   * Required. The resource name of the serviceConfig used to initialize the
+   * service. The location must be the location of the BackupVault.
+   * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the serviceConfig used to initialize the
+   * service. The location must be the location of the BackupVault.
+   * Format: `projects/{project_id}/locations/{location}/serviceConfig`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The resource type to which the default service config will be
+   * applied. Examples include, "compute.googleapis.com/Instance" and
+   * "storage.googleapis.com/Bucket".
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resourceType. + */ + java.lang.String getResourceType(); + + /** + * + * + *
+   * Required. The resource type to which the default service config will be
+   * applied. Examples include, "compute.googleapis.com/Instance" and
+   * "storage.googleapis.com/Bucket".
+   * 
+ * + * string resource_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resourceType. + */ + com.google.protobuf.ByteString getResourceTypeBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. The location where the BackupPlan will be created. This field is
+   * required for multi-region BackupVaults and is optional for regional
+   * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+   * allowing the BackupPlan to reside in a specific region within that
+   * multi-region. If this field is not provided, the BackupPlan will be created
+   * in the same location as specified in the `name` field.
+   * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The backupPlanLocation. + */ + java.lang.String getBackupPlanLocation(); + + /** + * + * + *
+   * Optional. The location where the BackupPlan will be created. This field is
+   * required for multi-region BackupVaults and is optional for regional
+   * BackupVaults. It is useful when creating a Backup Vault in a multi-region,
+   * allowing the BackupPlan to reside in a specific region within that
+   * multi-region. If this field is not provided, the BackupPlan will be created
+   * in the same location as specified in the `name` field.
+   * 
+ * + * string backup_plan_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for backupPlanLocation. + */ + com.google.protobuf.ByteString getBackupPlanLocationBytes(); + + /** + * + * + *
+   * Optional. If set, validates the request and returns the result, but does
+   * not actually run it.
+   * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + com.google.cloud.backupdr.v1beta.InitializeServiceRequest.InitializationConfigCase + getInitializationConfigCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceResponse.java new file mode 100644 index 000000000000..a87be264e581 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceResponse.java @@ -0,0 +1,814 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for initializing the service.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.InitializeServiceResponse} + */ +@com.google.protobuf.Generated +public final class InitializeServiceResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.InitializeServiceResponse) + InitializeServiceResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InitializeServiceResponse"); + } + + // Use InitializeServiceResponse.newBuilder() to construct. + private InitializeServiceResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InitializeServiceResponse() { + backupVaultName_ = ""; + backupPlanName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.InitializeServiceResponse.class, + com.google.cloud.backupdr.v1beta.InitializeServiceResponse.Builder.class); + } + + public static final int BACKUP_VAULT_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupVaultName_ = ""; + + /** + * + * + *
+   * The resource name of the default `BackupVault` created.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * 
+ * + * string backup_vault_name = 1; + * + * @return The backupVaultName. + */ + @java.lang.Override + public java.lang.String getBackupVaultName() { + java.lang.Object ref = backupVaultName_; + 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(); + backupVaultName_ = s; + return s; + } + } + + /** + * + * + *
+   * The resource name of the default `BackupVault` created.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * 
+ * + * string backup_vault_name = 1; + * + * @return The bytes for backupVaultName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupVaultNameBytes() { + java.lang.Object ref = backupVaultName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupVaultName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKUP_PLAN_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object backupPlanName_ = ""; + + /** + * + * + *
+   * The resource name of the default `BackupPlan` created.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+   * 
+ * + * string backup_plan_name = 2; + * + * @return The backupPlanName. + */ + @java.lang.Override + public java.lang.String getBackupPlanName() { + java.lang.Object ref = backupPlanName_; + 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(); + backupPlanName_ = s; + return s; + } + } + + /** + * + * + *
+   * The resource name of the default `BackupPlan` created.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+   * 
+ * + * string backup_plan_name = 2; + * + * @return The bytes for backupPlanName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBackupPlanNameBytes() { + java.lang.Object ref = backupPlanName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanName_ = 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.GeneratedMessage.isStringEmpty(backupVaultName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, backupVaultName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, backupPlanName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupVaultName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, backupVaultName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(backupPlanName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, backupPlanName_); + } + 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.backupdr.v1beta.InitializeServiceResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.InitializeServiceResponse other = + (com.google.cloud.backupdr.v1beta.InitializeServiceResponse) obj; + + if (!getBackupVaultName().equals(other.getBackupVaultName())) return false; + if (!getBackupPlanName().equals(other.getBackupPlanName())) 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) + BACKUP_VAULT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBackupVaultName().hashCode(); + hash = (37 * hash) + BACKUP_PLAN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse 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.backupdr.v1beta.InitializeServiceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse 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.backupdr.v1beta.InitializeServiceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.InitializeServiceResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for initializing the service.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.InitializeServiceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.InitializeServiceResponse) + com.google.cloud.backupdr.v1beta.InitializeServiceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.InitializeServiceResponse.class, + com.google.cloud.backupdr.v1beta.InitializeServiceResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.InitializeServiceResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupVaultName_ = ""; + backupPlanName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_InitializeServiceResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitializeServiceResponse getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.InitializeServiceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitializeServiceResponse build() { + com.google.cloud.backupdr.v1beta.InitializeServiceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitializeServiceResponse buildPartial() { + com.google.cloud.backupdr.v1beta.InitializeServiceResponse result = + new com.google.cloud.backupdr.v1beta.InitializeServiceResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.InitializeServiceResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backupVaultName_ = backupVaultName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupPlanName_ = backupPlanName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.InitializeServiceResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.InitializeServiceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.InitializeServiceResponse other) { + if (other == com.google.cloud.backupdr.v1beta.InitializeServiceResponse.getDefaultInstance()) + return this; + if (!other.getBackupVaultName().isEmpty()) { + backupVaultName_ = other.backupVaultName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBackupPlanName().isEmpty()) { + backupPlanName_ = other.backupPlanName_; + bitField0_ |= 0x00000002; + 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: + { + backupVaultName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + backupPlanName_ = input.readStringRequireUtf8(); + 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 java.lang.Object backupVaultName_ = ""; + + /** + * + * + *
+     * The resource name of the default `BackupVault` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string backup_vault_name = 1; + * + * @return The backupVaultName. + */ + public java.lang.String getBackupVaultName() { + java.lang.Object ref = backupVaultName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupVaultName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The resource name of the default `BackupVault` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string backup_vault_name = 1; + * + * @return The bytes for backupVaultName. + */ + public com.google.protobuf.ByteString getBackupVaultNameBytes() { + java.lang.Object ref = backupVaultName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupVaultName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The resource name of the default `BackupVault` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string backup_vault_name = 1; + * + * @param value The backupVaultName to set. + * @return This builder for chaining. + */ + public Builder setBackupVaultName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupVaultName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The resource name of the default `BackupVault` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string backup_vault_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearBackupVaultName() { + backupVaultName_ = getDefaultInstance().getBackupVaultName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The resource name of the default `BackupVault` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+     * 
+ * + * string backup_vault_name = 1; + * + * @param value The bytes for backupVaultName to set. + * @return This builder for chaining. + */ + public Builder setBackupVaultNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupVaultName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object backupPlanName_ = ""; + + /** + * + * + *
+     * The resource name of the default `BackupPlan` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+     * 
+ * + * string backup_plan_name = 2; + * + * @return The backupPlanName. + */ + public java.lang.String getBackupPlanName() { + java.lang.Object ref = backupPlanName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + backupPlanName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The resource name of the default `BackupPlan` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+     * 
+ * + * string backup_plan_name = 2; + * + * @return The bytes for backupPlanName. + */ + public com.google.protobuf.ByteString getBackupPlanNameBytes() { + java.lang.Object ref = backupPlanName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + backupPlanName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The resource name of the default `BackupPlan` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+     * 
+ * + * string backup_plan_name = 2; + * + * @param value The backupPlanName to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The resource name of the default `BackupPlan` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+     * 
+ * + * string backup_plan_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearBackupPlanName() { + backupPlanName_ = getDefaultInstance().getBackupPlanName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The resource name of the default `BackupPlan` created.
+     * Format:
+     * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+     * 
+ * + * string backup_plan_name = 2; + * + * @param value The bytes for backupPlanName to set. + * @return This builder for chaining. + */ + public Builder setBackupPlanNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + backupPlanName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.InitializeServiceResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.InitializeServiceResponse) + private static final com.google.cloud.backupdr.v1beta.InitializeServiceResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.InitializeServiceResponse(); + } + + public static com.google.cloud.backupdr.v1beta.InitializeServiceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InitializeServiceResponse 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.backupdr.v1beta.InitializeServiceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceResponseOrBuilder.java new file mode 100644 index 000000000000..713fae1390d4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitializeServiceResponseOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface InitializeServiceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.InitializeServiceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the default `BackupVault` created.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * 
+ * + * string backup_vault_name = 1; + * + * @return The backupVaultName. + */ + java.lang.String getBackupVaultName(); + + /** + * + * + *
+   * The resource name of the default `BackupVault` created.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`.
+   * 
+ * + * string backup_vault_name = 1; + * + * @return The bytes for backupVaultName. + */ + com.google.protobuf.ByteString getBackupVaultNameBytes(); + + /** + * + * + *
+   * The resource name of the default `BackupPlan` created.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+   * 
+ * + * string backup_plan_name = 2; + * + * @return The backupPlanName. + */ + java.lang.String getBackupPlanName(); + + /** + * + * + *
+   * The resource name of the default `BackupPlan` created.
+   * Format:
+   * `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`.
+   * 
+ * + * string backup_plan_name = 2; + * + * @return The bytes for backupPlanName. + */ + com.google.protobuf.ByteString getBackupPlanNameBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitiateDeleteAutoProtectionPolicyBindingRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitiateDeleteAutoProtectionPolicyBindingRequest.java new file mode 100644 index 000000000000..40cc33071f36 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitiateDeleteAutoProtectionPolicyBindingRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for initiating delete of an AutoProtectionPolicyBinding.
+ * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest} + */ +@com.google.protobuf.Generated +public final class InitiateDeleteAutoProtectionPolicyBindingRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) + InitiateDeleteAutoProtectionPolicyBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InitiateDeleteAutoProtectionPolicyBindingRequest"); + } + + // Use InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder() to construct. + private InitiateDeleteAutoProtectionPolicyBindingRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InitiateDeleteAutoProtectionPolicyBindingRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_InitiateDeleteAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_InitiateDeleteAutoProtectionPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest.class, + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the binding to delete.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+   * 
+ * + * + * 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 name of the binding to delete.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+   * 
+ * + * + * 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest other = + (com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) 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.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + 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.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + 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.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for initiating delete of an AutoProtectionPolicyBinding.
+   * 
+ * + * Protobuf type {@code + * google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_InitiateDeleteAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_InitiateDeleteAutoProtectionPolicyBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + .class, + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_InitiateDeleteAutoProtectionPolicyBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + build() { + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + buildPartial() { + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest result = + new com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + .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 name of the binding to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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 name of the binding to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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 name of the binding to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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 name of the binding to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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 name of the binding to delete.
+     * Format:
+     * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+     * 
+ * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) + private static final com.google.cloud.backupdr.v1beta + .InitiateDeleteAutoProtectionPolicyBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest(); + } + + public static com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser< + InitiateDeleteAutoProtectionPolicyBindingRequest>() { + @java.lang.Override + public InitiateDeleteAutoProtectionPolicyBindingRequest 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.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitiateDeleteAutoProtectionPolicyBindingRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitiateDeleteAutoProtectionPolicyBindingRequestOrBuilder.java new file mode 100644 index 000000000000..43a0b217f05d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InitiateDeleteAutoProtectionPolicyBindingRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface InitiateDeleteAutoProtectionPolicyBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the binding to delete.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the binding to delete.
+   * Format:
+   * projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}
+   * 
+ * + * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InstanceParams.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InstanceParams.java new file mode 100644 index 000000000000..22c7e8011dd8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InstanceParams.java @@ -0,0 +1,793 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Additional instance params.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.InstanceParams} + */ +@com.google.protobuf.Generated +public final class InstanceParams extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.InstanceParams) + InstanceParamsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InstanceParams"); + } + + // Use InstanceParams.newBuilder() to construct. + private InstanceParams(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InstanceParams() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_InstanceParams_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetResourceManagerTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_InstanceParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.InstanceParams.class, + com.google.cloud.backupdr.v1beta.InstanceParams.Builder.class); + } + + public static final int RESOURCE_MANAGER_TAGS_FIELD_NUMBER = 1; + + private static final class ResourceManagerTagsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_InstanceParams_ResourceManagerTagsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField resourceManagerTags_; + + private com.google.protobuf.MapField + internalGetResourceManagerTags() { + if (resourceManagerTags_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourceManagerTagsDefaultEntryHolder.defaultEntry); + } + return resourceManagerTags_; + } + + public int getResourceManagerTagsCount() { + return internalGetResourceManagerTags().getMap().size(); + } + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsResourceManagerTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetResourceManagerTags().getMap().containsKey(key); + } + + /** Use {@link #getResourceManagerTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResourceManagerTags() { + return getResourceManagerTagsMap(); + } + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getResourceManagerTagsMap() { + return internalGetResourceManagerTags().getMap(); + } + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getResourceManagerTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetResourceManagerTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getResourceManagerTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetResourceManagerTags().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 { + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, + internalGetResourceManagerTags(), + ResourceManagerTagsDefaultEntryHolder.defaultEntry, + 1); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetResourceManagerTags().getMap().entrySet()) { + com.google.protobuf.MapEntry resourceManagerTags__ = + ResourceManagerTagsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, resourceManagerTags__); + } + 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.backupdr.v1beta.InstanceParams)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.InstanceParams other = + (com.google.cloud.backupdr.v1beta.InstanceParams) obj; + + if (!internalGetResourceManagerTags().equals(other.internalGetResourceManagerTags())) + 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 (!internalGetResourceManagerTags().getMap().isEmpty()) { + hash = (37 * hash) + RESOURCE_MANAGER_TAGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetResourceManagerTags().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams 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.backupdr.v1beta.InstanceParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams 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.backupdr.v1beta.InstanceParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.InstanceParams 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Additional instance params.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.InstanceParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.InstanceParams) + com.google.cloud.backupdr.v1beta.InstanceParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_InstanceParams_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetResourceManagerTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 1: + return internalGetMutableResourceManagerTags(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_InstanceParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.InstanceParams.class, + com.google.cloud.backupdr.v1beta.InstanceParams.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.InstanceParams.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableResourceManagerTags().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_InstanceParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InstanceParams getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.InstanceParams.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InstanceParams build() { + com.google.cloud.backupdr.v1beta.InstanceParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.InstanceParams buildPartial() { + com.google.cloud.backupdr.v1beta.InstanceParams result = + new com.google.cloud.backupdr.v1beta.InstanceParams(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.InstanceParams result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceManagerTags_ = internalGetResourceManagerTags(); + result.resourceManagerTags_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.InstanceParams) { + return mergeFrom((com.google.cloud.backupdr.v1beta.InstanceParams) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.InstanceParams other) { + if (other == com.google.cloud.backupdr.v1beta.InstanceParams.getDefaultInstance()) + return this; + internalGetMutableResourceManagerTags().mergeFrom(other.internalGetResourceManagerTags()); + bitField0_ |= 0x00000001; + 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.protobuf.MapEntry + resourceManagerTags__ = + input.readMessage( + ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableResourceManagerTags() + .getMutableMap() + .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); + 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 com.google.protobuf.MapField resourceManagerTags_; + + private com.google.protobuf.MapField + internalGetResourceManagerTags() { + if (resourceManagerTags_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ResourceManagerTagsDefaultEntryHolder.defaultEntry); + } + return resourceManagerTags_; + } + + private com.google.protobuf.MapField + internalGetMutableResourceManagerTags() { + if (resourceManagerTags_ == null) { + resourceManagerTags_ = + com.google.protobuf.MapField.newMapField( + ResourceManagerTagsDefaultEntryHolder.defaultEntry); + } + if (!resourceManagerTags_.isMutable()) { + resourceManagerTags_ = resourceManagerTags_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return resourceManagerTags_; + } + + public int getResourceManagerTagsCount() { + return internalGetResourceManagerTags().getMap().size(); + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the instance.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsResourceManagerTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetResourceManagerTags().getMap().containsKey(key); + } + + /** Use {@link #getResourceManagerTagsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getResourceManagerTags() { + return getResourceManagerTagsMap(); + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the instance.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getResourceManagerTagsMap() { + return internalGetResourceManagerTags().getMap(); + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the instance.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getResourceManagerTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetResourceManagerTags().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the instance.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getResourceManagerTagsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetResourceManagerTags().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearResourceManagerTags() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableResourceManagerTags().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the instance.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeResourceManagerTags(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableResourceManagerTags().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableResourceManagerTags() { + bitField0_ |= 0x00000001; + return internalGetMutableResourceManagerTags().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the instance.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putResourceManagerTags(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableResourceManagerTags().getMutableMap().put(key, value); + bitField0_ |= 0x00000001; + return this; + } + + /** + * + * + *
+     * Optional. Resource manager tags to be bound to the instance.
+     * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllResourceManagerTags( + java.util.Map values) { + internalGetMutableResourceManagerTags().getMutableMap().putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.InstanceParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.InstanceParams) + private static final com.google.cloud.backupdr.v1beta.InstanceParams DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.InstanceParams(); + } + + public static com.google.cloud.backupdr.v1beta.InstanceParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstanceParams 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.backupdr.v1beta.InstanceParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InstanceParamsOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InstanceParamsOrBuilder.java new file mode 100644 index 000000000000..84b62de37af4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/InstanceParamsOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface InstanceParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.InstanceParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getResourceManagerTagsCount(); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsResourceManagerTags(java.lang.String key); + + /** Use {@link #getResourceManagerTagsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getResourceManagerTags(); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getResourceManagerTagsMap(); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getResourceManagerTagsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Resource manager tags to be bound to the instance.
+   * 
+ * + * + * map<string, string> resource_manager_tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getResourceManagerTagsOrThrow(java.lang.String key); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyRevocationActionType.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyRevocationActionType.java new file mode 100644 index 000000000000..e80dbd069188 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyRevocationActionType.java @@ -0,0 +1,198 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Specifies whether the virtual machine instance will be shut down on key
+ * revocation. It is currently used in instance, instance properties and GMI
+ * protos
+ * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.KeyRevocationActionType} + */ +@com.google.protobuf.Generated +public enum KeyRevocationActionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Default value. This value is unused.
+   * 
+ * + * KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0; + */ + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Indicates user chose no operation.
+   * 
+ * + * NONE = 1; + */ + NONE(1), + /** + * + * + *
+   * Indicates user chose to opt for VM shutdown on key revocation.
+   * 
+ * + * STOP = 2; + */ + STOP(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "KeyRevocationActionType"); + } + + /** + * + * + *
+   * Default value. This value is unused.
+   * 
+ * + * KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0; + */ + public static final int KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Indicates user chose no operation.
+   * 
+ * + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + + /** + * + * + *
+   * Indicates user chose to opt for VM shutdown on key revocation.
+   * 
+ * + * STOP = 2; + */ + public static final int STOP_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 KeyRevocationActionType 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 KeyRevocationActionType forNumber(int value) { + switch (value) { + case 0: + return KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED; + case 1: + return NONE; + case 2: + return STOP; + 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 KeyRevocationActionType findValueByNumber(int number) { + return KeyRevocationActionType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final KeyRevocationActionType[] VALUES = values(); + + public static KeyRevocationActionType 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 KeyRevocationActionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.KeyRevocationActionType) +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyValuePair.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyValuePair.java new file mode 100644 index 000000000000..7e7e9a08d3fa --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyValuePair.java @@ -0,0 +1,958 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * KeyValuePair defines a key-value pair for matching resource labels.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.KeyValuePair} + */ +@com.google.protobuf.Generated +public final class KeyValuePair extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.KeyValuePair) + KeyValuePairOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "KeyValuePair"); + } + + // Use KeyValuePair.newBuilder() to construct. + private KeyValuePair(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private KeyValuePair() { + key_ = ""; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_KeyValuePair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_KeyValuePair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.KeyValuePair.class, + com.google.cloud.backupdr.v1beta.KeyValuePair.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
+   * Required. The key of the label to match.
+   * This must be in the format `{label_key}`.
+   * The key must match the regex
+   * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The key of the label to match.
+   * This must be in the format `{label_key}`.
+   * The key must match the regex
+   * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. The values of the label to match.
+   * There will be explicit “OR” between values of array.
+   * Each value must be in the format `{label_value}`.
+   * The value must match the regex
+   * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+   * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + + /** + * + * + *
+   * Required. The values of the label to match.
+   * There will be explicit “OR” between values of array.
+   * Each value must be in the format `{label_value}`.
+   * The value must match the regex
+   * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+   * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
+   * Required. The values of the label to match.
+   * There will be explicit “OR” between values of array.
+   * Each value must be in the format `{label_value}`.
+   * The value must match the regex
+   * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+   * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
+   * Required. The values of the label to match.
+   * There will be explicit “OR” between values of array.
+   * Each value must be in the format `{label_value}`.
+   * The value must match the regex
+   * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+   * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, values_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().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.backupdr.v1beta.KeyValuePair)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.KeyValuePair other = + (com.google.cloud.backupdr.v1beta.KeyValuePair) obj; + + if (!getKey().equals(other.getKey())) return false; + if (!getValuesList().equals(other.getValuesList())) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair 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.backupdr.v1beta.KeyValuePair parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair 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.backupdr.v1beta.KeyValuePair parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.KeyValuePair 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * KeyValuePair defines a key-value pair for matching resource labels.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.KeyValuePair} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.KeyValuePair) + com.google.cloud.backupdr.v1beta.KeyValuePairOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_KeyValuePair_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_KeyValuePair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.KeyValuePair.class, + com.google.cloud.backupdr.v1beta.KeyValuePair.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.KeyValuePair.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_KeyValuePair_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyValuePair getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyValuePair build() { + com.google.cloud.backupdr.v1beta.KeyValuePair result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyValuePair buildPartial() { + com.google.cloud.backupdr.v1beta.KeyValuePair result = + new com.google.cloud.backupdr.v1beta.KeyValuePair(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.KeyValuePair result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.KeyValuePair) { + return mergeFrom((com.google.cloud.backupdr.v1beta.KeyValuePair) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.KeyValuePair other) { + if (other == com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000002; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + 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 java.lang.Object key_ = ""; + + /** + * + * + *
+     * Required. The key of the label to match.
+     * This must be in the format `{label_key}`.
+     * The key must match the regex
+     * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The key of the label to match.
+     * This must be in the format `{label_key}`.
+     * The key must match the regex
+     * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The key of the label to match.
+     * This must be in the format `{label_key}`.
+     * The key must match the regex
+     * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The key of the label to match.
+     * This must be in the format `{label_key}`.
+     * The key must match the regex
+     * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The key of the label to match.
+     * This must be in the format `{label_key}`.
+     * The key must match the regex
+     * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+     * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The values of the label to match.
+     * There will be explicit “OR” between values of array.
+     * Each value must be in the format `{label_value}`.
+     * The value must match the regex
+     * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+     * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.KeyValuePair) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.KeyValuePair) + private static final com.google.cloud.backupdr.v1beta.KeyValuePair DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.KeyValuePair(); + } + + public static com.google.cloud.backupdr.v1beta.KeyValuePair getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KeyValuePair 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.backupdr.v1beta.KeyValuePair getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyValuePairOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyValuePairOrBuilder.java new file mode 100644 index 000000000000..b8a6c85d78b1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/KeyValuePairOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface KeyValuePairOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.KeyValuePair) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The key of the label to match.
+   * This must be in the format `{label_key}`.
+   * The key must match the regex
+   * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
+   * Required. The key of the label to match.
+   * This must be in the format `{label_key}`.
+   * The key must match the regex
+   * Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
+   * 
+ * + * string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+   * Required. The values of the label to match.
+   * There will be explicit “OR” between values of array.
+   * Each value must be in the format `{label_value}`.
+   * The value must match the regex
+   * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+   * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + + /** + * + * + *
+   * Required. The values of the label to match.
+   * There will be explicit “OR” between values of array.
+   * Each value must be in the format `{label_value}`.
+   * The value must match the regex
+   * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+   * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of values. + */ + int getValuesCount(); + + /** + * + * + *
+   * Required. The values of the label to match.
+   * There will be explicit “OR” between values of array.
+   * Each value must be in the format `{label_value}`.
+   * The value must match the regex
+   * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+   * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + + /** + * + * + *
+   * Required. The values of the label to match.
+   * There will be explicit “OR” between values of array.
+   * Each value must be in the format `{label_value}`.
+   * The value must match the regex
+   * Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
+   * 
+ * + * repeated string values = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesRequest.java new file mode 100644 index 000000000000..780676a5d7d6 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesRequest.java @@ -0,0 +1,1320 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for listing AppliedAutoProtectionPolicies.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest} + */ +@com.google.protobuf.Generated +public final class ListAppliedAutoProtectionPoliciesRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) + ListAppliedAutoProtectionPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAppliedAutoProtectionPoliciesRequest"); + } + + // Use ListAppliedAutoProtectionPoliciesRequest.newBuilder() to construct. + private ListAppliedAutoProtectionPoliciesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAppliedAutoProtectionPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest.class, + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * applied policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+   * applied policies. Format: projects/{project}/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; + + /** + * + * + *
+   * Optional. The maximum number of applied policies to return in a single
+   * page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAppliedAutoProtectionPolicies` call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAppliedAutoProtectionPolicies` call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest other = + (com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) 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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest 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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest 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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing AppliedAutoProtectionPolicies.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest.class, + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest build() { + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + buildPartial() { + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest result = + new com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + .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. The project and location for which to retrieve the list of
+     * applied policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * applied policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * applied policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * applied policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * applied policies. Format: projects/{project}/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_; + + /** + * + * + *
+     * Optional. The maximum number of applied policies to return in a single
+     * page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of applied policies to return in a single
+     * page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of applied policies to return in a single
+     * page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAppliedAutoProtectionPolicies` call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAppliedAutoProtectionPolicies` call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAppliedAutoProtectionPolicies` call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAppliedAutoProtectionPolicies` call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAppliedAutoProtectionPolicies` call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) + private static final com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAppliedAutoProtectionPoliciesRequest 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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..71b1753bdf41 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesRequestOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListAppliedAutoProtectionPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * applied policies. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * applied policies. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of applied policies to return in a single
+   * page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAppliedAutoProtectionPolicies` call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAppliedAutoProtectionPolicies` call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesResponse.java new file mode 100644 index 000000000000..86d7c878a3ad --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesResponse.java @@ -0,0 +1,1509 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for ListAppliedAutoProtectionPolicies.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse} + */ +@com.google.protobuf.Generated +public final class ListAppliedAutoProtectionPoliciesResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) + ListAppliedAutoProtectionPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAppliedAutoProtectionPoliciesResponse"); + } + + // Use ListAppliedAutoProtectionPoliciesResponse.newBuilder() to construct. + private ListAppliedAutoProtectionPoliciesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAppliedAutoProtectionPoliciesResponse() { + appliedAutoProtectionPolicies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.class, + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.Builder + .class); + } + + public static final int APPLIED_AUTO_PROTECTION_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + appliedAutoProtectionPolicies_; + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getAppliedAutoProtectionPoliciesList() { + return appliedAutoProtectionPolicies_; + } + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder> + getAppliedAutoProtectionPoliciesOrBuilderList() { + return appliedAutoProtectionPolicies_; + } + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + @java.lang.Override + public int getAppliedAutoProtectionPoliciesCount() { + return appliedAutoProtectionPolicies_.size(); + } + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy + getAppliedAutoProtectionPolicies(int index) { + return appliedAutoProtectionPolicies_.get(index); + } + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder + getAppliedAutoProtectionPoliciesOrBuilder(int index) { + return appliedAutoProtectionPolicies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+   * 
+ * + * 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(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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 < appliedAutoProtectionPolicies_.size(); i++) { + output.writeMessage(1, appliedAutoProtectionPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < appliedAutoProtectionPolicies_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, appliedAutoProtectionPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse other = + (com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) obj; + + if (!getAppliedAutoProtectionPoliciesList() + .equals(other.getAppliedAutoProtectionPoliciesList())) 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 (getAppliedAutoProtectionPoliciesCount() > 0) { + hash = (37 * hash) + APPLIED_AUTO_PROTECTION_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getAppliedAutoProtectionPoliciesList().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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + 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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + 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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListAppliedAutoProtectionPolicies.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.class, + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (appliedAutoProtectionPoliciesBuilder_ == null) { + appliedAutoProtectionPolicies_ = java.util.Collections.emptyList(); + } else { + appliedAutoProtectionPolicies_ = null; + appliedAutoProtectionPoliciesBuilder_.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.backupdr.v1beta.AppliedAutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAppliedAutoProtectionPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse build() { + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + buildPartial() { + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse result = + new com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse result) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + appliedAutoProtectionPolicies_ = + java.util.Collections.unmodifiableList(appliedAutoProtectionPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.appliedAutoProtectionPolicies_ = appliedAutoProtectionPolicies_; + } else { + result.appliedAutoProtectionPolicies_ = appliedAutoProtectionPoliciesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + .getDefaultInstance()) return this; + if (appliedAutoProtectionPoliciesBuilder_ == null) { + if (!other.appliedAutoProtectionPolicies_.isEmpty()) { + if (appliedAutoProtectionPolicies_.isEmpty()) { + appliedAutoProtectionPolicies_ = other.appliedAutoProtectionPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.addAll(other.appliedAutoProtectionPolicies_); + } + onChanged(); + } + } else { + if (!other.appliedAutoProtectionPolicies_.isEmpty()) { + if (appliedAutoProtectionPoliciesBuilder_.isEmpty()) { + appliedAutoProtectionPoliciesBuilder_.dispose(); + appliedAutoProtectionPoliciesBuilder_ = null; + appliedAutoProtectionPolicies_ = other.appliedAutoProtectionPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + appliedAutoProtectionPoliciesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAppliedAutoProtectionPoliciesFieldBuilder() + : null; + } else { + appliedAutoProtectionPoliciesBuilder_.addAllMessages( + other.appliedAutoProtectionPolicies_); + } + } + } + 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.backupdr.v1beta.AppliedAutoProtectionPolicy m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.parser(), + extensionRegistry); + if (appliedAutoProtectionPoliciesBuilder_ == null) { + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.add(m); + } else { + appliedAutoProtectionPoliciesBuilder_.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 + appliedAutoProtectionPolicies_ = java.util.Collections.emptyList(); + + private void ensureAppliedAutoProtectionPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + appliedAutoProtectionPolicies_ = + new java.util.ArrayList( + appliedAutoProtectionPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder> + appliedAutoProtectionPoliciesBuilder_; + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public java.util.List + getAppliedAutoProtectionPoliciesList() { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(appliedAutoProtectionPolicies_); + } else { + return appliedAutoProtectionPoliciesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public int getAppliedAutoProtectionPoliciesCount() { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + return appliedAutoProtectionPolicies_.size(); + } else { + return appliedAutoProtectionPoliciesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy + getAppliedAutoProtectionPolicies(int index) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + return appliedAutoProtectionPolicies_.get(index); + } else { + return appliedAutoProtectionPoliciesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder setAppliedAutoProtectionPolicies( + int index, com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy value) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.set(index, value); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder setAppliedAutoProtectionPolicies( + int index, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder builderForValue) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder addAppliedAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy value) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.add(value); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder addAppliedAutoProtectionPolicies( + int index, com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy value) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.add(index, value); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder addAppliedAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder builderForValue) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.add(builderForValue.build()); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder addAppliedAutoProtectionPolicies( + int index, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder builderForValue) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder addAllAppliedAutoProtectionPolicies( + java.lang.Iterable + values) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + ensureAppliedAutoProtectionPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, appliedAutoProtectionPolicies_); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder clearAppliedAutoProtectionPolicies() { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + appliedAutoProtectionPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public Builder removeAppliedAutoProtectionPolicies(int index) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + ensureAppliedAutoProtectionPoliciesIsMutable(); + appliedAutoProtectionPolicies_.remove(index); + onChanged(); + } else { + appliedAutoProtectionPoliciesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder + getAppliedAutoProtectionPoliciesBuilder(int index) { + return internalGetAppliedAutoProtectionPoliciesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder + getAppliedAutoProtectionPoliciesOrBuilder(int index) { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + return appliedAutoProtectionPolicies_.get(index); + } else { + return appliedAutoProtectionPoliciesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder> + getAppliedAutoProtectionPoliciesOrBuilderList() { + if (appliedAutoProtectionPoliciesBuilder_ != null) { + return appliedAutoProtectionPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(appliedAutoProtectionPolicies_); + } + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder + addAppliedAutoProtectionPoliciesBuilder() { + return internalGetAppliedAutoProtectionPoliciesFieldBuilder() + .addBuilder( + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder + addAppliedAutoProtectionPoliciesBuilder(int index) { + return internalGetAppliedAutoProtectionPoliciesFieldBuilder() + .addBuilder( + index, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of the AppliedAutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + public java.util.List + getAppliedAutoProtectionPoliciesBuilderList() { + return internalGetAppliedAutoProtectionPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder> + internalGetAppliedAutoProtectionPoliciesFieldBuilder() { + if (appliedAutoProtectionPoliciesBuilder_ == null) { + appliedAutoProtectionPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder>( + appliedAutoProtectionPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + appliedAutoProtectionPolicies_ = null; + } + return appliedAutoProtectionPoliciesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) + private static final com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAppliedAutoProtectionPoliciesResponse 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.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..ded2a943786e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAppliedAutoProtectionPoliciesResponseOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListAppliedAutoProtectionPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + java.util.List + getAppliedAutoProtectionPoliciesList(); + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy getAppliedAutoProtectionPolicies( + int index); + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + int getAppliedAutoProtectionPoliciesCount(); + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + java.util.List + getAppliedAutoProtectionPoliciesOrBuilderList(); + + /** + * + * + *
+   * A list of the AppliedAutoProtectionPolicy resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + * + */ + com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicyOrBuilder + getAppliedAutoProtectionPoliciesOrBuilder(int index); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesRequest.java new file mode 100644 index 000000000000..718ab6e9ea7c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesRequest.java @@ -0,0 +1,1326 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for ListAutoProtectionPolicies.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest} + */ +@com.google.protobuf.Generated +public final class ListAutoProtectionPoliciesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) + ListAutoProtectionPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAutoProtectionPoliciesRequest"); + } + + // Use ListAutoProtectionPoliciesRequest.newBuilder() to construct. + private ListAutoProtectionPoliciesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAutoProtectionPoliciesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest.class, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+   * policies. Format: projects/{project}/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; + + /** + * + * + *
+   * Optional. The maximum number of policies to return in a single page.
+   * If unspecified, a server-default value will be used.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+   * page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+   * page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response. The following fields are filterable:
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response. The following fields are filterable:
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response. The
+   * following fields are sortable:
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response. The
+   * following fields are sortable:
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAutoProtectionPoliciesRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest other = + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) 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.backupdr.v1beta.ListAutoProtectionPoliciesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest 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.backupdr.v1beta.ListAutoProtectionPoliciesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest 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.backupdr.v1beta.ListAutoProtectionPoliciesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAutoProtectionPoliciesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListAutoProtectionPolicies.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest.class, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest build() { + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest result = + new com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest + .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. The project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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_; + + /** + * + * + *
+     * Optional. The maximum number of policies to return in a single page.
+     * If unspecified, a server-default value will be used.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policies to return in a single page.
+     * If unspecified, a server-default value will be used.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policies to return in a single page.
+     * If unspecified, a server-default value will be used.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) + private static final com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAutoProtectionPoliciesRequest 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.backupdr.v1beta.ListAutoProtectionPoliciesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesRequestOrBuilder.java new file mode 100644 index 000000000000..48c92d986db8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesRequestOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListAutoProtectionPoliciesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * policies. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * policies. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policies to return in a single page.
+   * If unspecified, a server-default value will be used.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+   * page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+   * page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response. The following fields are filterable:
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response. The following fields are filterable:
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response. The
+   * following fields are sortable:
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response. The
+   * following fields are sortable:
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesResponse.java new file mode 100644 index 000000000000..49db5488c363 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesResponse.java @@ -0,0 +1,1487 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for ListAutoProtectionPolicies.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse} + */ +@com.google.protobuf.Generated +public final class ListAutoProtectionPoliciesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) + ListAutoProtectionPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAutoProtectionPoliciesResponse"); + } + + // Use ListAutoProtectionPoliciesResponse.newBuilder() to construct. + private ListAutoProtectionPoliciesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAutoProtectionPoliciesResponse() { + autoProtectionPolicies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.class, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.Builder.class); + } + + public static final int AUTO_PROTECTION_POLICIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + autoProtectionPolicies_; + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getAutoProtectionPoliciesList() { + return autoProtectionPolicies_; + } + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + @java.lang.Override + public java.util.List + getAutoProtectionPoliciesOrBuilderList() { + return autoProtectionPolicies_; + } + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + @java.lang.Override + public int getAutoProtectionPoliciesCount() { + return autoProtectionPolicies_.size(); + } + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicies( + int index) { + return autoProtectionPolicies_.get(index); + } + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder + getAutoProtectionPoliciesOrBuilder(int index) { + return autoProtectionPolicies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < autoProtectionPolicies_.size(); i++) { + output.writeMessage(1, autoProtectionPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < autoProtectionPolicies_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, autoProtectionPolicies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAutoProtectionPoliciesResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse other = + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) obj; + + if (!getAutoProtectionPoliciesList().equals(other.getAutoProtectionPoliciesList())) + 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 (getAutoProtectionPoliciesCount() > 0) { + hash = (37 * hash) + AUTO_PROTECTION_POLICIES_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPoliciesList().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.backupdr.v1beta.ListAutoProtectionPoliciesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse 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.backupdr.v1beta.ListAutoProtectionPoliciesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse 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.backupdr.v1beta.ListAutoProtectionPoliciesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAutoProtectionPoliciesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListAutoProtectionPolicies.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.class, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (autoProtectionPoliciesBuilder_ == null) { + autoProtectionPolicies_ = java.util.Collections.emptyList(); + } else { + autoProtectionPolicies_ = null; + autoProtectionPoliciesBuilder_.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.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPoliciesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse build() { + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse result = + new com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse result) { + if (autoProtectionPoliciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + autoProtectionPolicies_ = java.util.Collections.unmodifiableList(autoProtectionPolicies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.autoProtectionPolicies_ = autoProtectionPolicies_; + } else { + result.autoProtectionPolicies_ = autoProtectionPoliciesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + .getDefaultInstance()) return this; + if (autoProtectionPoliciesBuilder_ == null) { + if (!other.autoProtectionPolicies_.isEmpty()) { + if (autoProtectionPolicies_.isEmpty()) { + autoProtectionPolicies_ = other.autoProtectionPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.addAll(other.autoProtectionPolicies_); + } + onChanged(); + } + } else { + if (!other.autoProtectionPolicies_.isEmpty()) { + if (autoProtectionPoliciesBuilder_.isEmpty()) { + autoProtectionPoliciesBuilder_.dispose(); + autoProtectionPoliciesBuilder_ = null; + autoProtectionPolicies_ = other.autoProtectionPolicies_; + bitField0_ = (bitField0_ & ~0x00000001); + autoProtectionPoliciesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAutoProtectionPoliciesFieldBuilder() + : null; + } else { + autoProtectionPoliciesBuilder_.addAllMessages(other.autoProtectionPolicies_); + } + } + } + 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.backupdr.v1beta.AutoProtectionPolicy m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.parser(), + extensionRegistry); + if (autoProtectionPoliciesBuilder_ == null) { + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.add(m); + } else { + autoProtectionPoliciesBuilder_.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 + autoProtectionPolicies_ = java.util.Collections.emptyList(); + + private void ensureAutoProtectionPoliciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + autoProtectionPolicies_ = + new java.util.ArrayList( + autoProtectionPolicies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder> + autoProtectionPoliciesBuilder_; + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public java.util.List + getAutoProtectionPoliciesList() { + if (autoProtectionPoliciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(autoProtectionPolicies_); + } else { + return autoProtectionPoliciesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public int getAutoProtectionPoliciesCount() { + if (autoProtectionPoliciesBuilder_ == null) { + return autoProtectionPolicies_.size(); + } else { + return autoProtectionPoliciesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicies( + int index) { + if (autoProtectionPoliciesBuilder_ == null) { + return autoProtectionPolicies_.get(index); + } else { + return autoProtectionPoliciesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder setAutoProtectionPolicies( + int index, com.google.cloud.backupdr.v1beta.AutoProtectionPolicy value) { + if (autoProtectionPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.set(index, value); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder setAutoProtectionPolicies( + int index, com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder builderForValue) { + if (autoProtectionPoliciesBuilder_ == null) { + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.set(index, builderForValue.build()); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder addAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy value) { + if (autoProtectionPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.add(value); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder addAutoProtectionPolicies( + int index, com.google.cloud.backupdr.v1beta.AutoProtectionPolicy value) { + if (autoProtectionPoliciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.add(index, value); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder addAutoProtectionPolicies( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder builderForValue) { + if (autoProtectionPoliciesBuilder_ == null) { + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.add(builderForValue.build()); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder addAutoProtectionPolicies( + int index, com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder builderForValue) { + if (autoProtectionPoliciesBuilder_ == null) { + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.add(index, builderForValue.build()); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder addAllAutoProtectionPolicies( + java.lang.Iterable + values) { + if (autoProtectionPoliciesBuilder_ == null) { + ensureAutoProtectionPoliciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, autoProtectionPolicies_); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder clearAutoProtectionPolicies() { + if (autoProtectionPoliciesBuilder_ == null) { + autoProtectionPolicies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public Builder removeAutoProtectionPolicies(int index) { + if (autoProtectionPoliciesBuilder_ == null) { + ensureAutoProtectionPoliciesIsMutable(); + autoProtectionPolicies_.remove(index); + onChanged(); + } else { + autoProtectionPoliciesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder + getAutoProtectionPoliciesBuilder(int index) { + return internalGetAutoProtectionPoliciesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder + getAutoProtectionPoliciesOrBuilder(int index) { + if (autoProtectionPoliciesBuilder_ == null) { + return autoProtectionPolicies_.get(index); + } else { + return autoProtectionPoliciesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public java.util.List + getAutoProtectionPoliciesOrBuilderList() { + if (autoProtectionPoliciesBuilder_ != null) { + return autoProtectionPoliciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(autoProtectionPolicies_); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder + addAutoProtectionPoliciesBuilder() { + return internalGetAutoProtectionPoliciesFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder + addAutoProtectionPoliciesBuilder(int index) { + return internalGetAutoProtectionPoliciesFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicy resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + public java.util.List + getAutoProtectionPoliciesBuilderList() { + return internalGetAutoProtectionPoliciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder> + internalGetAutoProtectionPoliciesFieldBuilder() { + if (autoProtectionPoliciesBuilder_ == null) { + autoProtectionPoliciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder>( + autoProtectionPolicies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + autoProtectionPolicies_ = null; + } + return autoProtectionPoliciesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) + private static final com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAutoProtectionPoliciesResponse 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.backupdr.v1beta.ListAutoProtectionPoliciesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesResponseOrBuilder.java new file mode 100644 index 000000000000..9b05f38c14b3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPoliciesResponseOrBuilder.java @@ -0,0 +1,173 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListAutoProtectionPoliciesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + java.util.List + getAutoProtectionPoliciesList(); + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicies(int index); + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + int getAutoProtectionPoliciesCount(); + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + java.util.List + getAutoProtectionPoliciesOrBuilderList(); + + /** + * + * + *
+   * A list of the AutoProtectionPolicy resources found.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policies = 1; + * + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder getAutoProtectionPoliciesOrBuilder( + int index); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsRequest.java new file mode 100644 index 000000000000..d3db758c5b69 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsRequest.java @@ -0,0 +1,1332 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for ListAutoProtectionPolicyBindings.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest} + */ +@com.google.protobuf.Generated +public final class ListAutoProtectionPolicyBindingsRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) + ListAutoProtectionPolicyBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAutoProtectionPolicyBindingsRequest"); + } + + // Use ListAutoProtectionPolicyBindingsRequest.newBuilder() to construct. + private ListAutoProtectionPolicyBindingsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAutoProtectionPolicyBindingsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest.class, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+   * policies. Format: projects/{project}/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; + + /** + * + * + *
+   * Optional. The maximum number of policies to return in a single page.
+   * If unspecified, a server-default value will be used.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+   * page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+   * page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response. The following fields are filterable:
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response. The following fields are filterable:
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response. The
+   * following fields are sortable:
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response. The
+   * following fields are sortable:
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest other = + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) 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.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest 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.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest 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.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListAutoProtectionPolicyBindings.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest.class, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest build() { + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest result = + new com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest + .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. The project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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 project and location for which to retrieve the list of
+     * policies. Format: projects/{project}/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_; + + /** + * + * + *
+     * Optional. The maximum number of policies to return in a single page.
+     * If unspecified, a server-default value will be used.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of policies to return in a single page.
+     * If unspecified, a server-default value will be used.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of policies to return in a single page.
+     * If unspecified, a server-default value will be used.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+     * page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter expression that filters resources listed in the
+     * response. The following fields are filterable:
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that sorts the results in the response. The
+     * following fields are sortable:
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) + private static final com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAutoProtectionPolicyBindingsRequest 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.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..a54bf10e161b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsRequestOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListAutoProtectionPolicyBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * policies. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve the list of
+   * policies. Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of policies to return in a single page.
+   * If unspecified, a server-default value will be used.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+   * page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent
+   * page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response. The following fields are filterable:
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A filter expression that filters resources listed in the
+   * response. The following fields are filterable:
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response. The
+   * following fields are sortable:
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. An expression that sorts the results in the response. The
+   * following fields are sortable:
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsResponse.java new file mode 100644 index 000000000000..4d872921edfd --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsResponse.java @@ -0,0 +1,1509 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for ListAutoProtectionPolicyBindings.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse} + */ +@com.google.protobuf.Generated +public final class ListAutoProtectionPolicyBindingsResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) + ListAutoProtectionPolicyBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListAutoProtectionPolicyBindingsResponse"); + } + + // Use ListAutoProtectionPolicyBindingsResponse.newBuilder() to construct. + private ListAutoProtectionPolicyBindingsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAutoProtectionPolicyBindingsResponse() { + autoProtectionPolicyBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.class, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.Builder + .class); + } + + public static final int AUTO_PROTECTION_POLICY_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + autoProtectionPolicyBindings_; + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + @java.lang.Override + public java.util.List + getAutoProtectionPolicyBindingsList() { + return autoProtectionPolicyBindings_; + } + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder> + getAutoProtectionPolicyBindingsOrBuilderList() { + return autoProtectionPolicyBindings_; + } + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + @java.lang.Override + public int getAutoProtectionPolicyBindingsCount() { + return autoProtectionPolicyBindings_.size(); + } + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + getAutoProtectionPolicyBindings(int index) { + return autoProtectionPolicyBindings_.get(index); + } + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder + getAutoProtectionPolicyBindingsOrBuilder(int index) { + return autoProtectionPolicyBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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 < autoProtectionPolicyBindings_.size(); i++) { + output.writeMessage(1, autoProtectionPolicyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < autoProtectionPolicyBindings_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, autoProtectionPolicyBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse other = + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) obj; + + if (!getAutoProtectionPolicyBindingsList().equals(other.getAutoProtectionPolicyBindingsList())) + 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 (getAutoProtectionPolicyBindingsCount() > 0) { + hash = (37 * hash) + AUTO_PROTECTION_POLICY_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicyBindingsList().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.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse 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.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse 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.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListAutoProtectionPolicyBindings.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.class, + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (autoProtectionPolicyBindingsBuilder_ == null) { + autoProtectionPolicyBindings_ = java.util.Collections.emptyList(); + } else { + autoProtectionPolicyBindings_ = null; + autoProtectionPolicyBindingsBuilder_.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.backupdr.v1beta.AutoProtectionPolicyBindingProto + .internal_static_google_cloud_backupdr_v1beta_ListAutoProtectionPolicyBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse build() { + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + buildPartial() { + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse result = + new com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse result) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + autoProtectionPolicyBindings_ = + java.util.Collections.unmodifiableList(autoProtectionPolicyBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.autoProtectionPolicyBindings_ = autoProtectionPolicyBindings_; + } else { + result.autoProtectionPolicyBindings_ = autoProtectionPolicyBindingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + .getDefaultInstance()) return this; + if (autoProtectionPolicyBindingsBuilder_ == null) { + if (!other.autoProtectionPolicyBindings_.isEmpty()) { + if (autoProtectionPolicyBindings_.isEmpty()) { + autoProtectionPolicyBindings_ = other.autoProtectionPolicyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.addAll(other.autoProtectionPolicyBindings_); + } + onChanged(); + } + } else { + if (!other.autoProtectionPolicyBindings_.isEmpty()) { + if (autoProtectionPolicyBindingsBuilder_.isEmpty()) { + autoProtectionPolicyBindingsBuilder_.dispose(); + autoProtectionPolicyBindingsBuilder_ = null; + autoProtectionPolicyBindings_ = other.autoProtectionPolicyBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + autoProtectionPolicyBindingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAutoProtectionPolicyBindingsFieldBuilder() + : null; + } else { + autoProtectionPolicyBindingsBuilder_.addAllMessages( + other.autoProtectionPolicyBindings_); + } + } + } + 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.backupdr.v1beta.AutoProtectionPolicyBinding m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.parser(), + extensionRegistry); + if (autoProtectionPolicyBindingsBuilder_ == null) { + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.add(m); + } else { + autoProtectionPolicyBindingsBuilder_.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 + autoProtectionPolicyBindings_ = java.util.Collections.emptyList(); + + private void ensureAutoProtectionPolicyBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + autoProtectionPolicyBindings_ = + new java.util.ArrayList( + autoProtectionPolicyBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder> + autoProtectionPolicyBindingsBuilder_; + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public java.util.List + getAutoProtectionPolicyBindingsList() { + if (autoProtectionPolicyBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(autoProtectionPolicyBindings_); + } else { + return autoProtectionPolicyBindingsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public int getAutoProtectionPolicyBindingsCount() { + if (autoProtectionPolicyBindingsBuilder_ == null) { + return autoProtectionPolicyBindings_.size(); + } else { + return autoProtectionPolicyBindingsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding + getAutoProtectionPolicyBindings(int index) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + return autoProtectionPolicyBindings_.get(index); + } else { + return autoProtectionPolicyBindingsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder setAutoProtectionPolicyBindings( + int index, com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding value) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.set(index, value); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder setAutoProtectionPolicyBindings( + int index, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder builderForValue) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder addAutoProtectionPolicyBindings( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding value) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.add(value); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder addAutoProtectionPolicyBindings( + int index, com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding value) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.add(index, value); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder addAutoProtectionPolicyBindings( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder builderForValue) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.add(builderForValue.build()); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder addAutoProtectionPolicyBindings( + int index, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder builderForValue) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder addAllAutoProtectionPolicyBindings( + java.lang.Iterable + values) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + ensureAutoProtectionPolicyBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, autoProtectionPolicyBindings_); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder clearAutoProtectionPolicyBindings() { + if (autoProtectionPolicyBindingsBuilder_ == null) { + autoProtectionPolicyBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public Builder removeAutoProtectionPolicyBindings(int index) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + ensureAutoProtectionPolicyBindingsIsMutable(); + autoProtectionPolicyBindings_.remove(index); + onChanged(); + } else { + autoProtectionPolicyBindingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder + getAutoProtectionPolicyBindingsBuilder(int index) { + return internalGetAutoProtectionPolicyBindingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder + getAutoProtectionPolicyBindingsOrBuilder(int index) { + if (autoProtectionPolicyBindingsBuilder_ == null) { + return autoProtectionPolicyBindings_.get(index); + } else { + return autoProtectionPolicyBindingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder> + getAutoProtectionPolicyBindingsOrBuilderList() { + if (autoProtectionPolicyBindingsBuilder_ != null) { + return autoProtectionPolicyBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(autoProtectionPolicyBindings_); + } + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder + addAutoProtectionPolicyBindingsBuilder() { + return internalGetAutoProtectionPolicyBindingsFieldBuilder() + .addBuilder( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder + addAutoProtectionPolicyBindingsBuilder(int index) { + return internalGetAutoProtectionPolicyBindingsFieldBuilder() + .addBuilder( + index, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of the AutoProtectionPolicyBindings resources found.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + public java.util.List + getAutoProtectionPolicyBindingsBuilderList() { + return internalGetAutoProtectionPolicyBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder> + internalGetAutoProtectionPolicyBindingsFieldBuilder() { + if (autoProtectionPolicyBindingsBuilder_ == null) { + autoProtectionPolicyBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder>( + autoProtectionPolicyBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + autoProtectionPolicyBindings_ = null; + } + return autoProtectionPolicyBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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 that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token that can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) + private static final com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAutoProtectionPolicyBindingsResponse 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.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..d6b747ac1a95 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListAutoProtectionPolicyBindingsResponseOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListAutoProtectionPolicyBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + java.util.List + getAutoProtectionPolicyBindingsList(); + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding getAutoProtectionPolicyBindings( + int index); + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + int getAutoProtectionPolicyBindingsCount(); + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + java.util.List + getAutoProtectionPolicyBindingsOrBuilderList(); + + /** + * + * + *
+   * A list of the AutoProtectionPolicyBindings resources found.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + * + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingOrBuilder + getAutoProtectionPolicyBindingsOrBuilder(int index); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token that can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsRequest.java new file mode 100644 index 000000000000..ec8fcb118b71 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsRequest.java @@ -0,0 +1,1137 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for List BackupPlanAssociation
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest} + */ +@com.google.protobuf.Generated +public final class ListBackupPlanAssociationsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) + ListBackupPlanAssociationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupPlanAssociationsRequest"); + } + + // Use ListBackupPlanAssociationsRequest.newBuilder() to construct. + private ListBackupPlanAssociationsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupPlanAssociationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve backup Plan
+   * Associations information, in the format
+   * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+   * map to Google Cloud regions, for example **us-central1**. To retrieve
+   * backup plan associations for all locations, use "-" for the
+   * `{location}` value.
+   * 
+ * + * + * 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 project and location for which to retrieve backup Plan
+   * Associations information, in the format
+   * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+   * map to Google Cloud regions, for example **us-central1**. To retrieve
+   * backup plan associations for all locations, use "-" for the
+   * `{location}` value.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, 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.backupdr.v1beta.ListBackupPlanAssociationsRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest other = + (com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) 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 (!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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest 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.backupdr.v1beta.ListBackupPlanAssociationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest 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.backupdr.v1beta.ListBackupPlanAssociationsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlanAssociationsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for List BackupPlanAssociation
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest build() { + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest result = + new com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest 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_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest + .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(); + } + 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 + 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 project and location for which to retrieve backup Plan
+     * Associations information, in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+     * map to Google Cloud regions, for example **us-central1**. To retrieve
+     * backup plan associations for all locations, use "-" for the
+     * `{location}` value.
+     * 
+ * + * + * 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 project and location for which to retrieve backup Plan
+     * Associations information, in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+     * map to Google Cloud regions, for example **us-central1**. To retrieve
+     * backup plan associations for all locations, use "-" for the
+     * `{location}` value.
+     * 
+ * + * + * 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 project and location for which to retrieve backup Plan
+     * Associations information, in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+     * map to Google Cloud regions, for example **us-central1**. To retrieve
+     * backup plan associations for all locations, use "-" for the
+     * `{location}` value.
+     * 
+ * + * + * 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 project and location for which to retrieve backup Plan
+     * Associations information, in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+     * map to Google Cloud regions, for example **us-central1**. To retrieve
+     * backup plan associations for all locations, use "-" for the
+     * `{location}` value.
+     * 
+ * + * + * 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 project and location for which to retrieve backup Plan
+     * Associations information, in the format
+     * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+     * map to Google Cloud regions, for example **us-central1**. To retrieve
+     * backup plan associations for all locations, use "-" for the
+     * `{location}` value.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) + private static final com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupPlanAssociationsRequest 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.backupdr.v1beta.ListBackupPlanAssociationsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsRequestOrBuilder.java new file mode 100644 index 000000000000..1997e71f35ba --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsRequestOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupPlanAssociationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve backup Plan
+   * Associations information, in the format
+   * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+   * map to Google Cloud regions, for example **us-central1**. To retrieve
+   * backup plan associations for all locations, use "-" for the
+   * `{location}` value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve backup Plan
+   * Associations information, in the format
+   * `projects/{project_id}/locations/{location}`. In Backup and DR, locations
+   * map to Google Cloud regions, for example **us-central1**. To retrieve
+   * backup plan associations for all locations, use "-" for the
+   * `{location}` value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsResponse.java new file mode 100644 index 000000000000..16de6033535f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsResponse.java @@ -0,0 +1,1646 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for List BackupPlanAssociation
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse} + */ +@com.google.protobuf.Generated +public final class ListBackupPlanAssociationsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) + ListBackupPlanAssociationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupPlanAssociationsResponse"); + } + + // Use ListBackupPlanAssociationsResponse.newBuilder() to construct. + private ListBackupPlanAssociationsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupPlanAssociationsResponse() { + backupPlanAssociations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.Builder.class); + } + + public static final int BACKUP_PLAN_ASSOCIATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + backupPlanAssociations_; + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanAssociationsList() { + return backupPlanAssociations_; + } + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanAssociationsOrBuilderList() { + return backupPlanAssociations_; + } + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + @java.lang.Override + public int getBackupPlanAssociationsCount() { + return backupPlanAssociations_.size(); + } + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociations( + int index) { + return backupPlanAssociations_.get(index); + } + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationsOrBuilder(int index) { + return backupPlanAssociations_.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 < backupPlanAssociations_.size(); i++) { + output.writeMessage(1, backupPlanAssociations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < backupPlanAssociations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, backupPlanAssociations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlanAssociationsResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse other = + (com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) obj; + + if (!getBackupPlanAssociationsList().equals(other.getBackupPlanAssociationsList())) + 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 (getBackupPlanAssociationsCount() > 0) { + hash = (37 * hash) + BACKUP_PLAN_ASSOCIATIONS_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanAssociationsList().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.backupdr.v1beta.ListBackupPlanAssociationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse 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.backupdr.v1beta.ListBackupPlanAssociationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse 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.backupdr.v1beta.ListBackupPlanAssociationsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlanAssociationsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for List BackupPlanAssociation
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupPlanAssociationsBuilder_ == null) { + backupPlanAssociations_ = java.util.Collections.emptyList(); + } else { + backupPlanAssociations_ = null; + backupPlanAssociationsBuilder_.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.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanAssociationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse build() { + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse result = + new com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse result) { + if (backupPlanAssociationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backupPlanAssociations_ = java.util.Collections.unmodifiableList(backupPlanAssociations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backupPlanAssociations_ = backupPlanAssociations_; + } else { + result.backupPlanAssociations_ = backupPlanAssociationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + .getDefaultInstance()) return this; + if (backupPlanAssociationsBuilder_ == null) { + if (!other.backupPlanAssociations_.isEmpty()) { + if (backupPlanAssociations_.isEmpty()) { + backupPlanAssociations_ = other.backupPlanAssociations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.addAll(other.backupPlanAssociations_); + } + onChanged(); + } + } else { + if (!other.backupPlanAssociations_.isEmpty()) { + if (backupPlanAssociationsBuilder_.isEmpty()) { + backupPlanAssociationsBuilder_.dispose(); + backupPlanAssociationsBuilder_ = null; + backupPlanAssociations_ = other.backupPlanAssociations_; + bitField0_ = (bitField0_ & ~0x00000001); + backupPlanAssociationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupPlanAssociationsFieldBuilder() + : null; + } else { + backupPlanAssociationsBuilder_.addAllMessages(other.backupPlanAssociations_); + } + } + } + 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.backupdr.v1beta.BackupPlanAssociation m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.parser(), + extensionRegistry); + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(m); + } else { + backupPlanAssociationsBuilder_.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 + backupPlanAssociations_ = java.util.Collections.emptyList(); + + private void ensureBackupPlanAssociationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backupPlanAssociations_ = + new java.util.ArrayList( + backupPlanAssociations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder> + backupPlanAssociationsBuilder_; + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public java.util.List + getBackupPlanAssociationsList() { + if (backupPlanAssociationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupPlanAssociations_); + } else { + return backupPlanAssociationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public int getBackupPlanAssociationsCount() { + if (backupPlanAssociationsBuilder_ == null) { + return backupPlanAssociations_.size(); + } else { + return backupPlanAssociationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociations( + int index) { + if (backupPlanAssociationsBuilder_ == null) { + return backupPlanAssociations_.get(index); + } else { + return backupPlanAssociationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder setBackupPlanAssociations( + int index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.set(index, value); + onChanged(); + } else { + backupPlanAssociationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder setBackupPlanAssociations( + int index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder builderForValue) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.set(index, builderForValue.build()); + onChanged(); + } else { + backupPlanAssociationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder addBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(value); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder addBackupPlanAssociations( + int index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(index, value); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder addBackupPlanAssociations( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder builderForValue) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(builderForValue.build()); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder addBackupPlanAssociations( + int index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder builderForValue) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.add(index, builderForValue.build()); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder addAllBackupPlanAssociations( + java.lang.Iterable + values) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPlanAssociations_); + onChanged(); + } else { + backupPlanAssociationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder clearBackupPlanAssociations() { + if (backupPlanAssociationsBuilder_ == null) { + backupPlanAssociations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupPlanAssociationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public Builder removeBackupPlanAssociations(int index) { + if (backupPlanAssociationsBuilder_ == null) { + ensureBackupPlanAssociationsIsMutable(); + backupPlanAssociations_.remove(index); + onChanged(); + } else { + backupPlanAssociationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder + getBackupPlanAssociationsBuilder(int index) { + return internalGetBackupPlanAssociationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationsOrBuilder(int index) { + if (backupPlanAssociationsBuilder_ == null) { + return backupPlanAssociations_.get(index); + } else { + return backupPlanAssociationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public java.util.List + getBackupPlanAssociationsOrBuilderList() { + if (backupPlanAssociationsBuilder_ != null) { + return backupPlanAssociationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupPlanAssociations_); + } + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder + addBackupPlanAssociationsBuilder() { + return internalGetBackupPlanAssociationsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder + addBackupPlanAssociationsBuilder(int index) { + return internalGetBackupPlanAssociationsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Backup Plan Associations in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup plan associations in reachable
+     * locations and the 'unreachable' field will be populated with a list of
+     * unreachable locations.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + public java.util.List + getBackupPlanAssociationsBuilderList() { + return internalGetBackupPlanAssociationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder> + internalGetBackupPlanAssociationsFieldBuilder() { + if (backupPlanAssociationsBuilder_ == null) { + backupPlanAssociationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder>( + backupPlanAssociations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + backupPlanAssociations_ = null; + } + return backupPlanAssociationsBuilder_; + } + + 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) + private static final com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupPlanAssociationsResponse 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.backupdr.v1beta.ListBackupPlanAssociationsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsResponseOrBuilder.java new file mode 100644 index 000000000000..e47b8ae6d335 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanAssociationsResponseOrBuilder.java @@ -0,0 +1,211 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupPlanAssociationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + java.util.List + getBackupPlanAssociationsList(); + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociations(int index); + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + int getBackupPlanAssociationsCount(); + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + java.util.List + getBackupPlanAssociationsOrBuilderList(); + + /** + * + * + *
+   * The list of Backup Plan Associations in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup plan associations in reachable
+   * locations and the 'unreachable' field will be populated with a list of
+   * unreachable locations.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_associations = 1; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationsOrBuilder(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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsRequest.java new file mode 100644 index 000000000000..c1cb8c5ddfdc --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsRequest.java @@ -0,0 +1,987 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The request message for getting a list of `BackupPlanRevision`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest} + */ +@com.google.protobuf.Generated +public final class ListBackupPlanRevisionsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) + ListBackupPlanRevisionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupPlanRevisionsRequest"); + } + + // Use ListBackupPlanRevisionsRequest.newBuilder() to construct. + private ListBackupPlanRevisionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupPlanRevisionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve
+   * `BackupPlanRevisions` information. Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+   * **us-central1**.
+   * 
+ * + * + * 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 project and location for which to retrieve
+   * `BackupPlanRevisions` information. Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+   * **us-central1**.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. The maximum number of `BackupPlans` to return in a single
+   * response. If not specified, a default value will be chosen by the service.
+   * Note that the response may include a partial list and a caller should
+   * only rely on the response's
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * to determine if there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * received from a previous `ListBackupPlans` call.
+   * Provide this to retrieve the subsequent page in a multi-page list of
+   * results. When paginating, all other parameters provided to
+   * `ListBackupPlans` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * received from a previous `ListBackupPlans` call.
+   * Provide this to retrieve the subsequent page in a multi-page list of
+   * results. When paginating, all other parameters provided to
+   * `ListBackupPlans` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + 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.backupdr.v1beta.ListBackupPlanRevisionsRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest other = + (com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest 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.backupdr.v1beta.ListBackupPlanRevisionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest 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.backupdr.v1beta.ListBackupPlanRevisionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlanRevisionsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request message for getting a list of `BackupPlanRevision`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest build() { + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest result = + new com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest 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_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.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(); + } + 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 + 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 project and location for which to retrieve
+     * `BackupPlanRevisions` information. Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**.
+     * 
+ * + * + * 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 project and location for which to retrieve
+     * `BackupPlanRevisions` information. Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**.
+     * 
+ * + * + * 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 project and location for which to retrieve
+     * `BackupPlanRevisions` information. Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**.
+     * 
+ * + * + * 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 project and location for which to retrieve
+     * `BackupPlanRevisions` information. Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**.
+     * 
+ * + * + * 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 project and location for which to retrieve
+     * `BackupPlanRevisions` information. Format:
+     * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. The maximum number of `BackupPlans` to return in a single
+     * response. If not specified, a default value will be chosen by the service.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of `BackupPlans` to return in a single
+     * response. If not specified, a default value will be chosen by the service.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of `BackupPlans` to return in a single
+     * response. If not specified, a default value will be chosen by the service.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) + private static final com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupPlanRevisionsRequest 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.backupdr.v1beta.ListBackupPlanRevisionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsRequestOrBuilder.java new file mode 100644 index 000000000000..25b578b385b2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupPlanRevisionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve
+   * `BackupPlanRevisions` information. Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+   * **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve
+   * `BackupPlanRevisions` information. Format:
+   * `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+   * **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of `BackupPlans` to return in a single
+   * response. If not specified, a default value will be chosen by the service.
+   * Note that the response may include a partial list and a caller should
+   * only rely on the response's
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * to determine if there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * received from a previous `ListBackupPlans` call.
+   * Provide this to retrieve the subsequent page in a multi-page list of
+   * results. When paginating, all other parameters provided to
+   * `ListBackupPlans` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * received from a previous `ListBackupPlans` call.
+   * Provide this to retrieve the subsequent page in a multi-page list of
+   * results. When paginating, all other parameters provided to
+   * `ListBackupPlans` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsResponse.java new file mode 100644 index 000000000000..71fc9a31078c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsResponse.java @@ -0,0 +1,1640 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The response message for getting a list of `BackupPlanRevision`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse} + */ +@com.google.protobuf.Generated +public final class ListBackupPlanRevisionsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) + ListBackupPlanRevisionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupPlanRevisionsResponse"); + } + + // Use ListBackupPlanRevisionsResponse.newBuilder() to construct. + private ListBackupPlanRevisionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupPlanRevisionsResponse() { + backupPlanRevisions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.Builder.class); + } + + public static final int BACKUP_PLAN_REVISIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backupPlanRevisions_; + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanRevisionsList() { + return backupPlanRevisions_; + } + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + @java.lang.Override + public java.util.List + getBackupPlanRevisionsOrBuilderList() { + return backupPlanRevisions_; + } + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + @java.lang.Override + public int getBackupPlanRevisionsCount() { + return backupPlanRevisions_.size(); + } + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanRevision getBackupPlanRevisions(int index) { + return backupPlanRevisions_.get(index); + } + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanRevisionOrBuilder + getBackupPlanRevisionsOrBuilder(int index) { + return backupPlanRevisions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+   * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+   * results. If this field is omitted or empty, then there are no more results
+   * to 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 which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+   * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+   * results. If this field is omitted or empty, then there are no more results
+   * to 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 < backupPlanRevisions_.size(); i++) { + output.writeMessage(1, backupPlanRevisions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < backupPlanRevisions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, backupPlanRevisions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlanRevisionsResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse other = + (com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) obj; + + if (!getBackupPlanRevisionsList().equals(other.getBackupPlanRevisionsList())) 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 (getBackupPlanRevisionsCount() > 0) { + hash = (37 * hash) + BACKUP_PLAN_REVISIONS_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanRevisionsList().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.backupdr.v1beta.ListBackupPlanRevisionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse 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.backupdr.v1beta.ListBackupPlanRevisionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse 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.backupdr.v1beta.ListBackupPlanRevisionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlanRevisionsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response message for getting a list of `BackupPlanRevision`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupPlanRevisionsBuilder_ == null) { + backupPlanRevisions_ = java.util.Collections.emptyList(); + } else { + backupPlanRevisions_ = null; + backupPlanRevisionsBuilder_.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.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlanRevisionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse build() { + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse result = + new com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse result) { + if (backupPlanRevisionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backupPlanRevisions_ = java.util.Collections.unmodifiableList(backupPlanRevisions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backupPlanRevisions_ = backupPlanRevisions_; + } else { + result.backupPlanRevisions_ = backupPlanRevisionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse.getDefaultInstance()) + return this; + if (backupPlanRevisionsBuilder_ == null) { + if (!other.backupPlanRevisions_.isEmpty()) { + if (backupPlanRevisions_.isEmpty()) { + backupPlanRevisions_ = other.backupPlanRevisions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.addAll(other.backupPlanRevisions_); + } + onChanged(); + } + } else { + if (!other.backupPlanRevisions_.isEmpty()) { + if (backupPlanRevisionsBuilder_.isEmpty()) { + backupPlanRevisionsBuilder_.dispose(); + backupPlanRevisionsBuilder_ = null; + backupPlanRevisions_ = other.backupPlanRevisions_; + bitField0_ = (bitField0_ & ~0x00000001); + backupPlanRevisionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupPlanRevisionsFieldBuilder() + : null; + } else { + backupPlanRevisionsBuilder_.addAllMessages(other.backupPlanRevisions_); + } + } + } + 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.backupdr.v1beta.BackupPlanRevision m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupPlanRevision.parser(), + extensionRegistry); + if (backupPlanRevisionsBuilder_ == null) { + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.add(m); + } else { + backupPlanRevisionsBuilder_.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 + backupPlanRevisions_ = java.util.Collections.emptyList(); + + private void ensureBackupPlanRevisionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backupPlanRevisions_ = + new java.util.ArrayList( + backupPlanRevisions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanRevision, + com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanRevisionOrBuilder> + backupPlanRevisionsBuilder_; + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public java.util.List + getBackupPlanRevisionsList() { + if (backupPlanRevisionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupPlanRevisions_); + } else { + return backupPlanRevisionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public int getBackupPlanRevisionsCount() { + if (backupPlanRevisionsBuilder_ == null) { + return backupPlanRevisions_.size(); + } else { + return backupPlanRevisionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanRevision getBackupPlanRevisions(int index) { + if (backupPlanRevisionsBuilder_ == null) { + return backupPlanRevisions_.get(index); + } else { + return backupPlanRevisionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder setBackupPlanRevisions( + int index, com.google.cloud.backupdr.v1beta.BackupPlanRevision value) { + if (backupPlanRevisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.set(index, value); + onChanged(); + } else { + backupPlanRevisionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder setBackupPlanRevisions( + int index, com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder builderForValue) { + if (backupPlanRevisionsBuilder_ == null) { + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.set(index, builderForValue.build()); + onChanged(); + } else { + backupPlanRevisionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder addBackupPlanRevisions( + com.google.cloud.backupdr.v1beta.BackupPlanRevision value) { + if (backupPlanRevisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.add(value); + onChanged(); + } else { + backupPlanRevisionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder addBackupPlanRevisions( + int index, com.google.cloud.backupdr.v1beta.BackupPlanRevision value) { + if (backupPlanRevisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.add(index, value); + onChanged(); + } else { + backupPlanRevisionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder addBackupPlanRevisions( + com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder builderForValue) { + if (backupPlanRevisionsBuilder_ == null) { + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.add(builderForValue.build()); + onChanged(); + } else { + backupPlanRevisionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder addBackupPlanRevisions( + int index, com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder builderForValue) { + if (backupPlanRevisionsBuilder_ == null) { + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.add(index, builderForValue.build()); + onChanged(); + } else { + backupPlanRevisionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder addAllBackupPlanRevisions( + java.lang.Iterable values) { + if (backupPlanRevisionsBuilder_ == null) { + ensureBackupPlanRevisionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPlanRevisions_); + onChanged(); + } else { + backupPlanRevisionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder clearBackupPlanRevisions() { + if (backupPlanRevisionsBuilder_ == null) { + backupPlanRevisions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupPlanRevisionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public Builder removeBackupPlanRevisions(int index) { + if (backupPlanRevisionsBuilder_ == null) { + ensureBackupPlanRevisionsIsMutable(); + backupPlanRevisions_.remove(index); + onChanged(); + } else { + backupPlanRevisionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder + getBackupPlanRevisionsBuilder(int index) { + return internalGetBackupPlanRevisionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanRevisionOrBuilder + getBackupPlanRevisionsOrBuilder(int index) { + if (backupPlanRevisionsBuilder_ == null) { + return backupPlanRevisions_.get(index); + } else { + return backupPlanRevisionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public java.util.List + getBackupPlanRevisionsOrBuilderList() { + if (backupPlanRevisionsBuilder_ != null) { + return backupPlanRevisionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupPlanRevisions_); + } + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder + addBackupPlanRevisionsBuilder() { + return internalGetBackupPlanRevisionsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupPlanRevision.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder + addBackupPlanRevisionsBuilder(int index) { + return internalGetBackupPlanRevisionsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.BackupPlanRevision.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `BackupPlanRevisions` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + public java.util.List + getBackupPlanRevisionsBuilderList() { + return internalGetBackupPlanRevisionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanRevision, + com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanRevisionOrBuilder> + internalGetBackupPlanRevisionsFieldBuilder() { + if (backupPlanRevisionsBuilder_ == null) { + backupPlanRevisionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanRevision, + com.google.cloud.backupdr.v1beta.BackupPlanRevision.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanRevisionOrBuilder>( + backupPlanRevisions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + backupPlanRevisions_ = null; + } + return backupPlanRevisionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+     * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+     * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+     * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+     * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+     * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) + private static final com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupPlanRevisionsResponse 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.backupdr.v1beta.ListBackupPlanRevisionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsResponseOrBuilder.java new file mode 100644 index 000000000000..589e10ef1905 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlanRevisionsResponseOrBuilder.java @@ -0,0 +1,213 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupPlanRevisionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + java.util.List getBackupPlanRevisionsList(); + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanRevision getBackupPlanRevisions(int index); + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + int getBackupPlanRevisionsCount(); + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + java.util.List + getBackupPlanRevisionsOrBuilderList(); + + /** + * + * + *
+   * The list of `BackupPlanRevisions` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlanRevision backup_plan_revisions = 1; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanRevisionOrBuilder getBackupPlanRevisionsOrBuilder( + int index); + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+   * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+   * results. If this field is omitted or empty, then there are no more results
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token]
+   * in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of
+   * results. If this field is omitted or empty, then there are no more results
+   * to 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansRequest.java new file mode 100644 index 000000000000..62c2d7cc1a9b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansRequest.java @@ -0,0 +1,1365 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The request message for getting a list `BackupPlan`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlansRequest} + */ +@com.google.protobuf.Generated +public final class ListBackupPlansRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupPlansRequest) + ListBackupPlansRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupPlansRequest"); + } + + // Use ListBackupPlansRequest.newBuilder() to construct. + private ListBackupPlansRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupPlansRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve `BackupPlans`
+   * information. Format: `projects/{project}/locations/{location}`. In Google
+   * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+   * **us-central1**. To retrieve backup plans for all locations, use "-" for
+   * the
+   * `{location}` value.
+   * 
+ * + * + * 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 project and location for which to retrieve `BackupPlans`
+   * information. Format: `projects/{project}/locations/{location}`. In Google
+   * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+   * **us-central1**. To retrieve backup plans for all locations, use "-" for
+   * the
+   * `{location}` value.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. The maximum number of `BackupPlans` to return in a single
+   * response. If not specified, a default value will be chosen by the service.
+   * Note that the response may include a partial list and a caller should
+   * only rely on the response's
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * to determine if there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * received from a previous `ListBackupPlans` call.
+   * Provide this to retrieve the subsequent page in a multi-page list of
+   * results. When paginating, all other parameters provided to
+   * `ListBackupPlans` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * received from a previous `ListBackupPlans` call.
+   * Provide this to retrieve the subsequent page in a multi-page list of
+   * results. When paginating, all other parameters provided to
+   * `ListBackupPlans` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Field match expression used to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Field match expression used to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Field by which to sort the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Field by which to sort the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlansRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest other = + (com.google.cloud.backupdr.v1beta.ListBackupPlansRequest) 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.backupdr.v1beta.ListBackupPlansRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest 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.backupdr.v1beta.ListBackupPlansRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest 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.backupdr.v1beta.ListBackupPlansRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlansRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request message for getting a list `BackupPlan`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlansRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupPlansRequest) + com.google.cloud.backupdr.v1beta.ListBackupPlansRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListBackupPlansRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlansRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupPlansRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlansRequest build() { + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlansRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupPlansRequest result = + new com.google.cloud.backupdr.v1beta.ListBackupPlansRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ListBackupPlansRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupPlansRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListBackupPlansRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListBackupPlansRequest other) { + if (other == com.google.cloud.backupdr.v1beta.ListBackupPlansRequest.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. The project and location for which to retrieve `BackupPlans`
+     * information. Format: `projects/{project}/locations/{location}`. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**. To retrieve backup plans for all locations, use "-" for
+     * the
+     * `{location}` value.
+     * 
+ * + * + * 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 project and location for which to retrieve `BackupPlans`
+     * information. Format: `projects/{project}/locations/{location}`. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**. To retrieve backup plans for all locations, use "-" for
+     * the
+     * `{location}` value.
+     * 
+ * + * + * 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 project and location for which to retrieve `BackupPlans`
+     * information. Format: `projects/{project}/locations/{location}`. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**. To retrieve backup plans for all locations, use "-" for
+     * the
+     * `{location}` value.
+     * 
+ * + * + * 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 project and location for which to retrieve `BackupPlans`
+     * information. Format: `projects/{project}/locations/{location}`. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**. To retrieve backup plans for all locations, use "-" for
+     * the
+     * `{location}` value.
+     * 
+ * + * + * 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 project and location for which to retrieve `BackupPlans`
+     * information. Format: `projects/{project}/locations/{location}`. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+     * **us-central1**. To retrieve backup plans for all locations, use "-" for
+     * the
+     * `{location}` value.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. The maximum number of `BackupPlans` to return in a single
+     * response. If not specified, a default value will be chosen by the service.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of `BackupPlans` to return in a single
+     * response. If not specified, a default value will be chosen by the service.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of `BackupPlans` to return in a single
+     * response. If not specified, a default value will be chosen by the service.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+     * received from a previous `ListBackupPlans` call.
+     * Provide this to retrieve the subsequent page in a multi-page list of
+     * results. When paginating, all other parameters provided to
+     * `ListBackupPlans` must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupPlansRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupPlansRequest) + private static final com.google.cloud.backupdr.v1beta.ListBackupPlansRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupPlansRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupPlansRequest 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.backupdr.v1beta.ListBackupPlansRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansRequestOrBuilder.java new file mode 100644 index 000000000000..be85a798009c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansRequestOrBuilder.java @@ -0,0 +1,174 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupPlansRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupPlansRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve `BackupPlans`
+   * information. Format: `projects/{project}/locations/{location}`. In Google
+   * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+   * **us-central1**. To retrieve backup plans for all locations, use "-" for
+   * the
+   * `{location}` value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve `BackupPlans`
+   * information. Format: `projects/{project}/locations/{location}`. In Google
+   * Cloud Backup and DR, locations map to Google Cloud regions, for e.g.
+   * **us-central1**. To retrieve backup plans for all locations, use "-" for
+   * the
+   * `{location}` value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of `BackupPlans` to return in a single
+   * response. If not specified, a default value will be chosen by the service.
+   * Note that the response may include a partial list and a caller should
+   * only rely on the response's
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * to determine if there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * received from a previous `ListBackupPlans` call.
+   * Provide this to retrieve the subsequent page in a multi-page list of
+   * results. When paginating, all other parameters provided to
+   * `ListBackupPlans` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token]
+   * received from a previous `ListBackupPlans` call.
+   * Provide this to retrieve the subsequent page in a multi-page list of
+   * results. When paginating, all other parameters provided to
+   * `ListBackupPlans` must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Field match expression used to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Field match expression used to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Field by which to sort the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Field by which to sort the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansResponse.java new file mode 100644 index 000000000000..98aa1e54577b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansResponse.java @@ -0,0 +1,1616 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The response message for getting a list of `BackupPlan`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlansResponse} + */ +@com.google.protobuf.Generated +public final class ListBackupPlansResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupPlansResponse) + ListBackupPlansResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupPlansResponse"); + } + + // Use ListBackupPlansResponse.newBuilder() to construct. + private ListBackupPlansResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupPlansResponse() { + backupPlans_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse.Builder.class); + } + + public static final int BACKUP_PLANS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backupPlans_; + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + @java.lang.Override + public java.util.List getBackupPlansList() { + return backupPlans_; + } + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + @java.lang.Override + public java.util.List + getBackupPlansOrBuilderList() { + return backupPlans_; + } + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + @java.lang.Override + public int getBackupPlansCount() { + return backupPlans_.size(); + } + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlans(int index) { + return backupPlans_.get(index); + } + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlansOrBuilder(int index) { + return backupPlans_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+   * in a subsequent `ListBackupPlans` call to retrieve the next page of
+   * results. If this field is omitted or empty, then there are no more results
+   * to 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 which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+   * in a subsequent `ListBackupPlans` call to retrieve the next page of
+   * results. If this field is omitted or empty, then there are no more results
+   * to 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 < backupPlans_.size(); i++) { + output.writeMessage(1, backupPlans_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < backupPlans_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, backupPlans_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlansResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse other = + (com.google.cloud.backupdr.v1beta.ListBackupPlansResponse) obj; + + if (!getBackupPlansList().equals(other.getBackupPlansList())) 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 (getBackupPlansCount() > 0) { + hash = (37 * hash) + BACKUP_PLANS_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlansList().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.backupdr.v1beta.ListBackupPlansResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse 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.backupdr.v1beta.ListBackupPlansResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse 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.backupdr.v1beta.ListBackupPlansResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupPlansResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response message for getting a list of `BackupPlan`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupPlansResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupPlansResponse) + com.google.cloud.backupdr.v1beta.ListBackupPlansResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListBackupPlansResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (backupPlansBuilder_ == null) { + backupPlans_ = java.util.Collections.emptyList(); + } else { + backupPlans_ = null; + backupPlansBuilder_.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.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupPlansResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlansResponse getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupPlansResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlansResponse build() { + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupPlansResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse result = + new com.google.cloud.backupdr.v1beta.ListBackupPlansResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListBackupPlansResponse result) { + if (backupPlansBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + backupPlans_ = java.util.Collections.unmodifiableList(backupPlans_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.backupPlans_ = backupPlans_; + } else { + result.backupPlans_ = backupPlansBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ListBackupPlansResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupPlansResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListBackupPlansResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListBackupPlansResponse other) { + if (other == com.google.cloud.backupdr.v1beta.ListBackupPlansResponse.getDefaultInstance()) + return this; + if (backupPlansBuilder_ == null) { + if (!other.backupPlans_.isEmpty()) { + if (backupPlans_.isEmpty()) { + backupPlans_ = other.backupPlans_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBackupPlansIsMutable(); + backupPlans_.addAll(other.backupPlans_); + } + onChanged(); + } + } else { + if (!other.backupPlans_.isEmpty()) { + if (backupPlansBuilder_.isEmpty()) { + backupPlansBuilder_.dispose(); + backupPlansBuilder_ = null; + backupPlans_ = other.backupPlans_; + bitField0_ = (bitField0_ & ~0x00000001); + backupPlansBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupPlansFieldBuilder() + : null; + } else { + backupPlansBuilder_.addAllMessages(other.backupPlans_); + } + } + } + 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.backupdr.v1beta.BackupPlan m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupPlan.parser(), extensionRegistry); + if (backupPlansBuilder_ == null) { + ensureBackupPlansIsMutable(); + backupPlans_.add(m); + } else { + backupPlansBuilder_.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 backupPlans_ = + java.util.Collections.emptyList(); + + private void ensureBackupPlansIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + backupPlans_ = + new java.util.ArrayList(backupPlans_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder> + backupPlansBuilder_; + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public java.util.List getBackupPlansList() { + if (backupPlansBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupPlans_); + } else { + return backupPlansBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public int getBackupPlansCount() { + if (backupPlansBuilder_ == null) { + return backupPlans_.size(); + } else { + return backupPlansBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlans(int index) { + if (backupPlansBuilder_ == null) { + return backupPlans_.get(index); + } else { + return backupPlansBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder setBackupPlans(int index, com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlansIsMutable(); + backupPlans_.set(index, value); + onChanged(); + } else { + backupPlansBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder setBackupPlans( + int index, com.google.cloud.backupdr.v1beta.BackupPlan.Builder builderForValue) { + if (backupPlansBuilder_ == null) { + ensureBackupPlansIsMutable(); + backupPlans_.set(index, builderForValue.build()); + onChanged(); + } else { + backupPlansBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder addBackupPlans(com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlansIsMutable(); + backupPlans_.add(value); + onChanged(); + } else { + backupPlansBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder addBackupPlans(int index, com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupPlansIsMutable(); + backupPlans_.add(index, value); + onChanged(); + } else { + backupPlansBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder addBackupPlans( + com.google.cloud.backupdr.v1beta.BackupPlan.Builder builderForValue) { + if (backupPlansBuilder_ == null) { + ensureBackupPlansIsMutable(); + backupPlans_.add(builderForValue.build()); + onChanged(); + } else { + backupPlansBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder addBackupPlans( + int index, com.google.cloud.backupdr.v1beta.BackupPlan.Builder builderForValue) { + if (backupPlansBuilder_ == null) { + ensureBackupPlansIsMutable(); + backupPlans_.add(index, builderForValue.build()); + onChanged(); + } else { + backupPlansBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder addAllBackupPlans( + java.lang.Iterable values) { + if (backupPlansBuilder_ == null) { + ensureBackupPlansIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupPlans_); + onChanged(); + } else { + backupPlansBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder clearBackupPlans() { + if (backupPlansBuilder_ == null) { + backupPlans_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupPlansBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public Builder removeBackupPlans(int index) { + if (backupPlansBuilder_ == null) { + ensureBackupPlansIsMutable(); + backupPlans_.remove(index); + onChanged(); + } else { + backupPlansBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupPlan.Builder getBackupPlansBuilder(int index) { + return internalGetBackupPlansFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlansOrBuilder(int index) { + if (backupPlansBuilder_ == null) { + return backupPlans_.get(index); + } else { + return backupPlansBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public java.util.List + getBackupPlansOrBuilderList() { + if (backupPlansBuilder_ != null) { + return backupPlansBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupPlans_); + } + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupPlan.Builder addBackupPlansBuilder() { + return internalGetBackupPlansFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupPlan.Builder addBackupPlansBuilder(int index) { + return internalGetBackupPlansFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `BackupPlans` in the project for the specified
+     * location.
+     *
+     * If the `{location}` value in the request is "-", the response contains a
+     * list of resources from all locations. In case any location is unreachable,
+     * the response will only return backup plans in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * BackupPlan
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + public java.util.List + getBackupPlansBuilderList() { + return internalGetBackupPlansFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder> + internalGetBackupPlansFieldBuilder() { + if (backupPlansBuilder_ == null) { + backupPlansBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder>( + backupPlans_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backupPlans_ = null; + } + return backupPlansBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+     * in a subsequent `ListBackupPlans` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+     * in a subsequent `ListBackupPlans` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+     * in a subsequent `ListBackupPlans` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+     * in a subsequent `ListBackupPlans` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+     * in a subsequent `ListBackupPlans` call to retrieve the next page of
+     * results. If this field is omitted or empty, then there are no more results
+     * to 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupPlansResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupPlansResponse) + private static final com.google.cloud.backupdr.v1beta.ListBackupPlansResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupPlansResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupPlansResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBackupPlansResponse 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.backupdr.v1beta.ListBackupPlansResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansResponseOrBuilder.java new file mode 100644 index 000000000000..12822e8edf0e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupPlansResponseOrBuilder.java @@ -0,0 +1,212 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupPlansResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupPlansResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + java.util.List getBackupPlansList(); + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlans(int index); + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + int getBackupPlansCount(); + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + java.util.List + getBackupPlansOrBuilderList(); + + /** + * + * + *
+   * The list of `BackupPlans` in the project for the specified
+   * location.
+   *
+   * If the `{location}` value in the request is "-", the response contains a
+   * list of resources from all locations. In case any location is unreachable,
+   * the response will only return backup plans in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * BackupPlan
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupPlan backup_plans = 1; + */ + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlansOrBuilder(int index); + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+   * in a subsequent `ListBackupPlans` call to retrieve the next page of
+   * results. If this field is omitted or empty, then there are no more results
+   * to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token]
+   * in a subsequent `ListBackupPlans` call to retrieve the next page of
+   * results. If this field is omitted or empty, then there are no more results
+   * to 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsRequest.java new file mode 100644 index 000000000000..def7f8eb2d0b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsRequest.java @@ -0,0 +1,1503 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for listing backupvault stores.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupVaultsRequest} + */ +@com.google.protobuf.Generated +public final class ListBackupVaultsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupVaultsRequest) + ListBackupVaultsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupVaultsRequest"); + } + + // Use ListBackupVaultsRequest.newBuilder() to construct. + private ListBackupVaultsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupVaultsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve backupvault stores
+   * information, in the format 'projects/{project_id}/locations/{location}'. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**.
+   * To retrieve backupvault stores for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+   * information, in the format 'projects/{project_id}/locations/{location}'. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**.
+   * To retrieve backupvault stores for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * Vault.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * Vault.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVaultView getView() { + com.google.cloud.backupdr.v1beta.BackupVaultView result = + com.google.cloud.backupdr.v1beta.BackupVaultView.forNumber(view_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupVaultView.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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (view_ + != com.google.cloud.backupdr.v1beta.BackupVaultView.BACKUP_VAULT_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (view_ + != com.google.cloud.backupdr.v1beta.BackupVaultView.BACKUP_VAULT_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + 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.backupdr.v1beta.ListBackupVaultsRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest other = + (com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest) 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 (view_ != other.view_) 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 = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupVaultsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupVaultsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing backupvault stores.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupVaultsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupVaultsRequest) + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest build() { + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest result = + new com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.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.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest other) { + if (other == com.google.cloud.backupdr.v1beta.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.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backupvault stores
+     * information, in the format 'projects/{project_id}/locations/{location}'. In
+     * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**.
+     * To retrieve backupvault stores for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVaultView getView() { + com.google.cloud.backupdr.v1beta.BackupVaultView result = + com.google.cloud.backupdr.v1beta.BackupVaultView.forNumber(view_); + return result == null + ? com.google.cloud.backupdr.v1beta.BackupVaultView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.backupdr.v1beta.BackupVaultView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * Vault.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupVaultsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupVaultsRequest) + private static final com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupVaultsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsRequestOrBuilder.java new file mode 100644 index 000000000000..c022004a8644 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsRequestOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupVaultsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupVaultsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve backupvault stores
+   * information, in the format 'projects/{project_id}/locations/{location}'. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**.
+   * To retrieve backupvault stores for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve backupvault stores
+   * information, in the format 'projects/{project_id}/locations/{location}'. In
+   * Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**.
+   * To retrieve backupvault stores for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * Vault.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * Vault.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVaultView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.backupdr.v1beta.BackupVaultView getView(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsResponse.java new file mode 100644 index 000000000000..c39cf37ab0b3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsResponse.java @@ -0,0 +1,1566 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for listing BackupVaults.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupVaultsResponse} + */ +@com.google.protobuf.Generated +public final class ListBackupVaultsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupVaultsResponse) + ListBackupVaultsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupVaultsResponse"); + } + + // Use ListBackupVaultsResponse.newBuilder() to construct. + private ListBackupVaultsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupVaultsResponse() { + backupVaults_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse.Builder.class); + } + + public static final int BACKUP_VAULTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backupVaults_; + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public java.util.List getBackupVaultsList() { + return backupVaults_; + } + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public java.util.List + getBackupVaultsOrBuilderList() { + return backupVaults_; + } + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public int getBackupVaultsCount() { + return backupVaults_.size(); + } + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVaults(int index) { + return backupVaults_.get(index); + } + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.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_ = ""; + + /** + * + * + *
+   * 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 < backupVaults_.size(); i++) { + output.writeMessage(1, backupVaults_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupVaultsResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse other = + (com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupVaultsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupVaultsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupVaultsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for listing BackupVaults.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupVaultsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupVaultsResponse) + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupVaultsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse build() { + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse result = + new com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse other) { + if (other == com.google.cloud.backupdr.v1beta.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.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupVaultsFieldBuilder() + : 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.backupdr.v1beta.BackupVault m = + input.readMessage( + com.google.cloud.backupdr.v1beta.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.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder> + backupVaultsBuilder_; + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public java.util.List getBackupVaultsList() { + if (backupVaultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupVaults_); + } else { + return backupVaultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public int getBackupVaultsCount() { + if (backupVaultsBuilder_ == null) { + return backupVaults_.size(); + } else { + return backupVaultsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVaults(int index) { + if (backupVaultsBuilder_ == null) { + return backupVaults_.get(index); + } else { + return backupVaultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder setBackupVaults(int index, com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.set(index, value); + onChanged(); + } else { + backupVaultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder setBackupVaults( + int index, com.google.cloud.backupdr.v1beta.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.set(index, builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults(com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.add(value); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults(int index, com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupVaultsIsMutable(); + backupVaults_.add(index, value); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults( + com.google.cloud.backupdr.v1beta.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.add(builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder addBackupVaults( + int index, com.google.cloud.backupdr.v1beta.BackupVault.Builder builderForValue) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.add(index, builderForValue.build()); + onChanged(); + } else { + backupVaultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.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; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder clearBackupVaults() { + if (backupVaultsBuilder_ == null) { + backupVaults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupVaultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public Builder removeBackupVaults(int index) { + if (backupVaultsBuilder_ == null) { + ensureBackupVaultsIsMutable(); + backupVaults_.remove(index); + onChanged(); + } else { + backupVaultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVault.Builder getBackupVaultsBuilder(int index) { + return internalGetBackupVaultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultsOrBuilder( + int index) { + if (backupVaultsBuilder_ == null) { + return backupVaults_.get(index); + } else { + return backupVaultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public java.util.List + getBackupVaultsOrBuilderList() { + if (backupVaultsBuilder_ != null) { + return backupVaultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupVaults_); + } + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVault.Builder addBackupVaultsBuilder() { + return internalGetBackupVaultsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupVault.Builder addBackupVaultsBuilder(int index) { + return internalGetBackupVaultsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of BackupVault instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return backup vaults in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + public java.util.List + getBackupVaultsBuilderList() { + return internalGetBackupVaultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder> + internalGetBackupVaultsFieldBuilder() { + if (backupVaultsBuilder_ == null) { + backupVaultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder>( + backupVaults_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backupVaults_ = null; + } + return backupVaultsBuilder_; + } + + 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupVaultsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupVaultsResponse) + private static final com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupVaultsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsResponseOrBuilder.java new file mode 100644 index 000000000000..0068e2a30060 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupVaultsResponseOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupVaultsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupVaultsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + java.util.List getBackupVaultsList(); + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + com.google.cloud.backupdr.v1beta.BackupVault getBackupVaults(int index); + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + int getBackupVaultsCount(); + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + java.util.List + getBackupVaultsOrBuilderList(); + + /** + * + * + *
+   * The list of BackupVault instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return backup vaults in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupVault backup_vaults = 1; + */ + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultsOrBuilder(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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsRequest.java new file mode 100644 index 000000000000..7c6d0dada70d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsRequest.java @@ -0,0 +1,1496 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for listing Backups.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupsRequest} + */ +@com.google.protobuf.Generated +public final class ListBackupsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupsRequest) + ListBackupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupsRequest"); + } + + // Use ListBackupsRequest.newBuilder() to construct. + private ListBackupsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupsRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve backup
+   * information, in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+   * DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * To retrieve data sources for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * 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 project and location for which to retrieve backup
+   * information, in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+   * DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * To retrieve data sources for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 VIEW_FIELD_NUMBER = 6; + private int view_ = 0; + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupView getView() { + com.google.cloud.backupdr.v1beta.BackupView result = + com.google.cloud.backupdr.v1beta.BackupView.forNumber(view_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupView.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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (view_ != com.google.cloud.backupdr.v1beta.BackupView.BACKUP_VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(6, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (view_ != com.google.cloud.backupdr.v1beta.BackupView.BACKUP_VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, view_); + } + 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.backupdr.v1beta.ListBackupsRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupsRequest other = + (com.google.cloud.backupdr.v1beta.ListBackupsRequest) 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 (view_ != other.view_) 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 = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing Backups.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupsRequest) + com.google.cloud.backupdr.v1beta.ListBackupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupsRequest.class, + com.google.cloud.backupdr.v1beta.ListBackupsRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListBackupsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupsRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupsRequest build() { + com.google.cloud.backupdr.v1beta.ListBackupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupsRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupsRequest result = + new com.google.cloud.backupdr.v1beta.ListBackupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.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.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupsRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListBackupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListBackupsRequest other) { + if (other == com.google.cloud.backupdr.v1beta.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.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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 + case 48: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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 project and location for which to retrieve backup
+     * information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backup
+     * information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backup
+     * information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backup
+     * information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve backup
+     * information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + private int view_ = 0; + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupView getView() { + com.google.cloud.backupdr.v1beta.BackupView result = + com.google.cloud.backupdr.v1beta.BackupView.forNumber(view_); + return result == null ? com.google.cloud.backupdr.v1beta.BackupView.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.backupdr.v1beta.BackupView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+     * resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000020); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupsRequest) + private static final com.google.cloud.backupdr.v1beta.ListBackupsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupsRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsRequestOrBuilder.java new file mode 100644 index 000000000000..f5040c311011 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsRequestOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve backup
+   * information, in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+   * DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * To retrieve data sources for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve backup
+   * information, in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+   * DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * To retrieve data sources for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Optional. Reserved for future use to provide a BASIC & FULL view of Backup
+   * resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.backupdr.v1beta.BackupView getView(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsResponse.java new file mode 100644 index 000000000000..9a0e82f7da27 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsResponse.java @@ -0,0 +1,1561 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for listing Backups.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupsResponse} + */ +@com.google.protobuf.Generated +public final class ListBackupsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBackupsResponse) + ListBackupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBackupsResponse"); + } + + // Use ListBackupsResponse.newBuilder() to construct. + private ListBackupsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBackupsResponse() { + backups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupsResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupsResponse.Builder.class); + } + + public static final int BACKUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List backups_; + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public java.util.List getBackupsList() { + return backups_; + } + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public java.util.List + getBackupsOrBuilderList() { + return backups_; + } + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public int getBackupsCount() { + return backups_.size(); + } + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup getBackups(int index) { + return backups_.get(index); + } + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.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_ = ""; + + /** + * + * + *
+   * 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 < backups_.size(); i++) { + output.writeMessage(1, backups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBackupsResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBackupsResponse other = + (com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBackupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for listing Backups.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBackupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBackupsResponse) + com.google.cloud.backupdr.v1beta.ListBackupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBackupsResponse.class, + com.google.cloud.backupdr.v1beta.ListBackupsResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListBackupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListBackupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupsResponse getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBackupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupsResponse build() { + com.google.cloud.backupdr.v1beta.ListBackupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBackupsResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListBackupsResponse result = + new com.google.cloud.backupdr.v1beta.ListBackupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBackupsResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListBackupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListBackupsResponse other) { + if (other == com.google.cloud.backupdr.v1beta.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.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupsFieldBuilder() + : 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.backupdr.v1beta.Backup m = + input.readMessage( + com.google.cloud.backupdr.v1beta.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.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder> + backupsBuilder_; + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public java.util.List getBackupsList() { + if (backupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backups_); + } else { + return backupsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public int getBackupsCount() { + if (backupsBuilder_ == null) { + return backups_.size(); + } else { + return backupsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.Backup getBackups(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder setBackups(int index, com.google.cloud.backupdr.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.set(index, value); + onChanged(); + } else { + backupsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder setBackups( + int index, com.google.cloud.backupdr.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.set(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.backupdr.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(value); + onChanged(); + } else { + backupsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder addBackups(int index, com.google.cloud.backupdr.v1beta.Backup value) { + if (backupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupsIsMutable(); + backups_.add(index, value); + onChanged(); + } else { + backupsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder addBackups(com.google.cloud.backupdr.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder addBackups( + int index, com.google.cloud.backupdr.v1beta.Backup.Builder builderForValue) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(index, builderForValue.build()); + onChanged(); + } else { + backupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.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; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder clearBackups() { + if (backupsBuilder_ == null) { + backups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + backupsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public Builder removeBackups(int index) { + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.remove(index); + onChanged(); + } else { + backupsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.Backup.Builder getBackupsBuilder(int index) { + return internalGetBackupsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.BackupOrBuilder getBackupsOrBuilder(int index) { + if (backupsBuilder_ == null) { + return backups_.get(index); + } else { + return backupsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public java.util.List + getBackupsOrBuilderList() { + if (backupsBuilder_ != null) { + return backupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backups_); + } + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.Backup.Builder addBackupsBuilder() { + return internalGetBackupsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public com.google.cloud.backupdr.v1beta.Backup.Builder addBackupsBuilder(int index) { + return internalGetBackupsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Backup instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + public java.util.List getBackupsBuilderList() { + return internalGetBackupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder> + internalGetBackupsFieldBuilder() { + if (backupsBuilder_ == null) { + backupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder>( + backups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + backups_ = null; + } + return backupsBuilder_; + } + + 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBackupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBackupsResponse) + private static final com.google.cloud.backupdr.v1beta.ListBackupsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBackupsResponse(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.ListBackupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsResponseOrBuilder.java new file mode 100644 index 000000000000..e7d3856a80eb --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBackupsResponseOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBackupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBackupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + java.util.List getBackupsList(); + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + com.google.cloud.backupdr.v1beta.Backup getBackups(int index); + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + int getBackupsCount(); + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + java.util.List + getBackupsOrBuilderList(); + + /** + * + * + *
+   * The list of Backup instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.Backup backups = 1; + */ + com.google.cloud.backupdr.v1beta.BackupOrBuilder getBackupsOrBuilder(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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesRequest.java new file mode 100644 index 000000000000..0474c544ba18 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesRequest.java @@ -0,0 +1,1370 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for List BindingMatchingResources.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest} + */ +@com.google.protobuf.Generated +public final class ListBindingMatchingResourcesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) + ListBindingMatchingResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBindingMatchingResourcesRequest"); + } + + // Use ListBindingMatchingResourcesRequest.newBuilder() to construct. + private ListBindingMatchingResourcesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBindingMatchingResourcesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.class, + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project, location, auto protection policy and binding for
+   * which to retrieve `BindingMatchingResources` information. Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+   * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example **us-central1**.
+   * 
+ * + * + * 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 project, location, auto protection policy and binding for
+   * which to retrieve `BindingMatchingResources` information. Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+   * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example **us-central1**.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. The maximum number of `BindingMatchingResources` to return in a
+   * single response. The default page size is 100 and maximum page size is 200.
+   * Note that the response may include a partial list and a caller should
+   * only rely on the response's
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+   * to determine if there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+   * received from a previous `ListBindingMatchingResources` call. Provide this
+   * to retrieve the subsequent page in a multi-page list of results. When
+   * paginating, all other parameters provided to `ListBindingMatchingResources`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+   * received from a previous `ListBindingMatchingResources` call. Provide this
+   * to retrieve the subsequent page in a multi-page list of results. When
+   * paginating, all other parameters provided to `ListBindingMatchingResources`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Field match expression used to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Field match expression used to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Field by which to sort the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Field by which to sort the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBindingMatchingResourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest other = + (com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) 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.backupdr.v1beta.ListBindingMatchingResourcesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest 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.backupdr.v1beta.ListBindingMatchingResourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest 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.backupdr.v1beta.ListBindingMatchingResourcesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBindingMatchingResourcesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for List BindingMatchingResources.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.class, + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest build() { + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest result = + new com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest + .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. The project, location, auto protection policy and binding for
+     * which to retrieve `BindingMatchingResources` information. Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example **us-central1**.
+     * 
+ * + * + * 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 project, location, auto protection policy and binding for
+     * which to retrieve `BindingMatchingResources` information. Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example **us-central1**.
+     * 
+ * + * + * 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 project, location, auto protection policy and binding for
+     * which to retrieve `BindingMatchingResources` information. Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example **us-central1**.
+     * 
+ * + * + * 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 project, location, auto protection policy and binding for
+     * which to retrieve `BindingMatchingResources` information. Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example **us-central1**.
+     * 
+ * + * + * 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 project, location, auto protection policy and binding for
+     * which to retrieve `BindingMatchingResources` information. Format:
+     * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example **us-central1**.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. The maximum number of `BindingMatchingResources` to return in a
+     * single response. The default page size is 100 and maximum page size is 200.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of `BindingMatchingResources` to return in a
+     * single response. The default page size is 100 and maximum page size is 200.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of `BindingMatchingResources` to return in a
+     * single response. The default page size is 100 and maximum page size is 200.
+     * Note that the response may include a partial list and a caller should
+     * only rely on the response's
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+     * to determine if there are more instances left to be queried.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+     * received from a previous `ListBindingMatchingResources` call. Provide this
+     * to retrieve the subsequent page in a multi-page list of results. When
+     * paginating, all other parameters provided to `ListBindingMatchingResources`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+     * received from a previous `ListBindingMatchingResources` call. Provide this
+     * to retrieve the subsequent page in a multi-page list of results. When
+     * paginating, all other parameters provided to `ListBindingMatchingResources`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+     * received from a previous `ListBindingMatchingResources` call. Provide this
+     * to retrieve the subsequent page in a multi-page list of results. When
+     * paginating, all other parameters provided to `ListBindingMatchingResources`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+     * received from a previous `ListBindingMatchingResources` call. Provide this
+     * to retrieve the subsequent page in a multi-page list of results. When
+     * paginating, all other parameters provided to `ListBindingMatchingResources`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The value of
+     * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+     * received from a previous `ListBindingMatchingResources` call. Provide this
+     * to retrieve the subsequent page in a multi-page list of results. When
+     * paginating, all other parameters provided to `ListBindingMatchingResources`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field match expression used to filter the results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field by which to sort the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) + private static final com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBindingMatchingResourcesRequest 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.backupdr.v1beta.ListBindingMatchingResourcesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesRequestOrBuilder.java new file mode 100644 index 000000000000..b30fb316578f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesRequestOrBuilder.java @@ -0,0 +1,172 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBindingMatchingResourcesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project, location, auto protection policy and binding for
+   * which to retrieve `BindingMatchingResources` information. Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+   * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project, location, auto protection policy and binding for
+   * which to retrieve `BindingMatchingResources` information. Format:
+   * `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`.
+   * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of `BindingMatchingResources` to return in a
+   * single response. The default page size is 100 and maximum page size is 200.
+   * Note that the response may include a partial list and a caller should
+   * only rely on the response's
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+   * to determine if there are more instances left to be queried.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+   * received from a previous `ListBindingMatchingResources` call. Provide this
+   * to retrieve the subsequent page in a multi-page list of results. When
+   * paginating, all other parameters provided to `ListBindingMatchingResources`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The value of
+   * [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token]
+   * received from a previous `ListBindingMatchingResources` call. Provide this
+   * to retrieve the subsequent page in a multi-page list of results. When
+   * paginating, all other parameters provided to `ListBindingMatchingResources`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Field match expression used to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Field match expression used to filter the results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Field by which to sort the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Field by which to sort the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesResponse.java new file mode 100644 index 000000000000..dcf28722c83b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesResponse.java @@ -0,0 +1,1224 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * The response message for getting a list of `BindingMatchingResources`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse} + */ +@com.google.protobuf.Generated +public final class ListBindingMatchingResourcesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) + ListBindingMatchingResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListBindingMatchingResourcesResponse"); + } + + // Use ListBindingMatchingResourcesResponse.newBuilder() to construct. + private ListBindingMatchingResourcesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListBindingMatchingResourcesResponse() { + matchingResources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.class, + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.Builder.class); + } + + public static final int MATCHING_RESOURCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + matchingResources_; + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + @java.lang.Override + public java.util.List + getMatchingResourcesList() { + return matchingResources_; + } + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + @java.lang.Override + public java.util.List + getMatchingResourcesOrBuilderList() { + return matchingResources_; + } + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + @java.lang.Override + public int getMatchingResourcesCount() { + return matchingResources_.size(); + } + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingMatchingResource getMatchingResources(int index) { + return matchingResources_.get(index); + } + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BindingMatchingResourceOrBuilder + getMatchingResourcesOrBuilder(int index) { + return matchingResources_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+   * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+   * page of results. If this field is omitted or empty, then there are no more
+   * results to 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 which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+   * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+   * page of results. If this field is omitted or empty, then there are no more
+   * results to 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; + } + } + + 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 < matchingResources_.size(); i++) { + output.writeMessage(1, matchingResources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < matchingResources_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, matchingResources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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.backupdr.v1beta.ListBindingMatchingResourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse other = + (com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) obj; + + if (!getMatchingResourcesList().equals(other.getMatchingResourcesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getMatchingResourcesCount() > 0) { + hash = (37 * hash) + MATCHING_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getMatchingResourcesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse 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.backupdr.v1beta.ListBindingMatchingResourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse 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.backupdr.v1beta.ListBindingMatchingResourcesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListBindingMatchingResourcesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response message for getting a list of `BindingMatchingResources`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.class, + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (matchingResourcesBuilder_ == null) { + matchingResources_ = java.util.Collections.emptyList(); + } else { + matchingResources_ = null; + matchingResourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BindingMatchingResourceProto + .internal_static_google_cloud_backupdr_v1beta_ListBindingMatchingResourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse build() { + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse result = + new com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse result) { + if (matchingResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + matchingResources_ = java.util.Collections.unmodifiableList(matchingResources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.matchingResources_ = matchingResources_; + } else { + result.matchingResources_ = matchingResourcesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + .getDefaultInstance()) return this; + if (matchingResourcesBuilder_ == null) { + if (!other.matchingResources_.isEmpty()) { + if (matchingResources_.isEmpty()) { + matchingResources_ = other.matchingResources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMatchingResourcesIsMutable(); + matchingResources_.addAll(other.matchingResources_); + } + onChanged(); + } + } else { + if (!other.matchingResources_.isEmpty()) { + if (matchingResourcesBuilder_.isEmpty()) { + matchingResourcesBuilder_.dispose(); + matchingResourcesBuilder_ = null; + matchingResources_ = other.matchingResources_; + bitField0_ = (bitField0_ & ~0x00000001); + matchingResourcesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMatchingResourcesFieldBuilder() + : null; + } else { + matchingResourcesBuilder_.addAllMessages(other.matchingResources_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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.backupdr.v1beta.BindingMatchingResource m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BindingMatchingResource.parser(), + extensionRegistry); + if (matchingResourcesBuilder_ == null) { + ensureMatchingResourcesIsMutable(); + matchingResources_.add(m); + } else { + matchingResourcesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List + matchingResources_ = java.util.Collections.emptyList(); + + private void ensureMatchingResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + matchingResources_ = + new java.util.ArrayList( + matchingResources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingMatchingResource, + com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder, + com.google.cloud.backupdr.v1beta.BindingMatchingResourceOrBuilder> + matchingResourcesBuilder_; + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public java.util.List + getMatchingResourcesList() { + if (matchingResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(matchingResources_); + } else { + return matchingResourcesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public int getMatchingResourcesCount() { + if (matchingResourcesBuilder_ == null) { + return matchingResources_.size(); + } else { + return matchingResourcesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BindingMatchingResource getMatchingResources( + int index) { + if (matchingResourcesBuilder_ == null) { + return matchingResources_.get(index); + } else { + return matchingResourcesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder setMatchingResources( + int index, com.google.cloud.backupdr.v1beta.BindingMatchingResource value) { + if (matchingResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingResourcesIsMutable(); + matchingResources_.set(index, value); + onChanged(); + } else { + matchingResourcesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder setMatchingResources( + int index, + com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder builderForValue) { + if (matchingResourcesBuilder_ == null) { + ensureMatchingResourcesIsMutable(); + matchingResources_.set(index, builderForValue.build()); + onChanged(); + } else { + matchingResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder addMatchingResources( + com.google.cloud.backupdr.v1beta.BindingMatchingResource value) { + if (matchingResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingResourcesIsMutable(); + matchingResources_.add(value); + onChanged(); + } else { + matchingResourcesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder addMatchingResources( + int index, com.google.cloud.backupdr.v1beta.BindingMatchingResource value) { + if (matchingResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMatchingResourcesIsMutable(); + matchingResources_.add(index, value); + onChanged(); + } else { + matchingResourcesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder addMatchingResources( + com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder builderForValue) { + if (matchingResourcesBuilder_ == null) { + ensureMatchingResourcesIsMutable(); + matchingResources_.add(builderForValue.build()); + onChanged(); + } else { + matchingResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder addMatchingResources( + int index, + com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder builderForValue) { + if (matchingResourcesBuilder_ == null) { + ensureMatchingResourcesIsMutable(); + matchingResources_.add(index, builderForValue.build()); + onChanged(); + } else { + matchingResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder addAllMatchingResources( + java.lang.Iterable + values) { + if (matchingResourcesBuilder_ == null) { + ensureMatchingResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matchingResources_); + onChanged(); + } else { + matchingResourcesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder clearMatchingResources() { + if (matchingResourcesBuilder_ == null) { + matchingResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + matchingResourcesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public Builder removeMatchingResources(int index) { + if (matchingResourcesBuilder_ == null) { + ensureMatchingResourcesIsMutable(); + matchingResources_.remove(index); + onChanged(); + } else { + matchingResourcesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder + getMatchingResourcesBuilder(int index) { + return internalGetMatchingResourcesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BindingMatchingResourceOrBuilder + getMatchingResourcesOrBuilder(int index) { + if (matchingResourcesBuilder_ == null) { + return matchingResources_.get(index); + } else { + return matchingResourcesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.backupdr.v1beta.BindingMatchingResourceOrBuilder> + getMatchingResourcesOrBuilderList() { + if (matchingResourcesBuilder_ != null) { + return matchingResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(matchingResources_); + } + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder + addMatchingResourcesBuilder() { + return internalGetMatchingResourcesFieldBuilder() + .addBuilder( + com.google.cloud.backupdr.v1beta.BindingMatchingResource.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder + addMatchingResourcesBuilder(int index) { + return internalGetMatchingResourcesFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.BindingMatchingResource.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `BindingMatchingResources` in the project,location for the
+     * specified binding.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + public java.util.List + getMatchingResourcesBuilderList() { + return internalGetMatchingResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingMatchingResource, + com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder, + com.google.cloud.backupdr.v1beta.BindingMatchingResourceOrBuilder> + internalGetMatchingResourcesFieldBuilder() { + if (matchingResourcesBuilder_ == null) { + matchingResourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BindingMatchingResource, + com.google.cloud.backupdr.v1beta.BindingMatchingResource.Builder, + com.google.cloud.backupdr.v1beta.BindingMatchingResourceOrBuilder>( + matchingResources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + matchingResources_ = null; + } + return matchingResourcesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+     * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+     * page of results. If this field is omitted or empty, then there are no more
+     * results to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+     * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+     * page of results. If this field is omitted or empty, then there are no more
+     * results to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+     * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+     * page of results. If this field is omitted or empty, then there are no more
+     * results to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+     * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+     * page of results. If this field is omitted or empty, then there are no more
+     * results to 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 which may be sent as
+     * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+     * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+     * page of results. If this field is omitted or empty, then there are no more
+     * results to 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) + private static final com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListBindingMatchingResourcesResponse 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.backupdr.v1beta.ListBindingMatchingResourcesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesResponseOrBuilder.java new file mode 100644 index 000000000000..7285f526438b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListBindingMatchingResourcesResponseOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/bindingmatchingresource.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListBindingMatchingResourcesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + java.util.List + getMatchingResourcesList(); + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + com.google.cloud.backupdr.v1beta.BindingMatchingResource getMatchingResources(int index); + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + int getMatchingResourcesCount(); + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + java.util.List + getMatchingResourcesOrBuilderList(); + + /** + * + * + *
+   * The list of `BindingMatchingResources` in the project,location for the
+   * specified binding.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BindingMatchingResource matching_resources = 1; + * + */ + com.google.cloud.backupdr.v1beta.BindingMatchingResourceOrBuilder getMatchingResourcesOrBuilder( + int index); + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+   * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+   * page of results. If this field is omitted or empty, then there are no more
+   * results to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token which may be sent as
+   * [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token]
+   * in a subsequent `ListBindingMatchingResources` call to retrieve the next
+   * page of results. If this field is omitted or empty, then there are no more
+   * results to return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesRequest.java new file mode 100644 index 000000000000..e5af9ef3f1f2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesRequest.java @@ -0,0 +1,1427 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request for the ListDataSourceReferences method.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest} + */ +@com.google.protobuf.Generated +public final class ListDataSourceReferencesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) + ListDataSourceReferencesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListDataSourceReferencesRequest"); + } + + // Use ListDataSourceReferencesRequest.newBuilder() to construct. + private ListDataSourceReferencesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDataSourceReferencesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.class, + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/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 parent resource name.
+   * Format: projects/{project}/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; + + /** + * + * + *
+   * Optional. The maximum number of DataSourceReferences to return. The service
+   * may return fewer than this value. If unspecified, at most 50
+   * DataSourceReferences will be returned. The maximum value is 100; values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDataSourceReferences`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListDataSourceReferences` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDataSourceReferences`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListDataSourceReferences` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A filter expression that filters the results listed in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering.
+   *
+   * The following field and operator combinations are supported:
+   *
+   * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+   * * data_source_gcp_resource_info.type with `=`, `!=`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A filter expression that filters the results listed in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering.
+   *
+   * The following field and operator combinations are supported:
+   *
+   * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+   * * data_source_gcp_resource_info.type with `=`, `!=`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   * * data_source
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   * * data_source
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListDataSourceReferencesRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest other = + (com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) 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.backupdr.v1beta.ListDataSourceReferencesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest 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.backupdr.v1beta.ListDataSourceReferencesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest 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.backupdr.v1beta.ListDataSourceReferencesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListDataSourceReferencesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for the ListDataSourceReferences method.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.class, + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest build() { + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest result = + new com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest.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. The parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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 parent resource name.
+     * Format: projects/{project}/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_; + + /** + * + * + *
+     * Optional. The maximum number of DataSourceReferences to return. The service
+     * may return fewer than this value. If unspecified, at most 50
+     * DataSourceReferences will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of DataSourceReferences to return. The service
+     * may return fewer than this value. If unspecified, at most 50
+     * DataSourceReferences will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of DataSourceReferences to return. The service
+     * may return fewer than this value. If unspecified, at most 50
+     * DataSourceReferences will be returned. The maximum value is 100; values
+     * above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataSourceReferences`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListDataSourceReferences` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataSourceReferences`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListDataSourceReferences` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataSourceReferences`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListDataSourceReferences` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataSourceReferences`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListDataSourceReferences` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListDataSourceReferences`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListDataSourceReferences` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. A filter expression that filters the results listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+     * * data_source_gcp_resource_info.type with `=`, `!=`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+     * * data_source_gcp_resource_info.type with `=`, `!=`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+     * * data_source_gcp_resource_info.type with `=`, `!=`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+     * * data_source_gcp_resource_info.type with `=`, `!=`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A filter expression that filters the results listed in the
+     * response. The expression must specify the field name, a comparison
+     * operator, and the value that you want to use for filtering.
+     *
+     * The following field and operator combinations are supported:
+     *
+     * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+     * * data_source_gcp_resource_info.type with `=`, `!=`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A comma-separated list of fields to order by, sorted in ascending
+     * order. Use "desc" after a field name for descending.
+     *
+     * Supported fields:
+     *
+     * * data_source
+     * * data_source_gcp_resource_info.gcp_resourcename
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) + private static final com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataSourceReferencesRequest 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.backupdr.v1beta.ListDataSourceReferencesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesRequestOrBuilder.java new file mode 100644 index 000000000000..0545fd0f9c0a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesRequestOrBuilder.java @@ -0,0 +1,190 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListDataSourceReferencesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource name.
+   * Format: projects/{project}/locations/{location}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of DataSourceReferences to return. The service
+   * may return fewer than this value. If unspecified, at most 50
+   * DataSourceReferences will be returned. The maximum value is 100; values
+   * above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDataSourceReferences`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListDataSourceReferences` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListDataSourceReferences`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListDataSourceReferences` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A filter expression that filters the results listed in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering.
+   *
+   * The following field and operator combinations are supported:
+   *
+   * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+   * * data_source_gcp_resource_info.type with `=`, `!=`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. A filter expression that filters the results listed in the
+   * response. The expression must specify the field name, a comparison
+   * operator, and the value that you want to use for filtering.
+   *
+   * The following field and operator combinations are supported:
+   *
+   * * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
+   * * data_source_gcp_resource_info.type with `=`, `!=`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   * * data_source
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. A comma-separated list of fields to order by, sorted in ascending
+   * order. Use "desc" after a field name for descending.
+   *
+   * Supported fields:
+   *
+   * * data_source
+   * * data_source_gcp_resource_info.gcp_resourcename
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesResponse.java new file mode 100644 index 000000000000..e66869327761 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesResponse.java @@ -0,0 +1,1462 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response for the ListDataSourceReferences method.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse} + */ +@com.google.protobuf.Generated +public final class ListDataSourceReferencesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) + ListDataSourceReferencesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListDataSourceReferencesResponse"); + } + + // Use ListDataSourceReferencesResponse.newBuilder() to construct. + private ListDataSourceReferencesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDataSourceReferencesResponse() { + dataSourceReferences_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.class, + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.Builder.class); + } + + public static final int DATA_SOURCE_REFERENCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + dataSourceReferences_; + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public java.util.List + getDataSourceReferencesList() { + return dataSourceReferences_; + } + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public java.util.List + getDataSourceReferencesOrBuilderList() { + return dataSourceReferences_; + } + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public int getDataSourceReferencesCount() { + return dataSourceReferences_.size(); + } + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceReference getDataSourceReferences(int index) { + return dataSourceReferences_.get(index); + } + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder + getDataSourceReferencesOrBuilder(int index) { + return dataSourceReferences_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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 < dataSourceReferences_.size(); i++) { + output.writeMessage(1, dataSourceReferences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < dataSourceReferences_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataSourceReferences_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListDataSourceReferencesResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse other = + (com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) obj; + + if (!getDataSourceReferencesList().equals(other.getDataSourceReferencesList())) 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 (getDataSourceReferencesCount() > 0) { + hash = (37 * hash) + DATA_SOURCE_REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getDataSourceReferencesList().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.backupdr.v1beta.ListDataSourceReferencesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse 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.backupdr.v1beta.ListDataSourceReferencesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse 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.backupdr.v1beta.ListDataSourceReferencesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListDataSourceReferencesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for the ListDataSourceReferences method.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.class, + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataSourceReferencesBuilder_ == null) { + dataSourceReferences_ = java.util.Collections.emptyList(); + } else { + dataSourceReferences_ = null; + dataSourceReferencesBuilder_.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.backupdr.v1beta.DataSourceReferenceProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourceReferencesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse build() { + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse result = + new com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse result) { + if (dataSourceReferencesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataSourceReferences_ = java.util.Collections.unmodifiableList(dataSourceReferences_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataSourceReferences_ = dataSourceReferences_; + } else { + result.dataSourceReferences_ = dataSourceReferencesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse.getDefaultInstance()) + return this; + if (dataSourceReferencesBuilder_ == null) { + if (!other.dataSourceReferences_.isEmpty()) { + if (dataSourceReferences_.isEmpty()) { + dataSourceReferences_ = other.dataSourceReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.addAll(other.dataSourceReferences_); + } + onChanged(); + } + } else { + if (!other.dataSourceReferences_.isEmpty()) { + if (dataSourceReferencesBuilder_.isEmpty()) { + dataSourceReferencesBuilder_.dispose(); + dataSourceReferencesBuilder_ = null; + dataSourceReferences_ = other.dataSourceReferences_; + bitField0_ = (bitField0_ & ~0x00000001); + dataSourceReferencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataSourceReferencesFieldBuilder() + : null; + } else { + dataSourceReferencesBuilder_.addAllMessages(other.dataSourceReferences_); + } + } + } + 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.backupdr.v1beta.DataSourceReference m = + input.readMessage( + com.google.cloud.backupdr.v1beta.DataSourceReference.parser(), + extensionRegistry); + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(m); + } else { + dataSourceReferencesBuilder_.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 + dataSourceReferences_ = java.util.Collections.emptyList(); + + private void ensureDataSourceReferencesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataSourceReferences_ = + new java.util.ArrayList( + dataSourceReferences_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceReference, + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder, + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder> + dataSourceReferencesBuilder_; + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public java.util.List + getDataSourceReferencesList() { + if (dataSourceReferencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataSourceReferences_); + } else { + return dataSourceReferencesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public int getDataSourceReferencesCount() { + if (dataSourceReferencesBuilder_ == null) { + return dataSourceReferences_.size(); + } else { + return dataSourceReferencesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReference getDataSourceReferences(int index) { + if (dataSourceReferencesBuilder_ == null) { + return dataSourceReferences_.get(index); + } else { + return dataSourceReferencesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder setDataSourceReferences( + int index, com.google.cloud.backupdr.v1beta.DataSourceReference value) { + if (dataSourceReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.set(index, value); + onChanged(); + } else { + dataSourceReferencesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder setDataSourceReferences( + int index, com.google.cloud.backupdr.v1beta.DataSourceReference.Builder builderForValue) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.set(index, builderForValue.build()); + onChanged(); + } else { + dataSourceReferencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addDataSourceReferences( + com.google.cloud.backupdr.v1beta.DataSourceReference value) { + if (dataSourceReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(value); + onChanged(); + } else { + dataSourceReferencesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addDataSourceReferences( + int index, com.google.cloud.backupdr.v1beta.DataSourceReference value) { + if (dataSourceReferencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(index, value); + onChanged(); + } else { + dataSourceReferencesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addDataSourceReferences( + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder builderForValue) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(builderForValue.build()); + onChanged(); + } else { + dataSourceReferencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addDataSourceReferences( + int index, com.google.cloud.backupdr.v1beta.DataSourceReference.Builder builderForValue) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.add(index, builderForValue.build()); + onChanged(); + } else { + dataSourceReferencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder addAllDataSourceReferences( + java.lang.Iterable values) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataSourceReferences_); + onChanged(); + } else { + dataSourceReferencesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder clearDataSourceReferences() { + if (dataSourceReferencesBuilder_ == null) { + dataSourceReferences_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataSourceReferencesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public Builder removeDataSourceReferences(int index) { + if (dataSourceReferencesBuilder_ == null) { + ensureDataSourceReferencesIsMutable(); + dataSourceReferences_.remove(index); + onChanged(); + } else { + dataSourceReferencesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReference.Builder + getDataSourceReferencesBuilder(int index) { + return internalGetDataSourceReferencesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder + getDataSourceReferencesOrBuilder(int index) { + if (dataSourceReferencesBuilder_ == null) { + return dataSourceReferences_.get(index); + } else { + return dataSourceReferencesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public java.util.List + getDataSourceReferencesOrBuilderList() { + if (dataSourceReferencesBuilder_ != null) { + return dataSourceReferencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataSourceReferences_); + } + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReference.Builder + addDataSourceReferencesBuilder() { + return internalGetDataSourceReferencesFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.DataSourceReference.getDefaultInstance()); + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceReference.Builder + addDataSourceReferencesBuilder(int index) { + return internalGetDataSourceReferencesFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.DataSourceReference.getDefaultInstance()); + } + + /** + * + * + *
+     * The DataSourceReferences from the specified parent.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + public java.util.List + getDataSourceReferencesBuilderList() { + return internalGetDataSourceReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceReference, + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder, + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder> + internalGetDataSourceReferencesFieldBuilder() { + if (dataSourceReferencesBuilder_ == null) { + dataSourceReferencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSourceReference, + com.google.cloud.backupdr.v1beta.DataSourceReference.Builder, + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder>( + dataSourceReferences_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataSourceReferences_ = null; + } + return dataSourceReferencesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) + private static final com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataSourceReferencesResponse 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.backupdr.v1beta.ListDataSourceReferencesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesResponseOrBuilder.java new file mode 100644 index 000000000000..1c5aeeb4c797 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourceReferencesResponseOrBuilder.java @@ -0,0 +1,173 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/datasourcereference.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListDataSourceReferencesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + java.util.List + getDataSourceReferencesList(); + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + com.google.cloud.backupdr.v1beta.DataSourceReference getDataSourceReferences(int index); + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + int getDataSourceReferencesCount(); + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + java.util.List + getDataSourceReferencesOrBuilderList(); + + /** + * + * + *
+   * The DataSourceReferences from the specified parent.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSourceReference data_source_references = 1; + * + */ + com.google.cloud.backupdr.v1beta.DataSourceReferenceOrBuilder getDataSourceReferencesOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesRequest.java new file mode 100644 index 000000000000..b03317e98910 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesRequest.java @@ -0,0 +1,1321 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for listing DataSources.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListDataSourcesRequest} + */ +@com.google.protobuf.Generated +public final class ListDataSourcesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListDataSourcesRequest) + ListDataSourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListDataSourcesRequest"); + } + + // Use ListDataSourcesRequest.newBuilder() to construct. + private ListDataSourcesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDataSourcesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest.class, + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve data
+   * sources information, in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+   * DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * To retrieve data sources for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * 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 project and location for which to retrieve data
+   * sources information, in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+   * DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * To retrieve data sources for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListDataSourcesRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest other = + (com.google.cloud.backupdr.v1beta.ListDataSourcesRequest) 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.backupdr.v1beta.ListDataSourcesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest 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.backupdr.v1beta.ListDataSourcesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest 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.backupdr.v1beta.ListDataSourcesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListDataSourcesRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing DataSources.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListDataSourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListDataSourcesRequest) + com.google.cloud.backupdr.v1beta.ListDataSourcesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest.class, + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListDataSourcesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourcesRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListDataSourcesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourcesRequest build() { + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourcesRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListDataSourcesRequest result = + new com.google.cloud.backupdr.v1beta.ListDataSourcesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ListDataSourcesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListDataSourcesRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListDataSourcesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListDataSourcesRequest other) { + if (other == com.google.cloud.backupdr.v1beta.ListDataSourcesRequest.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. The project and location for which to retrieve data
+     * sources information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve data
+     * sources information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve data
+     * sources information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve data
+     * sources information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve data
+     * sources information, in the format
+     * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+     * DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * To retrieve data sources for all locations, use "-" for the
+     * '{location}' value.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListDataSourcesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListDataSourcesRequest) + private static final com.google.cloud.backupdr.v1beta.ListDataSourcesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListDataSourcesRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataSourcesRequest 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.backupdr.v1beta.ListDataSourcesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesRequestOrBuilder.java new file mode 100644 index 000000000000..27ba2cc9abb3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesRequestOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListDataSourcesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListDataSourcesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve data
+   * sources information, in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+   * DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * To retrieve data sources for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve data
+   * sources information, in the format
+   * 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and
+   * DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * To retrieve data sources for all locations, use "-" for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesResponse.java new file mode 100644 index 000000000000..230104dba2f1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesResponse.java @@ -0,0 +1,1565 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for listing DataSources.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListDataSourcesResponse} + */ +@com.google.protobuf.Generated +public final class ListDataSourcesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListDataSourcesResponse) + ListDataSourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListDataSourcesResponse"); + } + + // Use ListDataSourcesResponse.newBuilder() to construct. + private ListDataSourcesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDataSourcesResponse() { + dataSources_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse.class, + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse.Builder.class); + } + + public static final int DATA_SOURCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataSources_; + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + @java.lang.Override + public java.util.List getDataSourcesList() { + return dataSources_; + } + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + @java.lang.Override + public java.util.List + getDataSourcesOrBuilderList() { + return dataSources_; + } + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + @java.lang.Override + public int getDataSourcesCount() { + return dataSources_.size(); + } + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSource getDataSources(int index) { + return dataSources_.get(index); + } + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceOrBuilder getDataSourcesOrBuilder(int index) { + return dataSources_.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 < dataSources_.size(); i++) { + output.writeMessage(1, dataSources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < dataSources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataSources_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListDataSourcesResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse other = + (com.google.cloud.backupdr.v1beta.ListDataSourcesResponse) obj; + + if (!getDataSourcesList().equals(other.getDataSourcesList())) 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 (getDataSourcesCount() > 0) { + hash = (37 * hash) + DATA_SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getDataSourcesList().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.backupdr.v1beta.ListDataSourcesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse 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.backupdr.v1beta.ListDataSourcesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse 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.backupdr.v1beta.ListDataSourcesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListDataSourcesResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for listing DataSources.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListDataSourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListDataSourcesResponse) + com.google.cloud.backupdr.v1beta.ListDataSourcesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse.class, + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListDataSourcesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataSourcesBuilder_ == null) { + dataSources_ = java.util.Collections.emptyList(); + } else { + dataSources_ = null; + dataSourcesBuilder_.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.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ListDataSourcesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourcesResponse getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListDataSourcesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourcesResponse build() { + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListDataSourcesResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse result = + new com.google.cloud.backupdr.v1beta.ListDataSourcesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListDataSourcesResponse result) { + if (dataSourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataSources_ = java.util.Collections.unmodifiableList(dataSources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataSources_ = dataSources_; + } else { + result.dataSources_ = dataSourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ListDataSourcesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListDataSourcesResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListDataSourcesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListDataSourcesResponse other) { + if (other == com.google.cloud.backupdr.v1beta.ListDataSourcesResponse.getDefaultInstance()) + return this; + if (dataSourcesBuilder_ == null) { + if (!other.dataSources_.isEmpty()) { + if (dataSources_.isEmpty()) { + dataSources_ = other.dataSources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataSourcesIsMutable(); + dataSources_.addAll(other.dataSources_); + } + onChanged(); + } + } else { + if (!other.dataSources_.isEmpty()) { + if (dataSourcesBuilder_.isEmpty()) { + dataSourcesBuilder_.dispose(); + dataSourcesBuilder_ = null; + dataSources_ = other.dataSources_; + bitField0_ = (bitField0_ & ~0x00000001); + dataSourcesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataSourcesFieldBuilder() + : null; + } else { + dataSourcesBuilder_.addAllMessages(other.dataSources_); + } + } + } + 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.backupdr.v1beta.DataSource m = + input.readMessage( + com.google.cloud.backupdr.v1beta.DataSource.parser(), extensionRegistry); + if (dataSourcesBuilder_ == null) { + ensureDataSourcesIsMutable(); + dataSources_.add(m); + } else { + dataSourcesBuilder_.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 dataSources_ = + java.util.Collections.emptyList(); + + private void ensureDataSourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataSources_ = + new java.util.ArrayList(dataSources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSource, + com.google.cloud.backupdr.v1beta.DataSource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder> + dataSourcesBuilder_; + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public java.util.List getDataSourcesList() { + if (dataSourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataSources_); + } else { + return dataSourcesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public int getDataSourcesCount() { + if (dataSourcesBuilder_ == null) { + return dataSources_.size(); + } else { + return dataSourcesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public com.google.cloud.backupdr.v1beta.DataSource getDataSources(int index) { + if (dataSourcesBuilder_ == null) { + return dataSources_.get(index); + } else { + return dataSourcesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder setDataSources(int index, com.google.cloud.backupdr.v1beta.DataSource value) { + if (dataSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourcesIsMutable(); + dataSources_.set(index, value); + onChanged(); + } else { + dataSourcesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder setDataSources( + int index, com.google.cloud.backupdr.v1beta.DataSource.Builder builderForValue) { + if (dataSourcesBuilder_ == null) { + ensureDataSourcesIsMutable(); + dataSources_.set(index, builderForValue.build()); + onChanged(); + } else { + dataSourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder addDataSources(com.google.cloud.backupdr.v1beta.DataSource value) { + if (dataSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourcesIsMutable(); + dataSources_.add(value); + onChanged(); + } else { + dataSourcesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder addDataSources(int index, com.google.cloud.backupdr.v1beta.DataSource value) { + if (dataSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataSourcesIsMutable(); + dataSources_.add(index, value); + onChanged(); + } else { + dataSourcesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder addDataSources( + com.google.cloud.backupdr.v1beta.DataSource.Builder builderForValue) { + if (dataSourcesBuilder_ == null) { + ensureDataSourcesIsMutable(); + dataSources_.add(builderForValue.build()); + onChanged(); + } else { + dataSourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder addDataSources( + int index, com.google.cloud.backupdr.v1beta.DataSource.Builder builderForValue) { + if (dataSourcesBuilder_ == null) { + ensureDataSourcesIsMutable(); + dataSources_.add(index, builderForValue.build()); + onChanged(); + } else { + dataSourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder addAllDataSources( + java.lang.Iterable values) { + if (dataSourcesBuilder_ == null) { + ensureDataSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataSources_); + onChanged(); + } else { + dataSourcesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder clearDataSources() { + if (dataSourcesBuilder_ == null) { + dataSources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataSourcesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public Builder removeDataSources(int index) { + if (dataSourcesBuilder_ == null) { + ensureDataSourcesIsMutable(); + dataSources_.remove(index); + onChanged(); + } else { + dataSourcesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public com.google.cloud.backupdr.v1beta.DataSource.Builder getDataSourcesBuilder(int index) { + return internalGetDataSourcesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public com.google.cloud.backupdr.v1beta.DataSourceOrBuilder getDataSourcesOrBuilder(int index) { + if (dataSourcesBuilder_ == null) { + return dataSources_.get(index); + } else { + return dataSourcesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public java.util.List + getDataSourcesOrBuilderList() { + if (dataSourcesBuilder_ != null) { + return dataSourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataSources_); + } + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public com.google.cloud.backupdr.v1beta.DataSource.Builder addDataSourcesBuilder() { + return internalGetDataSourcesFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public com.google.cloud.backupdr.v1beta.DataSource.Builder addDataSourcesBuilder(int index) { + return internalGetDataSourcesFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of DataSource instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return data sources in reachable locations
+     * and the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + public java.util.List + getDataSourcesBuilderList() { + return internalGetDataSourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSource, + com.google.cloud.backupdr.v1beta.DataSource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder> + internalGetDataSourcesFieldBuilder() { + if (dataSourcesBuilder_ == null) { + dataSourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSource, + com.google.cloud.backupdr.v1beta.DataSource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder>( + dataSources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataSources_ = null; + } + return dataSourcesBuilder_; + } + + 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListDataSourcesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListDataSourcesResponse) + private static final com.google.cloud.backupdr.v1beta.ListDataSourcesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListDataSourcesResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListDataSourcesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataSourcesResponse 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.backupdr.v1beta.ListDataSourcesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesResponseOrBuilder.java new file mode 100644 index 000000000000..b1a063253595 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListDataSourcesResponseOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListDataSourcesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListDataSourcesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + java.util.List getDataSourcesList(); + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + com.google.cloud.backupdr.v1beta.DataSource getDataSources(int index); + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + int getDataSourcesCount(); + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + java.util.List + getDataSourcesOrBuilderList(); + + /** + * + * + *
+   * The list of DataSource instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return data sources in reachable locations
+   * and the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.DataSource data_sources = 1; + */ + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder getDataSourcesOrBuilder(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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersRequest.java new file mode 100644 index 000000000000..676ca16a8be9 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersRequest.java @@ -0,0 +1,1402 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for listing management servers.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListManagementServersRequest} + */ +@com.google.protobuf.Generated +public final class ListManagementServersRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListManagementServersRequest) + ListManagementServersRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListManagementServersRequest"); + } + + // Use ListManagementServersRequest.newBuilder() to construct. + private ListManagementServersRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListManagementServersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest.class, + com.google.cloud.backupdr.v1beta.ListManagementServersRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve management servers
+   * information, in the format 'projects/{project_id}/locations/{location}'.
+   * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**. To retrieve management servers for all locations, use "-"
+   * for the
+   * '{location}' value.
+   * 
+ * + * + * 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 project and location for which to retrieve management servers
+   * information, in the format 'projects/{project_id}/locations/{location}'.
+   * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**. To retrieve management servers for all locations, use "-"
+   * for the
+   * '{location}' value.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the orderBy field is set. + */ + @java.lang.Override + public boolean hasOrderBy() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListManagementServersRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListManagementServersRequest other = + (com.google.cloud.backupdr.v1beta.ListManagementServersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter().equals(other.getFilter())) return false; + } + if (hasOrderBy() != other.hasOrderBy()) return false; + if (hasOrderBy()) { + 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(); + if (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + if (hasOrderBy()) { + 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.backupdr.v1beta.ListManagementServersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest 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.backupdr.v1beta.ListManagementServersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest 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.backupdr.v1beta.ListManagementServersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListManagementServersRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for listing management servers.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListManagementServersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListManagementServersRequest) + com.google.cloud.backupdr.v1beta.ListManagementServersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest.class, + com.google.cloud.backupdr.v1beta.ListManagementServersRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListManagementServersRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListManagementServersRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListManagementServersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListManagementServersRequest build() { + com.google.cloud.backupdr.v1beta.ListManagementServersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListManagementServersRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListManagementServersRequest result = + new com.google.cloud.backupdr.v1beta.ListManagementServersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListManagementServersRequest 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_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListManagementServersRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListManagementServersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListManagementServersRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListManagementServersRequest.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.hasFilter()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasOrderBy()) { + 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. The project and location for which to retrieve management servers
+     * information, in the format 'projects/{project_id}/locations/{location}'.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**. To retrieve management servers for all locations, use "-"
+     * for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve management servers
+     * information, in the format 'projects/{project_id}/locations/{location}'.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**. To retrieve management servers for all locations, use "-"
+     * for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve management servers
+     * information, in the format 'projects/{project_id}/locations/{location}'.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**. To retrieve management servers for all locations, use "-"
+     * for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve management servers
+     * information, in the format 'projects/{project_id}/locations/{location}'.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**. To retrieve management servers for all locations, use "-"
+     * for the
+     * '{location}' value.
+     * 
+ * + * + * 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 project and location for which to retrieve management servers
+     * information, in the format 'projects/{project_id}/locations/{location}'.
+     * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+     * example
+     * **us-central1**. To retrieve management servers for all locations, use "-"
+     * for the
+     * '{location}' value.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the orderBy field is set. + */ + public boolean hasOrderBy() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListManagementServersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListManagementServersRequest) + private static final com.google.cloud.backupdr.v1beta.ListManagementServersRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListManagementServersRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListManagementServersRequest 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.backupdr.v1beta.ListManagementServersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersRequestOrBuilder.java new file mode 100644 index 000000000000..6be50c303a95 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersRequestOrBuilder.java @@ -0,0 +1,188 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListManagementServersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListManagementServersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve management servers
+   * information, in the format 'projects/{project_id}/locations/{location}'.
+   * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**. To retrieve management servers for all locations, use "-"
+   * for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve management servers
+   * information, in the format 'projects/{project_id}/locations/{location}'.
+   * In Google Cloud Backup and DR, locations map to Google Cloud regions, for
+   * example
+   * **us-central1**. To retrieve management servers for all locations, use "-"
+   * for the
+   * '{location}' value.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the filter field is set. + */ + boolean hasFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * optional string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the orderBy field is set. + */ + boolean hasOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * optional string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersResponse.java new file mode 100644 index 000000000000..1a2ede006d95 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersResponse.java @@ -0,0 +1,1586 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for listing management servers.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListManagementServersResponse} + */ +@com.google.protobuf.Generated +public final class ListManagementServersResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListManagementServersResponse) + ListManagementServersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListManagementServersResponse"); + } + + // Use ListManagementServersResponse.newBuilder() to construct. + private ListManagementServersResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListManagementServersResponse() { + managementServers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListManagementServersResponse.class, + com.google.cloud.backupdr.v1beta.ListManagementServersResponse.Builder.class); + } + + public static final int MANAGEMENT_SERVERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List managementServers_; + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + @java.lang.Override + public java.util.List + getManagementServersList() { + return managementServers_; + } + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + @java.lang.Override + public java.util.List + getManagementServersOrBuilderList() { + return managementServers_; + } + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + @java.lang.Override + public int getManagementServersCount() { + return managementServers_.size(); + } + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer getManagementServers(int index) { + return managementServers_.get(index); + } + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder getManagementServersOrBuilder( + int index) { + return managementServers_.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 < managementServers_.size(); i++) { + output.writeMessage(1, managementServers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < managementServers_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, managementServers_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListManagementServersResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListManagementServersResponse other = + (com.google.cloud.backupdr.v1beta.ListManagementServersResponse) obj; + + if (!getManagementServersList().equals(other.getManagementServersList())) 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 (getManagementServersCount() > 0) { + hash = (37 * hash) + MANAGEMENT_SERVERS_FIELD_NUMBER; + hash = (53 * hash) + getManagementServersList().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.backupdr.v1beta.ListManagementServersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse 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.backupdr.v1beta.ListManagementServersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse 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.backupdr.v1beta.ListManagementServersResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListManagementServersResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for listing management servers.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListManagementServersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListManagementServersResponse) + com.google.cloud.backupdr.v1beta.ListManagementServersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListManagementServersResponse.class, + com.google.cloud.backupdr.v1beta.ListManagementServersResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ListManagementServersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (managementServersBuilder_ == null) { + managementServers_ = java.util.Collections.emptyList(); + } else { + managementServers_ = null; + managementServersBuilder_.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.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ListManagementServersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListManagementServersResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListManagementServersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListManagementServersResponse build() { + com.google.cloud.backupdr.v1beta.ListManagementServersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListManagementServersResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListManagementServersResponse result = + new com.google.cloud.backupdr.v1beta.ListManagementServersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListManagementServersResponse result) { + if (managementServersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + managementServers_ = java.util.Collections.unmodifiableList(managementServers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.managementServers_ = managementServers_; + } else { + result.managementServers_ = managementServersBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListManagementServersResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListManagementServersResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListManagementServersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ListManagementServersResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListManagementServersResponse.getDefaultInstance()) + return this; + if (managementServersBuilder_ == null) { + if (!other.managementServers_.isEmpty()) { + if (managementServers_.isEmpty()) { + managementServers_ = other.managementServers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureManagementServersIsMutable(); + managementServers_.addAll(other.managementServers_); + } + onChanged(); + } + } else { + if (!other.managementServers_.isEmpty()) { + if (managementServersBuilder_.isEmpty()) { + managementServersBuilder_.dispose(); + managementServersBuilder_ = null; + managementServers_ = other.managementServers_; + bitField0_ = (bitField0_ & ~0x00000001); + managementServersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetManagementServersFieldBuilder() + : null; + } else { + managementServersBuilder_.addAllMessages(other.managementServers_); + } + } + } + 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.backupdr.v1beta.ManagementServer m = + input.readMessage( + com.google.cloud.backupdr.v1beta.ManagementServer.parser(), + extensionRegistry); + if (managementServersBuilder_ == null) { + ensureManagementServersIsMutable(); + managementServers_.add(m); + } else { + managementServersBuilder_.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 managementServers_ = + java.util.Collections.emptyList(); + + private void ensureManagementServersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + managementServers_ = + new java.util.ArrayList( + managementServers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementServer, + com.google.cloud.backupdr.v1beta.ManagementServer.Builder, + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder> + managementServersBuilder_; + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public java.util.List + getManagementServersList() { + if (managementServersBuilder_ == null) { + return java.util.Collections.unmodifiableList(managementServers_); + } else { + return managementServersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public int getManagementServersCount() { + if (managementServersBuilder_ == null) { + return managementServers_.size(); + } else { + return managementServersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public com.google.cloud.backupdr.v1beta.ManagementServer getManagementServers(int index) { + if (managementServersBuilder_ == null) { + return managementServers_.get(index); + } else { + return managementServersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder setManagementServers( + int index, com.google.cloud.backupdr.v1beta.ManagementServer value) { + if (managementServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureManagementServersIsMutable(); + managementServers_.set(index, value); + onChanged(); + } else { + managementServersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder setManagementServers( + int index, com.google.cloud.backupdr.v1beta.ManagementServer.Builder builderForValue) { + if (managementServersBuilder_ == null) { + ensureManagementServersIsMutable(); + managementServers_.set(index, builderForValue.build()); + onChanged(); + } else { + managementServersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder addManagementServers(com.google.cloud.backupdr.v1beta.ManagementServer value) { + if (managementServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureManagementServersIsMutable(); + managementServers_.add(value); + onChanged(); + } else { + managementServersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder addManagementServers( + int index, com.google.cloud.backupdr.v1beta.ManagementServer value) { + if (managementServersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureManagementServersIsMutable(); + managementServers_.add(index, value); + onChanged(); + } else { + managementServersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder addManagementServers( + com.google.cloud.backupdr.v1beta.ManagementServer.Builder builderForValue) { + if (managementServersBuilder_ == null) { + ensureManagementServersIsMutable(); + managementServers_.add(builderForValue.build()); + onChanged(); + } else { + managementServersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder addManagementServers( + int index, com.google.cloud.backupdr.v1beta.ManagementServer.Builder builderForValue) { + if (managementServersBuilder_ == null) { + ensureManagementServersIsMutable(); + managementServers_.add(index, builderForValue.build()); + onChanged(); + } else { + managementServersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder addAllManagementServers( + java.lang.Iterable values) { + if (managementServersBuilder_ == null) { + ensureManagementServersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, managementServers_); + onChanged(); + } else { + managementServersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder clearManagementServers() { + if (managementServersBuilder_ == null) { + managementServers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + managementServersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public Builder removeManagementServers(int index) { + if (managementServersBuilder_ == null) { + ensureManagementServersIsMutable(); + managementServers_.remove(index); + onChanged(); + } else { + managementServersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public com.google.cloud.backupdr.v1beta.ManagementServer.Builder getManagementServersBuilder( + int index) { + return internalGetManagementServersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder getManagementServersOrBuilder( + int index) { + if (managementServersBuilder_ == null) { + return managementServers_.get(index); + } else { + return managementServersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public java.util.List + getManagementServersOrBuilderList() { + if (managementServersBuilder_ != null) { + return managementServersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(managementServers_); + } + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public com.google.cloud.backupdr.v1beta.ManagementServer.Builder addManagementServersBuilder() { + return internalGetManagementServersFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public com.google.cloud.backupdr.v1beta.ManagementServer.Builder addManagementServersBuilder( + int index) { + return internalGetManagementServersFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of ManagementServer instances in the project for the specified
+     * location.
+     *
+     * If the '{location}' value in the request is "-", the response contains a
+     * list of instances from all locations. In case any location is unreachable,
+     * the response will only return management servers in reachable locations and
+     * the 'unreachable' field will be populated with a list of unreachable
+     * locations.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + public java.util.List + getManagementServersBuilderList() { + return internalGetManagementServersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementServer, + com.google.cloud.backupdr.v1beta.ManagementServer.Builder, + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder> + internalGetManagementServersFieldBuilder() { + if (managementServersBuilder_ == null) { + managementServersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementServer, + com.google.cloud.backupdr.v1beta.ManagementServer.Builder, + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder>( + managementServers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + managementServers_ = null; + } + return managementServersBuilder_; + } + + 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListManagementServersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListManagementServersResponse) + private static final com.google.cloud.backupdr.v1beta.ListManagementServersResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListManagementServersResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListManagementServersResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListManagementServersResponse 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.backupdr.v1beta.ListManagementServersResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersResponseOrBuilder.java new file mode 100644 index 000000000000..a5ca20f291d1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListManagementServersResponseOrBuilder.java @@ -0,0 +1,200 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListManagementServersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListManagementServersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + java.util.List getManagementServersList(); + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + com.google.cloud.backupdr.v1beta.ManagementServer getManagementServers(int index); + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + int getManagementServersCount(); + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + java.util.List + getManagementServersOrBuilderList(); + + /** + * + * + *
+   * The list of ManagementServer instances in the project for the specified
+   * location.
+   *
+   * If the '{location}' value in the request is "-", the response contains a
+   * list of instances from all locations. In case any location is unreachable,
+   * the response will only return management servers in reachable locations and
+   * the 'unreachable' field will be populated with a list of unreachable
+   * locations.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ManagementServer management_servers = 1; + */ + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder getManagementServersOrBuilder( + 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-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsRequest.java new file mode 100644 index 000000000000..9821741b98b3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsRequest.java @@ -0,0 +1,1314 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request for ListResourceBackupConfigs.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest} + */ +@com.google.protobuf.Generated +public final class ListResourceBackupConfigsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) + ListResourceBackupConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListResourceBackupConfigsRequest"); + } + + // Use ListResourceBackupConfigsRequest.newBuilder() to construct. + private ListResourceBackupConfigsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListResourceBackupConfigsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.class, + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location for which to retrieve resource backup
+   * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+   * Cloud Backup and DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * 
+ * + * + * 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 project and location for which to retrieve resource backup
+   * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+   * Cloud Backup and DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will use 100 as default. Maximum value is
+   * 500 and values above 500 will be coerced to 500.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListResourceBackupConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest other = + (com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) 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.backupdr.v1beta.ListResourceBackupConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest 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.backupdr.v1beta.ListResourceBackupConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest 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.backupdr.v1beta.ListResourceBackupConfigsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListResourceBackupConfigsRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for ListResourceBackupConfigs.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.class, + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest build() { + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest buildPartial() { + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest result = + new com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest.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. The project and location for which to retrieve resource backup
+     * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * 
+ * + * + * 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 project and location for which to retrieve resource backup
+     * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * 
+ * + * + * 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 project and location for which to retrieve resource backup
+     * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * 
+ * + * + * 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 project and location for which to retrieve resource backup
+     * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * 
+ * + * + * 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 project and location for which to retrieve resource backup
+     * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+     * Cloud Backup and DR, locations map to Google Cloud regions, for example
+     * **us-central1**.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will use 100 as default. Maximum value is
+     * 500 and values above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will use 100 as default. Maximum value is
+     * 500 and values above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will use 100 as default. Maximum value is
+     * 500 and values above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) + private static final com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest(); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListResourceBackupConfigsRequest 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.backupdr.v1beta.ListResourceBackupConfigsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsRequestOrBuilder.java new file mode 100644 index 000000000000..49aa22087c5c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsRequestOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListResourceBackupConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location for which to retrieve resource backup
+   * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+   * Cloud Backup and DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location for which to retrieve resource backup
+   * configs. Format: 'projects/{project_id}/locations/{location}'. In Google
+   * Cloud Backup and DR, locations map to Google Cloud regions, for example
+   * **us-central1**.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will use 100 as default. Maximum value is
+   * 500 and values above 500 will be coerced to 500.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsResponse.java new file mode 100644 index 000000000000..5b3a4300df18 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsResponse.java @@ -0,0 +1,1188 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response for ListResourceBackupConfigs.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse} + */ +@com.google.protobuf.Generated +public final class ListResourceBackupConfigsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) + ListResourceBackupConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListResourceBackupConfigsResponse"); + } + + // Use ListResourceBackupConfigsResponse.newBuilder() to construct. + private ListResourceBackupConfigsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListResourceBackupConfigsResponse() { + resourceBackupConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.class, + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.Builder.class); + } + + public static final int RESOURCE_BACKUP_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + resourceBackupConfigs_; + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getResourceBackupConfigsList() { + return resourceBackupConfigs_; + } + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getResourceBackupConfigsOrBuilderList() { + return resourceBackupConfigs_; + } + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + @java.lang.Override + public int getResourceBackupConfigsCount() { + return resourceBackupConfigs_.size(); + } + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig getResourceBackupConfigs(int index) { + return resourceBackupConfigs_.get(index); + } + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ResourceBackupConfigOrBuilder + getResourceBackupConfigsOrBuilder(int index) { + return resourceBackupConfigs_.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; + } + } + + 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 < resourceBackupConfigs_.size(); i++) { + output.writeMessage(1, resourceBackupConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resourceBackupConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, resourceBackupConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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.backupdr.v1beta.ListResourceBackupConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse other = + (com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) obj; + + if (!getResourceBackupConfigsList().equals(other.getResourceBackupConfigsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getResourceBackupConfigsCount() > 0) { + hash = (37 * hash) + RESOURCE_BACKUP_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getResourceBackupConfigsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse 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.backupdr.v1beta.ListResourceBackupConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse 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.backupdr.v1beta.ListResourceBackupConfigsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ListResourceBackupConfigsResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for ListResourceBackupConfigs.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.class, + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (resourceBackupConfigsBuilder_ == null) { + resourceBackupConfigs_ = java.util.Collections.emptyList(); + } else { + resourceBackupConfigs_ = null; + resourceBackupConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse build() { + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse buildPartial() { + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse result = + new com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse result) { + if (resourceBackupConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resourceBackupConfigs_ = java.util.Collections.unmodifiableList(resourceBackupConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceBackupConfigs_ = resourceBackupConfigs_; + } else { + result.resourceBackupConfigs_ = resourceBackupConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse other) { + if (other + == com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + .getDefaultInstance()) return this; + if (resourceBackupConfigsBuilder_ == null) { + if (!other.resourceBackupConfigs_.isEmpty()) { + if (resourceBackupConfigs_.isEmpty()) { + resourceBackupConfigs_ = other.resourceBackupConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.addAll(other.resourceBackupConfigs_); + } + onChanged(); + } + } else { + if (!other.resourceBackupConfigs_.isEmpty()) { + if (resourceBackupConfigsBuilder_.isEmpty()) { + resourceBackupConfigsBuilder_.dispose(); + resourceBackupConfigsBuilder_ = null; + resourceBackupConfigs_ = other.resourceBackupConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + resourceBackupConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetResourceBackupConfigsFieldBuilder() + : null; + } else { + resourceBackupConfigsBuilder_.addAllMessages(other.resourceBackupConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + 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.backupdr.v1beta.ResourceBackupConfig m = + input.readMessage( + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.parser(), + extensionRegistry); + if (resourceBackupConfigsBuilder_ == null) { + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.add(m); + } else { + resourceBackupConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + 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 java.util.List + resourceBackupConfigs_ = java.util.Collections.emptyList(); + + private void ensureResourceBackupConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceBackupConfigs_ = + new java.util.ArrayList( + resourceBackupConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ResourceBackupConfig, + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.ResourceBackupConfigOrBuilder> + resourceBackupConfigsBuilder_; + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public java.util.List + getResourceBackupConfigsList() { + if (resourceBackupConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceBackupConfigs_); + } else { + return resourceBackupConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public int getResourceBackupConfigsCount() { + if (resourceBackupConfigsBuilder_ == null) { + return resourceBackupConfigs_.size(); + } else { + return resourceBackupConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig getResourceBackupConfigs( + int index) { + if (resourceBackupConfigsBuilder_ == null) { + return resourceBackupConfigs_.get(index); + } else { + return resourceBackupConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder setResourceBackupConfigs( + int index, com.google.cloud.backupdr.v1beta.ResourceBackupConfig value) { + if (resourceBackupConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.set(index, value); + onChanged(); + } else { + resourceBackupConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder setResourceBackupConfigs( + int index, com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder builderForValue) { + if (resourceBackupConfigsBuilder_ == null) { + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceBackupConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder addResourceBackupConfigs( + com.google.cloud.backupdr.v1beta.ResourceBackupConfig value) { + if (resourceBackupConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.add(value); + onChanged(); + } else { + resourceBackupConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder addResourceBackupConfigs( + int index, com.google.cloud.backupdr.v1beta.ResourceBackupConfig value) { + if (resourceBackupConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.add(index, value); + onChanged(); + } else { + resourceBackupConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder addResourceBackupConfigs( + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder builderForValue) { + if (resourceBackupConfigsBuilder_ == null) { + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.add(builderForValue.build()); + onChanged(); + } else { + resourceBackupConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder addResourceBackupConfigs( + int index, com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder builderForValue) { + if (resourceBackupConfigsBuilder_ == null) { + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceBackupConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder addAllResourceBackupConfigs( + java.lang.Iterable + values) { + if (resourceBackupConfigsBuilder_ == null) { + ensureResourceBackupConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceBackupConfigs_); + onChanged(); + } else { + resourceBackupConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder clearResourceBackupConfigs() { + if (resourceBackupConfigsBuilder_ == null) { + resourceBackupConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourceBackupConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public Builder removeResourceBackupConfigs(int index) { + if (resourceBackupConfigsBuilder_ == null) { + ensureResourceBackupConfigsIsMutable(); + resourceBackupConfigs_.remove(index); + onChanged(); + } else { + resourceBackupConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder + getResourceBackupConfigsBuilder(int index) { + return internalGetResourceBackupConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public com.google.cloud.backupdr.v1beta.ResourceBackupConfigOrBuilder + getResourceBackupConfigsOrBuilder(int index) { + if (resourceBackupConfigsBuilder_ == null) { + return resourceBackupConfigs_.get(index); + } else { + return resourceBackupConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public java.util.List + getResourceBackupConfigsOrBuilderList() { + if (resourceBackupConfigsBuilder_ != null) { + return resourceBackupConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceBackupConfigs_); + } + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder + addResourceBackupConfigsBuilder() { + return internalGetResourceBackupConfigsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.ResourceBackupConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder + addResourceBackupConfigsBuilder(int index) { + return internalGetResourceBackupConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.ResourceBackupConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of ResourceBackupConfigs for the specified scope.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + public java.util.List + getResourceBackupConfigsBuilderList() { + return internalGetResourceBackupConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ResourceBackupConfig, + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.ResourceBackupConfigOrBuilder> + internalGetResourceBackupConfigsFieldBuilder() { + if (resourceBackupConfigsBuilder_ == null) { + resourceBackupConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.ResourceBackupConfig, + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder, + com.google.cloud.backupdr.v1beta.ResourceBackupConfigOrBuilder>( + resourceBackupConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + resourceBackupConfigs_ = null; + } + return resourceBackupConfigsBuilder_; + } + + 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) + private static final com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse(); + } + + public static com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListResourceBackupConfigsResponse 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.backupdr.v1beta.ListResourceBackupConfigsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsResponseOrBuilder.java new file mode 100644 index 000000000000..d7099e0fb45d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ListResourceBackupConfigsResponseOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ListResourceBackupConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + java.util.List + getResourceBackupConfigsList(); + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + com.google.cloud.backupdr.v1beta.ResourceBackupConfig getResourceBackupConfigs(int index); + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + int getResourceBackupConfigsCount(); + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + java.util.List + getResourceBackupConfigsOrBuilderList(); + + /** + * + * + *
+   * The list of ResourceBackupConfigs for the specified scope.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.ResourceBackupConfig resource_backup_configs = 1; + * + */ + com.google.cloud.backupdr.v1beta.ResourceBackupConfigOrBuilder getResourceBackupConfigsOrBuilder( + 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(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/LocationName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/LocationName.java new file mode 100644 index 000000000000..a01a3853aa90 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/LocationName.java @@ -0,0 +1,195 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static @Nullable LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + 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<@Nullable LocationName> values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.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); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServer.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServer.java new file mode 100644 index 000000000000..f293d20269ad --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServer.java @@ -0,0 +1,5308 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ManagementServer describes a single BackupDR ManagementServer instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ManagementServer} + */ +@com.google.protobuf.Generated +public final class ManagementServer extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ManagementServer) + ManagementServerOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ManagementServer"); + } + + // Use ManagementServer.newBuilder() to construct. + private ManagementServer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ManagementServer() { + name_ = ""; + description_ = ""; + type_ = 0; + state_ = 0; + networks_ = java.util.Collections.emptyList(); + etag_ = ""; + oauth2ClientId_ = ""; + baProxyUri_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementServer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ManagementServer.class, + com.google.cloud.backupdr.v1beta.ManagementServer.Builder.class); + } + + /** + * + * + *
+   * Type of backup service resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.ManagementServer.InstanceType} + */ + public enum InstanceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Instance type is not mentioned.
+     * 
+ * + * INSTANCE_TYPE_UNSPECIFIED = 0; + */ + INSTANCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Instance for backup and restore management (i.e., AGM).
+     * 
+ * + * BACKUP_RESTORE = 1; + */ + BACKUP_RESTORE(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InstanceType"); + } + + /** + * + * + *
+     * Instance type is not mentioned.
+     * 
+ * + * INSTANCE_TYPE_UNSPECIFIED = 0; + */ + public static final int INSTANCE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Instance for backup and restore management (i.e., AGM).
+     * 
+ * + * BACKUP_RESTORE = 1; + */ + public static final int BACKUP_RESTORE_VALUE = 1; + + 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 InstanceType 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 InstanceType forNumber(int value) { + switch (value) { + case 0: + return INSTANCE_TYPE_UNSPECIFIED; + case 1: + return BACKUP_RESTORE; + 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 InstanceType findValueByNumber(int number) { + return InstanceType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ManagementServer.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final InstanceType[] VALUES = values(); + + public static InstanceType 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 InstanceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.ManagementServer.InstanceType) + } + + /** + * + * + *
+   * State of Management server instance.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.ManagementServer.InstanceState} + */ + public enum InstanceState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * INSTANCE_STATE_UNSPECIFIED = 0; + */ + INSTANCE_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The instance is being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The instance has been created and is fully usable.
+     * 
+ * + * READY = 2; + */ + READY(2), + /** + * + * + *
+     * The instance configuration is being updated. Certain kinds of updates
+     * may cause the instance to become unusable while the update is in
+     * progress.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + * + * + *
+     * The instance is being deleted.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + * + * + *
+     * The instance is being repaired and may be unstable.
+     * 
+ * + * REPAIRING = 5; + */ + REPAIRING(5), + /** + * + * + *
+     * Maintenance is being performed on this instance.
+     * 
+ * + * MAINTENANCE = 6; + */ + MAINTENANCE(6), + /** + * + * + *
+     * The instance is experiencing an issue and might be unusable. You can get
+     * further details from the statusMessage field of Instance resource.
+     * 
+ * + * ERROR = 7; + */ + ERROR(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InstanceState"); + } + + /** + * + * + *
+     * State not set.
+     * 
+ * + * INSTANCE_STATE_UNSPECIFIED = 0; + */ + public static final int INSTANCE_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The instance is being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The instance has been created and is fully usable.
+     * 
+ * + * READY = 2; + */ + public static final int READY_VALUE = 2; + + /** + * + * + *
+     * The instance configuration is being updated. Certain kinds of updates
+     * may cause the instance to become unusable while the update is in
+     * progress.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + + /** + * + * + *
+     * The instance is being deleted.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + + /** + * + * + *
+     * The instance is being repaired and may be unstable.
+     * 
+ * + * REPAIRING = 5; + */ + public static final int REPAIRING_VALUE = 5; + + /** + * + * + *
+     * Maintenance is being performed on this instance.
+     * 
+ * + * MAINTENANCE = 6; + */ + public static final int MAINTENANCE_VALUE = 6; + + /** + * + * + *
+     * The instance is experiencing an issue and might be unusable. You can get
+     * further details from the statusMessage field of Instance resource.
+     * 
+ * + * ERROR = 7; + */ + public static final int ERROR_VALUE = 7; + + 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 InstanceState 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 InstanceState forNumber(int value) { + switch (value) { + case 0: + return INSTANCE_STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return READY; + case 3: + return UPDATING; + case 4: + return DELETING; + case 5: + return REPAIRING; + case 6: + return MAINTENANCE; + case 7: + return ERROR; + 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 InstanceState findValueByNumber(int number) { + return InstanceState.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ManagementServer.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final InstanceState[] VALUES = values(); + + public static InstanceState 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 InstanceState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.ManagementServer.InstanceState) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. Identifier. The resource name.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+   * Output only. Identifier. The resource name.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 DESCRIPTION_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the ManagementServer instance (2048 characters
+   * or less).
+   * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+   * Optional. The description of the ManagementServer instance (2048 characters
+   * or less).
+   * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementServer_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(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int TYPE_FIELD_NUMBER = 14; + private int type_ = 0; + + /** + * + * + *
+   * Optional. The type of the ManagementServer resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Optional. The type of the ManagementServer resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType getType() { + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType result = + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType.UNRECOGNIZED + : result; + } + + public static final int MANAGEMENT_URI_FIELD_NUMBER = 11; + private com.google.cloud.backupdr.v1beta.ManagementURI managementUri_; + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by clients to connect to AGM/RD graphical user interface and APIs.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the managementUri field is set. + */ + @java.lang.Override + public boolean hasManagementUri() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by clients to connect to AGM/RD graphical user interface and APIs.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The managementUri. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementURI getManagementUri() { + return managementUri_ == null + ? com.google.cloud.backupdr.v1beta.ManagementURI.getDefaultInstance() + : managementUri_; + } + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by clients to connect to AGM/RD graphical user interface and APIs.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementURIOrBuilder getManagementUriOrBuilder() { + return managementUri_ == null + ? com.google.cloud.backupdr.v1beta.ManagementURI.getDefaultInstance() + : managementUri_; + } + + public static final int WORKFORCE_IDENTITY_BASED_MANAGEMENT_URI_FIELD_NUMBER = 16; + private com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + workforceIdentityBasedManagementUri_; + + /** + * + * + *
+   * Output only. The hostnames of the exposed AGM endpoints for both types of
+   * user i.e. 1p and 3p, used to connect AGM/RM UI.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workforceIdentityBasedManagementUri field is set. + */ + @java.lang.Override + public boolean hasWorkforceIdentityBasedManagementUri() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. The hostnames of the exposed AGM endpoints for both types of
+   * user i.e. 1p and 3p, used to connect AGM/RM UI.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workforceIdentityBasedManagementUri. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + getWorkforceIdentityBasedManagementUri() { + return workforceIdentityBasedManagementUri_ == null + ? com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.getDefaultInstance() + : workforceIdentityBasedManagementUri_; + } + + /** + * + * + *
+   * Output only. The hostnames of the exposed AGM endpoints for both types of
+   * user i.e. 1p and 3p, used to connect AGM/RM UI.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURIOrBuilder + getWorkforceIdentityBasedManagementUriOrBuilder() { + return workforceIdentityBasedManagementUri_ == null + ? com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.getDefaultInstance() + : workforceIdentityBasedManagementUri_; + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The ManagementServer state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.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 ManagementServer state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState getState() { + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState result = + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState.UNRECOGNIZED + : result; + } + + public static final int NETWORKS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List networks_; + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getNetworksList() { + return networks_; + } + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getNetworksOrBuilderList() { + return networks_; + } + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getNetworksCount() { + return networks_.size(); + } + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkConfig getNetworks(int index) { + return networks_.get(index); + } + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkConfigOrBuilder getNetworksOrBuilder(int index) { + return networks_.get(index); + } + + public static final int ETAG_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. Server specified ETag for the ManagementServer resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Server specified ETag for the ManagementServer resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OAUTH2_CLIENT_ID_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object oauth2ClientId_ = ""; + + /** + * + * + *
+   * Output only. The OAuth 2.0 client id is required to make API calls to the
+   * Backup and DR instance API of this ManagementServer. This is the value that
+   * should be provided in the 'aud' field of the OIDC ID Token (see openid
+   * specification
+   * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+   * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The oauth2ClientId. + */ + @java.lang.Override + public java.lang.String getOauth2ClientId() { + java.lang.Object ref = oauth2ClientId_; + 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(); + oauth2ClientId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The OAuth 2.0 client id is required to make API calls to the
+   * Backup and DR instance API of this ManagementServer. This is the value that
+   * should be provided in the 'aud' field of the OIDC ID Token (see openid
+   * specification
+   * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+   * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for oauth2ClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOauth2ClientIdBytes() { + java.lang.Object ref = oauth2ClientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauth2ClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WORKFORCE_IDENTITY_BASED_OAUTH2_CLIENT_ID_FIELD_NUMBER = 17; + private com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + workforceIdentityBasedOauth2ClientId_; + + /** + * + * + *
+   * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workforceIdentityBasedOauth2ClientId field is set. + */ + @java.lang.Override + public boolean hasWorkforceIdentityBasedOauth2ClientId() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workforceIdentityBasedOauth2ClientId. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + getWorkforceIdentityBasedOauth2ClientId() { + return workforceIdentityBasedOauth2ClientId_ == null + ? com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.getDefaultInstance() + : workforceIdentityBasedOauth2ClientId_; + } + + /** + * + * + *
+   * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientIDOrBuilder + getWorkforceIdentityBasedOauth2ClientIdOrBuilder() { + return workforceIdentityBasedOauth2ClientId_ == null + ? com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.getDefaultInstance() + : workforceIdentityBasedOauth2ClientId_; + } + + public static final int BA_PROXY_URI_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList baProxyUri_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by BAs to connect to BA proxy.
+   * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the baProxyUri. + */ + public com.google.protobuf.ProtocolStringList getBaProxyUriList() { + return baProxyUri_; + } + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by BAs to connect to BA proxy.
+   * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of baProxyUri. + */ + public int getBaProxyUriCount() { + return baProxyUri_.size(); + } + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by BAs to connect to BA proxy.
+   * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The baProxyUri at the given index. + */ + public java.lang.String getBaProxyUri(int index) { + return baProxyUri_.get(index); + } + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by BAs to connect to BA proxy.
+   * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the baProxyUri at the given index. + */ + public com.google.protobuf.ByteString getBaProxyUriBytes(int index) { + return baProxyUri_.getByteString(index); + } + + public static final int SATISFIES_PZS_FIELD_NUMBER = 19; + private com.google.protobuf.BoolValue satisfiesPzs_; + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the satisfiesPzs field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzs() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getSatisfiesPzs() { + return satisfiesPzs_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : satisfiesPzs_; + } + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { + return satisfiesPzs_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : satisfiesPzs_; + } + + public static final int SATISFIES_PZI_FIELD_NUMBER = 20; + private boolean satisfiesPzi_ = false; + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzi = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (state_ + != com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState + .INSTANCE_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, state_); + } + for (int i = 0; i < networks_.size(); i++) { + output.writeMessage(8, networks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, description_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(11, getManagementUri()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, etag_); + } + if (type_ + != com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType.INSTANCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(14, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(oauth2ClientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, oauth2ClientId_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(16, getWorkforceIdentityBasedManagementUri()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(17, getWorkforceIdentityBasedOauth2ClientId()); + } + for (int i = 0; i < baProxyUri_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 18, baProxyUri_.getRaw(i)); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(19, getSatisfiesPzs()); + } + if (satisfiesPzi_ != false) { + output.writeBool(20, satisfiesPzi_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + 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(4, labels__); + } + if (state_ + != com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState + .INSTANCE_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + for (int i = 0; i < networks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, networks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, description_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getManagementUri()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, etag_); + } + if (type_ + != com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType.INSTANCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(oauth2ClientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(15, oauth2ClientId_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, getWorkforceIdentityBasedManagementUri()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, getWorkforceIdentityBasedOauth2ClientId()); + } + { + int dataSize = 0; + for (int i = 0; i < baProxyUri_.size(); i++) { + dataSize += computeStringSizeNoTag(baProxyUri_.getRaw(i)); + } + size += dataSize; + size += 2 * getBaProxyUriList().size(); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getSatisfiesPzs()); + } + if (satisfiesPzi_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, satisfiesPzi_); + } + 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.backupdr.v1beta.ManagementServer)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ManagementServer other = + (com.google.cloud.backupdr.v1beta.ManagementServer) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (type_ != other.type_) return false; + if (hasManagementUri() != other.hasManagementUri()) return false; + if (hasManagementUri()) { + if (!getManagementUri().equals(other.getManagementUri())) return false; + } + if (hasWorkforceIdentityBasedManagementUri() != other.hasWorkforceIdentityBasedManagementUri()) + return false; + if (hasWorkforceIdentityBasedManagementUri()) { + if (!getWorkforceIdentityBasedManagementUri() + .equals(other.getWorkforceIdentityBasedManagementUri())) return false; + } + if (state_ != other.state_) return false; + if (!getNetworksList().equals(other.getNetworksList())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getOauth2ClientId().equals(other.getOauth2ClientId())) return false; + if (hasWorkforceIdentityBasedOauth2ClientId() + != other.hasWorkforceIdentityBasedOauth2ClientId()) return false; + if (hasWorkforceIdentityBasedOauth2ClientId()) { + if (!getWorkforceIdentityBasedOauth2ClientId() + .equals(other.getWorkforceIdentityBasedOauth2ClientId())) return false; + } + if (!getBaProxyUriList().equals(other.getBaProxyUriList())) return false; + if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false; + if (hasSatisfiesPzs()) { + if (!getSatisfiesPzs().equals(other.getSatisfiesPzs())) return false; + } + if (getSatisfiesPzi() != other.getSatisfiesPzi()) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasManagementUri()) { + hash = (37 * hash) + MANAGEMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getManagementUri().hashCode(); + } + if (hasWorkforceIdentityBasedManagementUri()) { + hash = (37 * hash) + WORKFORCE_IDENTITY_BASED_MANAGEMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getWorkforceIdentityBasedManagementUri().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getNetworksCount() > 0) { + hash = (37 * hash) + NETWORKS_FIELD_NUMBER; + hash = (53 * hash) + getNetworksList().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + OAUTH2_CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getOauth2ClientId().hashCode(); + if (hasWorkforceIdentityBasedOauth2ClientId()) { + hash = (37 * hash) + WORKFORCE_IDENTITY_BASED_OAUTH2_CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getWorkforceIdentityBasedOauth2ClientId().hashCode(); + } + if (getBaProxyUriCount() > 0) { + hash = (37 * hash) + BA_PROXY_URI_FIELD_NUMBER; + hash = (53 * hash) + getBaProxyUriList().hashCode(); + } + if (hasSatisfiesPzs()) { + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + getSatisfiesPzs().hashCode(); + } + hash = (37 * hash) + SATISFIES_PZI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzi()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer 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.backupdr.v1beta.ManagementServer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer 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.backupdr.v1beta.ManagementServer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ManagementServer 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ManagementServer describes a single BackupDR ManagementServer instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ManagementServer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ManagementServer) + com.google.cloud.backupdr.v1beta.ManagementServerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementServer_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementServer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ManagementServer.class, + com.google.cloud.backupdr.v1beta.ManagementServer.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ManagementServer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetManagementUriFieldBuilder(); + internalGetWorkforceIdentityBasedManagementUriFieldBuilder(); + internalGetNetworksFieldBuilder(); + internalGetWorkforceIdentityBasedOauth2ClientIdFieldBuilder(); + internalGetSatisfiesPzsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + internalGetMutableLabels().clear(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + type_ = 0; + managementUri_ = null; + if (managementUriBuilder_ != null) { + managementUriBuilder_.dispose(); + managementUriBuilder_ = null; + } + workforceIdentityBasedManagementUri_ = null; + if (workforceIdentityBasedManagementUriBuilder_ != null) { + workforceIdentityBasedManagementUriBuilder_.dispose(); + workforceIdentityBasedManagementUriBuilder_ = null; + } + state_ = 0; + if (networksBuilder_ == null) { + networks_ = java.util.Collections.emptyList(); + } else { + networks_ = null; + networksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + etag_ = ""; + oauth2ClientId_ = ""; + workforceIdentityBasedOauth2ClientId_ = null; + if (workforceIdentityBasedOauth2ClientIdBuilder_ != null) { + workforceIdentityBasedOauth2ClientIdBuilder_.dispose(); + workforceIdentityBasedOauth2ClientIdBuilder_ = null; + } + baProxyUri_ = com.google.protobuf.LazyStringArrayList.emptyList(); + satisfiesPzs_ = null; + if (satisfiesPzsBuilder_ != null) { + satisfiesPzsBuilder_.dispose(); + satisfiesPzsBuilder_ = null; + } + satisfiesPzi_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementServer_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer build() { + com.google.cloud.backupdr.v1beta.ManagementServer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer buildPartial() { + com.google.cloud.backupdr.v1beta.ManagementServer result = + new com.google.cloud.backupdr.v1beta.ManagementServer(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ManagementServer result) { + if (networksBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + networks_ = java.util.Collections.unmodifiableList(networks_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.networks_ = networks_; + } else { + result.networks_ = networksBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ManagementServer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.managementUri_ = + managementUriBuilder_ == null ? managementUri_ : managementUriBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.workforceIdentityBasedManagementUri_ = + workforceIdentityBasedManagementUriBuilder_ == null + ? workforceIdentityBasedManagementUri_ + : workforceIdentityBasedManagementUriBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.oauth2ClientId_ = oauth2ClientId_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.workforceIdentityBasedOauth2ClientId_ = + workforceIdentityBasedOauth2ClientIdBuilder_ == null + ? workforceIdentityBasedOauth2ClientId_ + : workforceIdentityBasedOauth2ClientIdBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + baProxyUri_.makeImmutable(); + result.baProxyUri_ = baProxyUri_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.satisfiesPzs_ = + satisfiesPzsBuilder_ == null ? satisfiesPzs_ : satisfiesPzsBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.satisfiesPzi_ = satisfiesPzi_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ManagementServer) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ManagementServer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ManagementServer other) { + if (other == com.google.cloud.backupdr.v1beta.ManagementServer.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000004; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasManagementUri()) { + mergeManagementUri(other.getManagementUri()); + } + if (other.hasWorkforceIdentityBasedManagementUri()) { + mergeWorkforceIdentityBasedManagementUri(other.getWorkforceIdentityBasedManagementUri()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (networksBuilder_ == null) { + if (!other.networks_.isEmpty()) { + if (networks_.isEmpty()) { + networks_ = other.networks_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureNetworksIsMutable(); + networks_.addAll(other.networks_); + } + onChanged(); + } + } else { + if (!other.networks_.isEmpty()) { + if (networksBuilder_.isEmpty()) { + networksBuilder_.dispose(); + networksBuilder_ = null; + networks_ = other.networks_; + bitField0_ = (bitField0_ & ~0x00000200); + networksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetNetworksFieldBuilder() + : null; + } else { + networksBuilder_.addAllMessages(other.networks_); + } + } + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getOauth2ClientId().isEmpty()) { + oauth2ClientId_ = other.oauth2ClientId_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.hasWorkforceIdentityBasedOauth2ClientId()) { + mergeWorkforceIdentityBasedOauth2ClientId(other.getWorkforceIdentityBasedOauth2ClientId()); + } + if (!other.baProxyUri_.isEmpty()) { + if (baProxyUri_.isEmpty()) { + baProxyUri_ = other.baProxyUri_; + bitField0_ |= 0x00002000; + } else { + ensureBaProxyUriIsMutable(); + baProxyUri_.addAll(other.baProxyUri_); + } + onChanged(); + } + if (other.hasSatisfiesPzs()) { + mergeSatisfiesPzs(other.getSatisfiesPzs()); + } + if (other.getSatisfiesPzi() != false) { + setSatisfiesPzi(other.getSatisfiesPzi()); + } + 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 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 56 + case 66: + { + com.google.cloud.backupdr.v1beta.NetworkConfig m = + input.readMessage( + com.google.cloud.backupdr.v1beta.NetworkConfig.parser(), extensionRegistry); + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.add(m); + } else { + networksBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 74 + case 90: + { + input.readMessage( + internalGetManagementUriFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 90 + case 106: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 106 + case 112: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 112 + case 122: + { + oauth2ClientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 122 + case 130: + { + input.readMessage( + internalGetWorkforceIdentityBasedManagementUriFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 130 + case 138: + { + input.readMessage( + internalGetWorkforceIdentityBasedOauth2ClientIdFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 138 + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBaProxyUriIsMutable(); + baProxyUri_.add(s); + break; + } // case 146 + case 154: + { + input.readMessage( + internalGetSatisfiesPzsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 154 + case 160: + { + satisfiesPzi_ = input.readBool(); + bitField0_ |= 0x00008000; + break; + } // case 160 + 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_ = ""; + + /** + * + * + *
+     * Output only. Identifier. The resource name.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + + /** + * + * + *
+     * Output only. Identifier. The resource name.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifier. The resource name.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the ManagementServer instance (2048 characters
+     * or less).
+     * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The description of the ManagementServer instance (2048 characters
+     * or less).
+     * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
+     * Optional. The description of the ManagementServer instance (2048 characters
+     * or less).
+     * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the ManagementServer instance (2048 characters
+     * or less).
+     * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the ManagementServer instance (2048 characters
+     * or less).
+     * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000002; + 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_ |= 0x00000004; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * Labels currently defined:
+     * 1. migrate_from_go=<false|true>
+     * If set to true, the MS is created in migration ready mode.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * Labels currently defined:
+     * 1. migrate_from_go=<false|true>
+     * If set to true, the MS is created in migration ready mode.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * Labels currently defined:
+     * 1. migrate_from_go=<false|true>
+     * If set to true, the MS is created in migration ready mode.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * Labels currently defined:
+     * 1. migrate_from_go=<false|true>
+     * If set to true, the MS is created in migration ready mode.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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_ & ~0x00000004); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * Labels currently defined:
+     * 1. migrate_from_go=<false|true>
+     * If set to true, the MS is created in migration ready mode.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00000004; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * Labels currently defined:
+     * 1. migrate_from_go=<false|true>
+     * If set to true, the MS is created in migration ready mode.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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_ |= 0x00000004; + return this; + } + + /** + * + * + *
+     * Optional. Resource labels to represent user provided metadata.
+     * Labels currently defined:
+     * 1. migrate_from_go=<false|true>
+     * If set to true, the MS is created in migration ready mode.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 instance was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time when the instance was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int type_ = 0; + + /** + * + * + *
+     * Optional. The type of the ManagementServer resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Optional. The type of the ManagementServer resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of the ManagementServer resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType getType() { + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType result = + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType.forNumber(type_); + return result == null + ? com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The type of the ManagementServer resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of the ManagementServer resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000020); + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.ManagementURI managementUri_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementURI, + com.google.cloud.backupdr.v1beta.ManagementURI.Builder, + com.google.cloud.backupdr.v1beta.ManagementURIOrBuilder> + managementUriBuilder_; + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the managementUri field is set. + */ + public boolean hasManagementUri() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The managementUri. + */ + public com.google.cloud.backupdr.v1beta.ManagementURI getManagementUri() { + if (managementUriBuilder_ == null) { + return managementUri_ == null + ? com.google.cloud.backupdr.v1beta.ManagementURI.getDefaultInstance() + : managementUri_; + } else { + return managementUriBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setManagementUri(com.google.cloud.backupdr.v1beta.ManagementURI value) { + if (managementUriBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + managementUri_ = value; + } else { + managementUriBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setManagementUri( + com.google.cloud.backupdr.v1beta.ManagementURI.Builder builderForValue) { + if (managementUriBuilder_ == null) { + managementUri_ = builderForValue.build(); + } else { + managementUriBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeManagementUri(com.google.cloud.backupdr.v1beta.ManagementURI value) { + if (managementUriBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && managementUri_ != null + && managementUri_ + != com.google.cloud.backupdr.v1beta.ManagementURI.getDefaultInstance()) { + getManagementUriBuilder().mergeFrom(value); + } else { + managementUri_ = value; + } + } else { + managementUriBuilder_.mergeFrom(value); + } + if (managementUri_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearManagementUri() { + bitField0_ = (bitField0_ & ~0x00000040); + managementUri_ = null; + if (managementUriBuilder_ != null) { + managementUriBuilder_.dispose(); + managementUriBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.ManagementURI.Builder getManagementUriBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetManagementUriFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.ManagementURIOrBuilder getManagementUriOrBuilder() { + if (managementUriBuilder_ != null) { + return managementUriBuilder_.getMessageOrBuilder(); + } else { + return managementUri_ == null + ? com.google.cloud.backupdr.v1beta.ManagementURI.getDefaultInstance() + : managementUri_; + } + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by clients to connect to AGM/RD graphical user interface and APIs.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementURI, + com.google.cloud.backupdr.v1beta.ManagementURI.Builder, + com.google.cloud.backupdr.v1beta.ManagementURIOrBuilder> + internalGetManagementUriFieldBuilder() { + if (managementUriBuilder_ == null) { + managementUriBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ManagementURI, + com.google.cloud.backupdr.v1beta.ManagementURI.Builder, + com.google.cloud.backupdr.v1beta.ManagementURIOrBuilder>( + getManagementUri(), getParentForChildren(), isClean()); + managementUri_ = null; + } + return managementUriBuilder_; + } + + private com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + workforceIdentityBasedManagementUri_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.Builder, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURIOrBuilder> + workforceIdentityBasedManagementUriBuilder_; + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workforceIdentityBasedManagementUri field is set. + */ + public boolean hasWorkforceIdentityBasedManagementUri() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workforceIdentityBasedManagementUri. + */ + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + getWorkforceIdentityBasedManagementUri() { + if (workforceIdentityBasedManagementUriBuilder_ == null) { + return workforceIdentityBasedManagementUri_ == null + ? com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + .getDefaultInstance() + : workforceIdentityBasedManagementUri_; + } else { + return workforceIdentityBasedManagementUriBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWorkforceIdentityBasedManagementUri( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI value) { + if (workforceIdentityBasedManagementUriBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + workforceIdentityBasedManagementUri_ = value; + } else { + workforceIdentityBasedManagementUriBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWorkforceIdentityBasedManagementUri( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.Builder + builderForValue) { + if (workforceIdentityBasedManagementUriBuilder_ == null) { + workforceIdentityBasedManagementUri_ = builderForValue.build(); + } else { + workforceIdentityBasedManagementUriBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeWorkforceIdentityBasedManagementUri( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI value) { + if (workforceIdentityBasedManagementUriBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && workforceIdentityBasedManagementUri_ != null + && workforceIdentityBasedManagementUri_ + != com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + .getDefaultInstance()) { + getWorkforceIdentityBasedManagementUriBuilder().mergeFrom(value); + } else { + workforceIdentityBasedManagementUri_ = value; + } + } else { + workforceIdentityBasedManagementUriBuilder_.mergeFrom(value); + } + if (workforceIdentityBasedManagementUri_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearWorkforceIdentityBasedManagementUri() { + bitField0_ = (bitField0_ & ~0x00000080); + workforceIdentityBasedManagementUri_ = null; + if (workforceIdentityBasedManagementUriBuilder_ != null) { + workforceIdentityBasedManagementUriBuilder_.dispose(); + workforceIdentityBasedManagementUriBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.Builder + getWorkforceIdentityBasedManagementUriBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetWorkforceIdentityBasedManagementUriFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURIOrBuilder + getWorkforceIdentityBasedManagementUriOrBuilder() { + if (workforceIdentityBasedManagementUriBuilder_ != null) { + return workforceIdentityBasedManagementUriBuilder_.getMessageOrBuilder(); + } else { + return workforceIdentityBasedManagementUri_ == null + ? com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + .getDefaultInstance() + : workforceIdentityBasedManagementUri_; + } + } + + /** + * + * + *
+     * Output only. The hostnames of the exposed AGM endpoints for both types of
+     * user i.e. 1p and 3p, used to connect AGM/RM UI.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.Builder, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURIOrBuilder> + internalGetWorkforceIdentityBasedManagementUriFieldBuilder() { + if (workforceIdentityBasedManagementUriBuilder_ == null) { + workforceIdentityBasedManagementUriBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.Builder, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURIOrBuilder>( + getWorkforceIdentityBasedManagementUri(), getParentForChildren(), isClean()); + workforceIdentityBasedManagementUri_ = null; + } + return workforceIdentityBasedManagementUriBuilder_; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The ManagementServer state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.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 ManagementServer state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.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_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The ManagementServer state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState getState() { + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState result = + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState.forNumber(state_); + return result == null + ? com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The ManagementServer state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The ManagementServer state.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000100); + state_ = 0; + onChanged(); + return this; + } + + private java.util.List networks_ = + java.util.Collections.emptyList(); + + private void ensureNetworksIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + networks_ = + new java.util.ArrayList(networks_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkConfig, + com.google.cloud.backupdr.v1beta.NetworkConfig.Builder, + com.google.cloud.backupdr.v1beta.NetworkConfigOrBuilder> + networksBuilder_; + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getNetworksList() { + if (networksBuilder_ == null) { + return java.util.Collections.unmodifiableList(networks_); + } else { + return networksBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getNetworksCount() { + if (networksBuilder_ == null) { + return networks_.size(); + } else { + return networksBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkConfig getNetworks(int index) { + if (networksBuilder_ == null) { + return networks_.get(index); + } else { + return networksBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworks(int index, com.google.cloud.backupdr.v1beta.NetworkConfig value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.set(index, value); + onChanged(); + } else { + networksBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworks( + int index, com.google.cloud.backupdr.v1beta.NetworkConfig.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.set(index, builderForValue.build()); + onChanged(); + } else { + networksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNetworks(com.google.cloud.backupdr.v1beta.NetworkConfig value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.add(value); + onChanged(); + } else { + networksBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNetworks(int index, com.google.cloud.backupdr.v1beta.NetworkConfig value) { + if (networksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNetworksIsMutable(); + networks_.add(index, value); + onChanged(); + } else { + networksBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNetworks( + com.google.cloud.backupdr.v1beta.NetworkConfig.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.add(builderForValue.build()); + onChanged(); + } else { + networksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNetworks( + int index, com.google.cloud.backupdr.v1beta.NetworkConfig.Builder builderForValue) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.add(index, builderForValue.build()); + onChanged(); + } else { + networksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllNetworks( + java.lang.Iterable values) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networks_); + onChanged(); + } else { + networksBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNetworks() { + if (networksBuilder_ == null) { + networks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + networksBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeNetworks(int index) { + if (networksBuilder_ == null) { + ensureNetworksIsMutable(); + networks_.remove(index); + onChanged(); + } else { + networksBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkConfig.Builder getNetworksBuilder(int index) { + return internalGetNetworksFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkConfigOrBuilder getNetworksOrBuilder(int index) { + if (networksBuilder_ == null) { + return networks_.get(index); + } else { + return networksBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getNetworksOrBuilderList() { + if (networksBuilder_ != null) { + return networksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(networks_); + } + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkConfig.Builder addNetworksBuilder() { + return internalGetNetworksFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.NetworkConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.NetworkConfig.Builder addNetworksBuilder(int index) { + return internalGetNetworksFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.NetworkConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. VPC networks to which the ManagementServer instance is connected.
+     * For this version, only a single network is supported. This field is
+     * optional if MS is created without PSA
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getNetworksBuilderList() { + return internalGetNetworksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkConfig, + com.google.cloud.backupdr.v1beta.NetworkConfig.Builder, + com.google.cloud.backupdr.v1beta.NetworkConfigOrBuilder> + internalGetNetworksFieldBuilder() { + if (networksBuilder_ == null) { + networksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.NetworkConfig, + com.google.cloud.backupdr.v1beta.NetworkConfig.Builder, + com.google.cloud.backupdr.v1beta.NetworkConfigOrBuilder>( + networks_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + networks_ = null; + } + return networksBuilder_; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. Server specified ETag for the ManagementServer resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Server specified ETag for the ManagementServer resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Server specified ETag for the ManagementServer resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Server specified ETag for the ManagementServer resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Server specified ETag for the ManagementServer resource to
+     * prevent simultaneous updates from overwiting each other.
+     * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object oauth2ClientId_ = ""; + + /** + * + * + *
+     * Output only. The OAuth 2.0 client id is required to make API calls to the
+     * Backup and DR instance API of this ManagementServer. This is the value that
+     * should be provided in the 'aud' field of the OIDC ID Token (see openid
+     * specification
+     * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+     * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The oauth2ClientId. + */ + public java.lang.String getOauth2ClientId() { + java.lang.Object ref = oauth2ClientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauth2ClientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The OAuth 2.0 client id is required to make API calls to the
+     * Backup and DR instance API of this ManagementServer. This is the value that
+     * should be provided in the 'aud' field of the OIDC ID Token (see openid
+     * specification
+     * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+     * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for oauth2ClientId. + */ + public com.google.protobuf.ByteString getOauth2ClientIdBytes() { + java.lang.Object ref = oauth2ClientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauth2ClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The OAuth 2.0 client id is required to make API calls to the
+     * Backup and DR instance API of this ManagementServer. This is the value that
+     * should be provided in the 'aud' field of the OIDC ID Token (see openid
+     * specification
+     * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+     * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The oauth2ClientId to set. + * @return This builder for chaining. + */ + public Builder setOauth2ClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oauth2ClientId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The OAuth 2.0 client id is required to make API calls to the
+     * Backup and DR instance API of this ManagementServer. This is the value that
+     * should be provided in the 'aud' field of the OIDC ID Token (see openid
+     * specification
+     * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+     * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearOauth2ClientId() { + oauth2ClientId_ = getDefaultInstance().getOauth2ClientId(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The OAuth 2.0 client id is required to make API calls to the
+     * Backup and DR instance API of this ManagementServer. This is the value that
+     * should be provided in the 'aud' field of the OIDC ID Token (see openid
+     * specification
+     * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+     * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for oauth2ClientId to set. + * @return This builder for chaining. + */ + public Builder setOauth2ClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oauth2ClientId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + workforceIdentityBasedOauth2ClientId_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.Builder, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientIDOrBuilder> + workforceIdentityBasedOauth2ClientIdBuilder_; + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workforceIdentityBasedOauth2ClientId field is set. + */ + public boolean hasWorkforceIdentityBasedOauth2ClientId() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workforceIdentityBasedOauth2ClientId. + */ + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + getWorkforceIdentityBasedOauth2ClientId() { + if (workforceIdentityBasedOauth2ClientIdBuilder_ == null) { + return workforceIdentityBasedOauth2ClientId_ == null + ? com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + .getDefaultInstance() + : workforceIdentityBasedOauth2ClientId_; + } else { + return workforceIdentityBasedOauth2ClientIdBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWorkforceIdentityBasedOauth2ClientId( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID value) { + if (workforceIdentityBasedOauth2ClientIdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + workforceIdentityBasedOauth2ClientId_ = value; + } else { + workforceIdentityBasedOauth2ClientIdBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWorkforceIdentityBasedOauth2ClientId( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.Builder + builderForValue) { + if (workforceIdentityBasedOauth2ClientIdBuilder_ == null) { + workforceIdentityBasedOauth2ClientId_ = builderForValue.build(); + } else { + workforceIdentityBasedOauth2ClientIdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeWorkforceIdentityBasedOauth2ClientId( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID value) { + if (workforceIdentityBasedOauth2ClientIdBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && workforceIdentityBasedOauth2ClientId_ != null + && workforceIdentityBasedOauth2ClientId_ + != com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + .getDefaultInstance()) { + getWorkforceIdentityBasedOauth2ClientIdBuilder().mergeFrom(value); + } else { + workforceIdentityBasedOauth2ClientId_ = value; + } + } else { + workforceIdentityBasedOauth2ClientIdBuilder_.mergeFrom(value); + } + if (workforceIdentityBasedOauth2ClientId_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearWorkforceIdentityBasedOauth2ClientId() { + bitField0_ = (bitField0_ & ~0x00001000); + workforceIdentityBasedOauth2ClientId_ = null; + if (workforceIdentityBasedOauth2ClientIdBuilder_ != null) { + workforceIdentityBasedOauth2ClientIdBuilder_.dispose(); + workforceIdentityBasedOauth2ClientIdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.Builder + getWorkforceIdentityBasedOauth2ClientIdBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetWorkforceIdentityBasedOauth2ClientIdFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientIDOrBuilder + getWorkforceIdentityBasedOauth2ClientIdOrBuilder() { + if (workforceIdentityBasedOauth2ClientIdBuilder_ != null) { + return workforceIdentityBasedOauth2ClientIdBuilder_.getMessageOrBuilder(); + } else { + return workforceIdentityBasedOauth2ClientId_ == null + ? com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + .getDefaultInstance() + : workforceIdentityBasedOauth2ClientId_; + } + } + + /** + * + * + *
+     * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.Builder, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientIDOrBuilder> + internalGetWorkforceIdentityBasedOauth2ClientIdFieldBuilder() { + if (workforceIdentityBasedOauth2ClientIdBuilder_ == null) { + workforceIdentityBasedOauth2ClientIdBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.Builder, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientIDOrBuilder>( + getWorkforceIdentityBasedOauth2ClientId(), getParentForChildren(), isClean()); + workforceIdentityBasedOauth2ClientId_ = null; + } + return workforceIdentityBasedOauth2ClientIdBuilder_; + } + + private com.google.protobuf.LazyStringArrayList baProxyUri_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureBaProxyUriIsMutable() { + if (!baProxyUri_.isModifiable()) { + baProxyUri_ = new com.google.protobuf.LazyStringArrayList(baProxyUri_); + } + bitField0_ |= 0x00002000; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the baProxyUri. + */ + public com.google.protobuf.ProtocolStringList getBaProxyUriList() { + baProxyUri_.makeImmutable(); + return baProxyUri_; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of baProxyUri. + */ + public int getBaProxyUriCount() { + return baProxyUri_.size(); + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The baProxyUri at the given index. + */ + public java.lang.String getBaProxyUri(int index) { + return baProxyUri_.get(index); + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the baProxyUri at the given index. + */ + public com.google.protobuf.ByteString getBaProxyUriBytes(int index) { + return baProxyUri_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The baProxyUri to set. + * @return This builder for chaining. + */ + public Builder setBaProxyUri(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBaProxyUriIsMutable(); + baProxyUri_.set(index, value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The baProxyUri to add. + * @return This builder for chaining. + */ + public Builder addBaProxyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBaProxyUriIsMutable(); + baProxyUri_.add(value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The baProxyUri to add. + * @return This builder for chaining. + */ + public Builder addAllBaProxyUri(java.lang.Iterable values) { + ensureBaProxyUriIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, baProxyUri_); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBaProxyUri() { + baProxyUri_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The hostname or ip address of the exposed AGM endpoints, used
+     * by BAs to connect to BA proxy.
+     * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the baProxyUri to add. + * @return This builder for chaining. + */ + public Builder addBaProxyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureBaProxyUriIsMutable(); + baProxyUri_.add(value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private com.google.protobuf.BoolValue satisfiesPzs_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + satisfiesPzsBuilder_; + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the satisfiesPzs field is set. + */ + public boolean hasSatisfiesPzs() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The satisfiesPzs. + */ + public com.google.protobuf.BoolValue getSatisfiesPzs() { + if (satisfiesPzsBuilder_ == null) { + return satisfiesPzs_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : satisfiesPzs_; + } else { + return satisfiesPzsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSatisfiesPzs(com.google.protobuf.BoolValue value) { + if (satisfiesPzsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + satisfiesPzs_ = value; + } else { + satisfiesPzsBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSatisfiesPzs(com.google.protobuf.BoolValue.Builder builderForValue) { + if (satisfiesPzsBuilder_ == null) { + satisfiesPzs_ = builderForValue.build(); + } else { + satisfiesPzsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSatisfiesPzs(com.google.protobuf.BoolValue value) { + if (satisfiesPzsBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && satisfiesPzs_ != null + && satisfiesPzs_ != com.google.protobuf.BoolValue.getDefaultInstance()) { + getSatisfiesPzsBuilder().mergeFrom(value); + } else { + satisfiesPzs_ = value; + } + } else { + satisfiesPzsBuilder_.mergeFrom(value); + } + if (satisfiesPzs_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSatisfiesPzs() { + bitField0_ = (bitField0_ & ~0x00004000); + satisfiesPzs_ = null; + if (satisfiesPzsBuilder_ != null) { + satisfiesPzsBuilder_.dispose(); + satisfiesPzsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.BoolValue.Builder getSatisfiesPzsBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return internalGetSatisfiesPzsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder() { + if (satisfiesPzsBuilder_ != null) { + return satisfiesPzsBuilder_.getMessageOrBuilder(); + } else { + return satisfiesPzs_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : satisfiesPzs_; + } + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + internalGetSatisfiesPzsFieldBuilder() { + if (satisfiesPzsBuilder_ == null) { + satisfiesPzsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getSatisfiesPzs(), getParentForChildren(), isClean()); + satisfiesPzs_ = null; + } + return satisfiesPzsBuilder_; + } + + private boolean satisfiesPzi_; + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + @java.lang.Override + public boolean getSatisfiesPzi() { + return satisfiesPzi_; + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzi to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzi(boolean value) { + + satisfiesPzi_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Reserved for future use.
+     * 
+ * + * bool satisfies_pzi = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzi() { + bitField0_ = (bitField0_ & ~0x00008000); + satisfiesPzi_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ManagementServer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ManagementServer) + private static final com.google.cloud.backupdr.v1beta.ManagementServer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ManagementServer(); + } + + public static com.google.cloud.backupdr.v1beta.ManagementServer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManagementServer 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.backupdr.v1beta.ManagementServer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServerName.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServerName.java new file mode 100644 index 000000000000..c22fec0bffd8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServerName.java @@ -0,0 +1,230 @@ +/* + * Copyright 2026 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.backupdr.v1beta; + +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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class ManagementServerName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_MANAGEMENTSERVER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/managementServers/{managementserver}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String managementserver; + + @Deprecated + protected ManagementServerName() { + project = null; + location = null; + managementserver = null; + } + + private ManagementServerName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + managementserver = Preconditions.checkNotNull(builder.getManagementserver()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getManagementserver() { + return managementserver; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ManagementServerName of(String project, String location, String managementserver) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setManagementserver(managementserver) + .build(); + } + + public static String format(String project, String location, String managementserver) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setManagementserver(managementserver) + .build() + .toString(); + } + + public static @Nullable ManagementServerName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MANAGEMENTSERVER.validatedMatch( + formattedString, "ManagementServerName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("managementserver")); + } + + 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<@Nullable ManagementServerName> values) { + List list = new ArrayList<>(values.size()); + for (ManagementServerName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_MANAGEMENTSERVER.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 (managementserver != null) { + fieldMapBuilder.put("managementserver", managementserver); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MANAGEMENTSERVER.instantiate( + "project", project, "location", location, "managementserver", managementserver); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ManagementServerName that = ((ManagementServerName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.managementserver, that.managementserver); + } + 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(managementserver); + return h; + } + + /** Builder for projects/{project}/locations/{location}/managementServers/{managementserver}. */ + public static class Builder { + private String project; + private String location; + private String managementserver; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getManagementserver() { + return managementserver; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setManagementserver(String managementserver) { + this.managementserver = managementserver; + return this; + } + + private Builder(ManagementServerName managementServerName) { + this.project = managementServerName.project; + this.location = managementServerName.location; + this.managementserver = managementServerName.managementserver; + } + + public ManagementServerName build() { + return new ManagementServerName(this); + } + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServerOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServerOrBuilder.java new file mode 100644 index 000000000000..8abd8c7c0ecb --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementServerOrBuilder.java @@ -0,0 +1,695 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ManagementServerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ManagementServer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Identifier. The resource name.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. Identifier. The resource name.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The description of the ManagementServer instance (2048 characters
+   * or less).
+   * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the ManagementServer instance (2048 characters
+   * or less).
+   * 
+ * + * string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Resource labels to represent user provided metadata.
+   * Labels currently defined:
+   * 1. migrate_from_go=<false|true>
+   * If set to true, the MS is created in migration ready mode.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time when the instance was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The type of the ManagementServer resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Optional. The type of the ManagementServer resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceType type = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceType getType(); + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by clients to connect to AGM/RD graphical user interface and APIs.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the managementUri field is set. + */ + boolean hasManagementUri(); + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by clients to connect to AGM/RD graphical user interface and APIs.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The managementUri. + */ + com.google.cloud.backupdr.v1beta.ManagementURI getManagementUri(); + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by clients to connect to AGM/RD graphical user interface and APIs.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementURI management_uri = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.ManagementURIOrBuilder getManagementUriOrBuilder(); + + /** + * + * + *
+   * Output only. The hostnames of the exposed AGM endpoints for both types of
+   * user i.e. 1p and 3p, used to connect AGM/RM UI.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workforceIdentityBasedManagementUri field is set. + */ + boolean hasWorkforceIdentityBasedManagementUri(); + + /** + * + * + *
+   * Output only. The hostnames of the exposed AGM endpoints for both types of
+   * user i.e. 1p and 3p, used to connect AGM/RM UI.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workforceIdentityBasedManagementUri. + */ + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + getWorkforceIdentityBasedManagementUri(); + + /** + * + * + *
+   * Output only. The hostnames of the exposed AGM endpoints for both types of
+   * user i.e. 1p and 3p, used to connect AGM/RM UI.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURIOrBuilder + getWorkforceIdentityBasedManagementUriOrBuilder(); + + /** + * + * + *
+   * Output only. The ManagementServer state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The ManagementServer state.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ManagementServer.InstanceState state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.backupdr.v1beta.ManagementServer.InstanceState getState(); + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getNetworksList(); + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.NetworkConfig getNetworks(int index); + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getNetworksCount(); + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getNetworksOrBuilderList(); + + /** + * + * + *
+   * Optional. VPC networks to which the ManagementServer instance is connected.
+   * For this version, only a single network is supported. This field is
+   * optional if MS is created without PSA
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.NetworkConfig networks = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.NetworkConfigOrBuilder getNetworksOrBuilder(int index); + + /** + * + * + *
+   * Optional. Server specified ETag for the ManagementServer resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. Server specified ETag for the ManagementServer resource to
+   * prevent simultaneous updates from overwiting each other.
+   * 
+ * + * string etag = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. The OAuth 2.0 client id is required to make API calls to the
+   * Backup and DR instance API of this ManagementServer. This is the value that
+   * should be provided in the 'aud' field of the OIDC ID Token (see openid
+   * specification
+   * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+   * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The oauth2ClientId. + */ + java.lang.String getOauth2ClientId(); + + /** + * + * + *
+   * Output only. The OAuth 2.0 client id is required to make API calls to the
+   * Backup and DR instance API of this ManagementServer. This is the value that
+   * should be provided in the 'aud' field of the OIDC ID Token (see openid
+   * specification
+   * https://openid.net/specs/openid-connect-core-1_0.html#IDToken).
+   * 
+ * + * string oauth2_client_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for oauth2ClientId. + */ + com.google.protobuf.ByteString getOauth2ClientIdBytes(); + + /** + * + * + *
+   * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the workforceIdentityBasedOauth2ClientId field is set. + */ + boolean hasWorkforceIdentityBasedOauth2ClientId(); + + /** + * + * + *
+   * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workforceIdentityBasedOauth2ClientId. + */ + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + getWorkforceIdentityBasedOauth2ClientId(); + + /** + * + * + *
+   * Output only. The OAuth client IDs for both types of user i.e. 1p and 3p.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID workforce_identity_based_oauth2_client_id = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientIDOrBuilder + getWorkforceIdentityBasedOauth2ClientIdOrBuilder(); + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by BAs to connect to BA proxy.
+   * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the baProxyUri. + */ + java.util.List getBaProxyUriList(); + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by BAs to connect to BA proxy.
+   * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of baProxyUri. + */ + int getBaProxyUriCount(); + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by BAs to connect to BA proxy.
+   * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The baProxyUri at the given index. + */ + java.lang.String getBaProxyUri(int index); + + /** + * + * + *
+   * Output only. The hostname or ip address of the exposed AGM endpoints, used
+   * by BAs to connect to BA proxy.
+   * 
+ * + * repeated string ba_proxy_uri = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the baProxyUri at the given index. + */ + com.google.protobuf.ByteString getBaProxyUriBytes(int index); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the satisfiesPzs field is set. + */ + boolean hasSatisfiesPzs(); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The satisfiesPzs. + */ + com.google.protobuf.BoolValue getSatisfiesPzs(); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * + * .google.protobuf.BoolValue satisfies_pzs = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.BoolValueOrBuilder getSatisfiesPzsOrBuilder(); + + /** + * + * + *
+   * Output only. Reserved for future use.
+   * 
+ * + * bool satisfies_pzi = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzi. + */ + boolean getSatisfiesPzi(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementURI.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementURI.java new file mode 100644 index 000000000000..332fad080777 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementURI.java @@ -0,0 +1,784 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ManagementURI for the Management Server resource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ManagementURI} + */ +@com.google.protobuf.Generated +public final class ManagementURI extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ManagementURI) + ManagementURIOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ManagementURI"); + } + + // Use ManagementURI.newBuilder() to construct. + private ManagementURI(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ManagementURI() { + webUi_ = ""; + api_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementURI_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementURI_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ManagementURI.class, + com.google.cloud.backupdr.v1beta.ManagementURI.Builder.class); + } + + public static final int WEB_UI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object webUi_ = ""; + + /** + * + * + *
+   * Output only. The ManagementServer AGM/RD WebUI URL.
+   * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The webUi. + */ + @java.lang.Override + public java.lang.String getWebUi() { + java.lang.Object ref = webUi_; + 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(); + webUi_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The ManagementServer AGM/RD WebUI URL.
+   * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for webUi. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebUiBytes() { + java.lang.Object ref = webUi_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webUi_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object api_ = ""; + + /** + * + * + *
+   * Output only. The ManagementServer AGM/RD API URL.
+   * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The api. + */ + @java.lang.Override + public java.lang.String getApi() { + java.lang.Object ref = api_; + 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(); + api_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The ManagementServer AGM/RD API URL.
+   * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for api. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiBytes() { + java.lang.Object ref = api_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + api_ = 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.GeneratedMessage.isStringEmpty(webUi_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, webUi_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(api_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, api_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(webUi_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, webUi_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(api_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, api_); + } + 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.backupdr.v1beta.ManagementURI)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ManagementURI other = + (com.google.cloud.backupdr.v1beta.ManagementURI) obj; + + if (!getWebUi().equals(other.getWebUi())) return false; + if (!getApi().equals(other.getApi())) 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) + WEB_UI_FIELD_NUMBER; + hash = (53 * hash) + getWebUi().hashCode(); + hash = (37 * hash) + API_FIELD_NUMBER; + hash = (53 * hash) + getApi().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI 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.backupdr.v1beta.ManagementURI parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI 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.backupdr.v1beta.ManagementURI parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ManagementURI 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ManagementURI for the Management Server resource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ManagementURI} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ManagementURI) + com.google.cloud.backupdr.v1beta.ManagementURIOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementURI_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementURI_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ManagementURI.class, + com.google.cloud.backupdr.v1beta.ManagementURI.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ManagementURI.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + webUi_ = ""; + api_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_ManagementURI_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementURI getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ManagementURI.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementURI build() { + com.google.cloud.backupdr.v1beta.ManagementURI result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ManagementURI buildPartial() { + com.google.cloud.backupdr.v1beta.ManagementURI result = + new com.google.cloud.backupdr.v1beta.ManagementURI(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ManagementURI result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.webUi_ = webUi_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.api_ = api_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ManagementURI) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ManagementURI) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ManagementURI other) { + if (other == com.google.cloud.backupdr.v1beta.ManagementURI.getDefaultInstance()) return this; + if (!other.getWebUi().isEmpty()) { + webUi_ = other.webUi_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getApi().isEmpty()) { + api_ = other.api_; + bitField0_ |= 0x00000002; + 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: + { + webUi_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + api_ = input.readStringRequireUtf8(); + 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 java.lang.Object webUi_ = ""; + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD WebUI URL.
+     * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The webUi. + */ + public java.lang.String getWebUi() { + java.lang.Object ref = webUi_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webUi_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD WebUI URL.
+     * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for webUi. + */ + public com.google.protobuf.ByteString getWebUiBytes() { + java.lang.Object ref = webUi_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webUi_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD WebUI URL.
+     * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The webUi to set. + * @return This builder for chaining. + */ + public Builder setWebUi(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + webUi_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD WebUI URL.
+     * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearWebUi() { + webUi_ = getDefaultInstance().getWebUi(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD WebUI URL.
+     * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for webUi to set. + * @return This builder for chaining. + */ + public Builder setWebUiBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + webUi_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object api_ = ""; + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD API URL.
+     * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The api. + */ + public java.lang.String getApi() { + java.lang.Object ref = api_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + api_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD API URL.
+     * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for api. + */ + public com.google.protobuf.ByteString getApiBytes() { + java.lang.Object ref = api_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + api_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD API URL.
+     * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The api to set. + * @return This builder for chaining. + */ + public Builder setApi(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + api_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD API URL.
+     * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApi() { + api_ = getDefaultInstance().getApi(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The ManagementServer AGM/RD API URL.
+     * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for api to set. + * @return This builder for chaining. + */ + public Builder setApiBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + api_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ManagementURI) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ManagementURI) + private static final com.google.cloud.backupdr.v1beta.ManagementURI DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ManagementURI(); + } + + public static com.google.cloud.backupdr.v1beta.ManagementURI getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManagementURI 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.backupdr.v1beta.ManagementURI getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementURIOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementURIOrBuilder.java new file mode 100644 index 000000000000..1534a86fdd8d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ManagementURIOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ManagementURIOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ManagementURI) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The ManagementServer AGM/RD WebUI URL.
+   * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The webUi. + */ + java.lang.String getWebUi(); + + /** + * + * + *
+   * Output only. The ManagementServer AGM/RD WebUI URL.
+   * 
+ * + * string web_ui = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for webUi. + */ + com.google.protobuf.ByteString getWebUiBytes(); + + /** + * + * + *
+   * Output only. The ManagementServer AGM/RD API URL.
+   * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The api. + */ + java.lang.String getApi(); + + /** + * + * + *
+   * Output only. The ManagementServer AGM/RD API URL.
+   * 
+ * + * string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for api. + */ + com.google.protobuf.ByteString getApiBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MatchingCondition.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MatchingCondition.java new file mode 100644 index 000000000000..1aa514308106 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MatchingCondition.java @@ -0,0 +1,831 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * MatchingCondition specifies a set of conditions for matching resources.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.MatchingCondition} + */ +@com.google.protobuf.Generated +public final class MatchingCondition extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.MatchingCondition) + MatchingConditionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "MatchingCondition"); + } + + // Use MatchingCondition.newBuilder() to construct. + private MatchingCondition(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MatchingCondition() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_MatchingCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_MatchingCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.MatchingCondition.class, + com.google.cloud.backupdr.v1beta.MatchingCondition.Builder.class); + } + + private int conditionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object condition_; + + public enum ConditionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LABEL_CONDITION(1), + CONDITION_NOT_SET(0); + private final int value; + + private ConditionCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConditionCase valueOf(int value) { + return forNumber(value); + } + + public static ConditionCase forNumber(int value) { + switch (value) { + case 1: + return LABEL_CONDITION; + case 0: + return CONDITION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ConditionCase getConditionCase() { + return ConditionCase.forNumber(conditionCase_); + } + + public static final int LABEL_CONDITION_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Optional. A condition that matches resources based on their labels.
+   * For MVP, this is limited to a single label match.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the labelCondition field is set. + */ + @java.lang.Override + public boolean hasLabelCondition() { + return conditionCase_ == 1; + } + + /** + * + * + *
+   * Optional. A condition that matches resources based on their labels.
+   * For MVP, this is limited to a single label match.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The labelCondition. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyValuePair getLabelCondition() { + if (conditionCase_ == 1) { + return (com.google.cloud.backupdr.v1beta.KeyValuePair) condition_; + } + return com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. A condition that matches resources based on their labels.
+   * For MVP, this is limited to a single label match.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyValuePairOrBuilder getLabelConditionOrBuilder() { + if (conditionCase_ == 1) { + return (com.google.cloud.backupdr.v1beta.KeyValuePair) condition_; + } + return com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance(); + } + + 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 (conditionCase_ == 1) { + output.writeMessage(1, (com.google.cloud.backupdr.v1beta.KeyValuePair) condition_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (conditionCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.backupdr.v1beta.KeyValuePair) condition_); + } + 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.backupdr.v1beta.MatchingCondition)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.MatchingCondition other = + (com.google.cloud.backupdr.v1beta.MatchingCondition) obj; + + if (!getConditionCase().equals(other.getConditionCase())) return false; + switch (conditionCase_) { + case 1: + if (!getLabelCondition().equals(other.getLabelCondition())) return false; + break; + case 0: + default: + } + 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(); + switch (conditionCase_) { + case 1: + hash = (37 * hash) + LABEL_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getLabelCondition().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition 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.backupdr.v1beta.MatchingCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition 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.backupdr.v1beta.MatchingCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.MatchingCondition 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * MatchingCondition specifies a set of conditions for matching resources.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.MatchingCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.MatchingCondition) + com.google.cloud.backupdr.v1beta.MatchingConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_MatchingCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_MatchingCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.MatchingCondition.class, + com.google.cloud.backupdr.v1beta.MatchingCondition.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.MatchingCondition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (labelConditionBuilder_ != null) { + labelConditionBuilder_.clear(); + } + conditionCase_ = 0; + condition_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_MatchingCondition_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.MatchingCondition getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.MatchingCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.MatchingCondition build() { + com.google.cloud.backupdr.v1beta.MatchingCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.MatchingCondition buildPartial() { + com.google.cloud.backupdr.v1beta.MatchingCondition result = + new com.google.cloud.backupdr.v1beta.MatchingCondition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.MatchingCondition result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.MatchingCondition result) { + result.conditionCase_ = conditionCase_; + result.condition_ = this.condition_; + if (conditionCase_ == 1 && labelConditionBuilder_ != null) { + result.condition_ = labelConditionBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.MatchingCondition) { + return mergeFrom((com.google.cloud.backupdr.v1beta.MatchingCondition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.MatchingCondition other) { + if (other == com.google.cloud.backupdr.v1beta.MatchingCondition.getDefaultInstance()) + return this; + switch (other.getConditionCase()) { + case LABEL_CONDITION: + { + mergeLabelCondition(other.getLabelCondition()); + break; + } + case CONDITION_NOT_SET: + { + break; + } + } + 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( + internalGetLabelConditionFieldBuilder().getBuilder(), extensionRegistry); + conditionCase_ = 1; + 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 conditionCase_ = 0; + private java.lang.Object condition_; + + public ConditionCase getConditionCase() { + return ConditionCase.forNumber(conditionCase_); + } + + public Builder clearCondition() { + conditionCase_ = 0; + condition_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.KeyValuePair, + com.google.cloud.backupdr.v1beta.KeyValuePair.Builder, + com.google.cloud.backupdr.v1beta.KeyValuePairOrBuilder> + labelConditionBuilder_; + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the labelCondition field is set. + */ + @java.lang.Override + public boolean hasLabelCondition() { + return conditionCase_ == 1; + } + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The labelCondition. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyValuePair getLabelCondition() { + if (labelConditionBuilder_ == null) { + if (conditionCase_ == 1) { + return (com.google.cloud.backupdr.v1beta.KeyValuePair) condition_; + } + return com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance(); + } else { + if (conditionCase_ == 1) { + return labelConditionBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLabelCondition(com.google.cloud.backupdr.v1beta.KeyValuePair value) { + if (labelConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + labelConditionBuilder_.setMessage(value); + } + conditionCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLabelCondition( + com.google.cloud.backupdr.v1beta.KeyValuePair.Builder builderForValue) { + if (labelConditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + labelConditionBuilder_.setMessage(builderForValue.build()); + } + conditionCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLabelCondition(com.google.cloud.backupdr.v1beta.KeyValuePair value) { + if (labelConditionBuilder_ == null) { + if (conditionCase_ == 1 + && condition_ != com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance()) { + condition_ = + com.google.cloud.backupdr.v1beta.KeyValuePair.newBuilder( + (com.google.cloud.backupdr.v1beta.KeyValuePair) condition_) + .mergeFrom(value) + .buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + if (conditionCase_ == 1) { + labelConditionBuilder_.mergeFrom(value); + } else { + labelConditionBuilder_.setMessage(value); + } + } + conditionCase_ = 1; + return this; + } + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLabelCondition() { + if (labelConditionBuilder_ == null) { + if (conditionCase_ == 1) { + conditionCase_ = 0; + condition_ = null; + onChanged(); + } + } else { + if (conditionCase_ == 1) { + conditionCase_ = 0; + condition_ = null; + } + labelConditionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.KeyValuePair.Builder getLabelConditionBuilder() { + return internalGetLabelConditionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.KeyValuePairOrBuilder getLabelConditionOrBuilder() { + if ((conditionCase_ == 1) && (labelConditionBuilder_ != null)) { + return labelConditionBuilder_.getMessageOrBuilder(); + } else { + if (conditionCase_ == 1) { + return (com.google.cloud.backupdr.v1beta.KeyValuePair) condition_; + } + return com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. A condition that matches resources based on their labels.
+     * For MVP, this is limited to a single label match.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.KeyValuePair, + com.google.cloud.backupdr.v1beta.KeyValuePair.Builder, + com.google.cloud.backupdr.v1beta.KeyValuePairOrBuilder> + internalGetLabelConditionFieldBuilder() { + if (labelConditionBuilder_ == null) { + if (!(conditionCase_ == 1)) { + condition_ = com.google.cloud.backupdr.v1beta.KeyValuePair.getDefaultInstance(); + } + labelConditionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.KeyValuePair, + com.google.cloud.backupdr.v1beta.KeyValuePair.Builder, + com.google.cloud.backupdr.v1beta.KeyValuePairOrBuilder>( + (com.google.cloud.backupdr.v1beta.KeyValuePair) condition_, + getParentForChildren(), + isClean()); + condition_ = null; + } + conditionCase_ = 1; + onChanged(); + return labelConditionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.MatchingCondition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.MatchingCondition) + private static final com.google.cloud.backupdr.v1beta.MatchingCondition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.MatchingCondition(); + } + + public static com.google.cloud.backupdr.v1beta.MatchingCondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MatchingCondition 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.backupdr.v1beta.MatchingCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MatchingConditionOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MatchingConditionOrBuilder.java new file mode 100644 index 000000000000..d1da80fe04b4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MatchingConditionOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface MatchingConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.MatchingCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. A condition that matches resources based on their labels.
+   * For MVP, this is limited to a single label match.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the labelCondition field is set. + */ + boolean hasLabelCondition(); + + /** + * + * + *
+   * Optional. A condition that matches resources based on their labels.
+   * For MVP, this is limited to a single label match.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The labelCondition. + */ + com.google.cloud.backupdr.v1beta.KeyValuePair getLabelCondition(); + + /** + * + * + *
+   * Optional. A condition that matches resources based on their labels.
+   * For MVP, this is limited to a single label match.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.KeyValuePair label_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.KeyValuePairOrBuilder getLabelConditionOrBuilder(); + + com.google.cloud.backupdr.v1beta.MatchingCondition.ConditionCase getConditionCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Metadata.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Metadata.java new file mode 100644 index 000000000000..ce7cae2fd1e0 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Metadata.java @@ -0,0 +1,988 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A metadata key/value entry.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Metadata} + */ +@com.google.protobuf.Generated +public final class Metadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.Metadata) + MetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Metadata"); + } + + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Metadata() { + items_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Metadata.class, + com.google.cloud.backupdr.v1beta.Metadata.Builder.class); + } + + public static final int ITEMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List items_; + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getItemsList() { + return items_; + } + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getItemsOrBuilderList() { + return items_; + } + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getItemsCount() { + return items_.size(); + } + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Entry getItems(int index) { + return items_.get(index); + } + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.EntryOrBuilder getItemsOrBuilder(int index) { + return items_.get(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 < items_.size(); i++) { + output.writeMessage(1, items_.get(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 < items_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, items_.get(i)); + } + 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.backupdr.v1beta.Metadata)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.Metadata other = + (com.google.cloud.backupdr.v1beta.Metadata) obj; + + if (!getItemsList().equals(other.getItemsList())) 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 (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.Metadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Metadata 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.backupdr.v1beta.Metadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Metadata 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.backupdr.v1beta.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Metadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Metadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Metadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Metadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Metadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Metadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.Metadata 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A metadata key/value entry.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Metadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.Metadata) + com.google.cloud.backupdr.v1beta.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Metadata.class, + com.google.cloud.backupdr.v1beta.Metadata.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.Metadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + } else { + items_ = null; + itemsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Metadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Metadata getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Metadata build() { + com.google.cloud.backupdr.v1beta.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Metadata buildPartial() { + com.google.cloud.backupdr.v1beta.Metadata result = + new com.google.cloud.backupdr.v1beta.Metadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.backupdr.v1beta.Metadata result) { + if (itemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + items_ = java.util.Collections.unmodifiableList(items_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.items_ = items_; + } else { + result.items_ = itemsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.Metadata result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.Metadata) { + return mergeFrom((com.google.cloud.backupdr.v1beta.Metadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.Metadata other) { + if (other == com.google.cloud.backupdr.v1beta.Metadata.getDefaultInstance()) return this; + if (itemsBuilder_ == null) { + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + onChanged(); + } + } else { + if (!other.items_.isEmpty()) { + if (itemsBuilder_.isEmpty()) { + itemsBuilder_.dispose(); + itemsBuilder_ = null; + items_ = other.items_; + bitField0_ = (bitField0_ & ~0x00000001); + itemsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetItemsFieldBuilder() + : null; + } else { + itemsBuilder_.addAllMessages(other.items_); + } + } + } + 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.backupdr.v1beta.Entry m = + input.readMessage( + com.google.cloud.backupdr.v1beta.Entry.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + 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.util.List items_ = + java.util.Collections.emptyList(); + + private void ensureItemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + items_ = new java.util.ArrayList(items_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Entry, + com.google.cloud.backupdr.v1beta.Entry.Builder, + com.google.cloud.backupdr.v1beta.EntryOrBuilder> + itemsBuilder_; + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getItemsList() { + if (itemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(items_); + } else { + return itemsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getItemsCount() { + if (itemsBuilder_ == null) { + return items_.size(); + } else { + return itemsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Entry getItems(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setItems(int index, com.google.cloud.backupdr.v1beta.Entry value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + onChanged(); + } else { + itemsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setItems( + int index, com.google.cloud.backupdr.v1beta.Entry.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.set(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addItems(com.google.cloud.backupdr.v1beta.Entry value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + onChanged(); + } else { + itemsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addItems(int index, com.google.cloud.backupdr.v1beta.Entry value) { + if (itemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(index, value); + onChanged(); + } else { + itemsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addItems(com.google.cloud.backupdr.v1beta.Entry.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addItems( + int index, com.google.cloud.backupdr.v1beta.Entry.Builder builderForValue) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(index, builderForValue.build()); + onChanged(); + } else { + itemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllItems( + java.lang.Iterable values) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_); + onChanged(); + } else { + itemsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearItems() { + if (itemsBuilder_ == null) { + items_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + itemsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeItems(int index) { + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.remove(index); + onChanged(); + } else { + itemsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Entry.Builder getItemsBuilder(int index) { + return internalGetItemsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.EntryOrBuilder getItemsOrBuilder(int index) { + if (itemsBuilder_ == null) { + return items_.get(index); + } else { + return itemsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getItemsOrBuilderList() { + if (itemsBuilder_ != null) { + return itemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(items_); + } + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Entry.Builder addItemsBuilder() { + return internalGetItemsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.Entry.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Entry.Builder addItemsBuilder(int index) { + return internalGetItemsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.Entry.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. Array of key/value pairs. The total size of all keys and values
+     * must be less than 512 KB.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getItemsBuilderList() { + return internalGetItemsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Entry, + com.google.cloud.backupdr.v1beta.Entry.Builder, + com.google.cloud.backupdr.v1beta.EntryOrBuilder> + internalGetItemsFieldBuilder() { + if (itemsBuilder_ == null) { + itemsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Entry, + com.google.cloud.backupdr.v1beta.Entry.Builder, + com.google.cloud.backupdr.v1beta.EntryOrBuilder>( + items_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + items_ = null; + } + return itemsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.Metadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.Metadata) + private static final com.google.cloud.backupdr.v1beta.Metadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.Metadata(); + } + + public static com.google.cloud.backupdr.v1beta.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata 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.backupdr.v1beta.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MetadataOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MetadataOrBuilder.java new file mode 100644 index 000000000000..fbb4edfe73a7 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/MetadataOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface MetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getItemsList(); + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.Entry getItems(int index); + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getItemsCount(); + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getItemsOrBuilderList(); + + /** + * + * + *
+   * Optional. Array of key/value pairs. The total size of all keys and values
+   * must be less than 512 KB.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Entry items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.EntryOrBuilder getItemsOrBuilder(int index); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkConfig.java new file mode 100644 index 000000000000..53d526676a2c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkConfig.java @@ -0,0 +1,937 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Network configuration for ManagementServer instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.NetworkConfig} + */ +@com.google.protobuf.Generated +public final class NetworkConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.NetworkConfig) + NetworkConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "NetworkConfig"); + } + + // Use NetworkConfig.newBuilder() to construct. + private NetworkConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NetworkConfig() { + network_ = ""; + peeringMode_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.NetworkConfig.class, + com.google.cloud.backupdr.v1beta.NetworkConfig.Builder.class); + } + + /** + * + * + *
+   * VPC peering modes supported by Google Cloud Backup and DR.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode} + */ + public enum PeeringMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Peering mode not set.
+     * 
+ * + * PEERING_MODE_UNSPECIFIED = 0; + */ + PEERING_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Connect using Private Service Access to the Management Server. Private
+     * services access provides an IP address range for multiple Google Cloud
+     * services, including Google Cloud Backup and DR.
+     * 
+ * + * PRIVATE_SERVICE_ACCESS = 1; + */ + PRIVATE_SERVICE_ACCESS(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "PeeringMode"); + } + + /** + * + * + *
+     * Peering mode not set.
+     * 
+ * + * PEERING_MODE_UNSPECIFIED = 0; + */ + public static final int PEERING_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Connect using Private Service Access to the Management Server. Private
+     * services access provides an IP address range for multiple Google Cloud
+     * services, including Google Cloud Backup and DR.
+     * 
+ * + * PRIVATE_SERVICE_ACCESS = 1; + */ + public static final int PRIVATE_SERVICE_ACCESS_VALUE = 1; + + 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 PeeringMode 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 PeeringMode forNumber(int value) { + switch (value) { + case 0: + return PEERING_MODE_UNSPECIFIED; + case 1: + return PRIVATE_SERVICE_ACCESS; + 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 PeeringMode findValueByNumber(int number) { + return PeeringMode.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.NetworkConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final PeeringMode[] VALUES = values(); + + public static PeeringMode 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 PeeringMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode) + } + + public static final int NETWORK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + + /** + * + * + *
+   * Optional. The resource name of the Google Compute Engine VPC network to
+   * which the ManagementServer instance is connected.
+   * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The resource name of the Google Compute Engine VPC network to
+   * which the ManagementServer instance is connected.
+   * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEERING_MODE_FIELD_NUMBER = 2; + private int peeringMode_ = 0; + + /** + * + * + *
+   * Optional. The network connect mode of the ManagementServer instance. For
+   * this version, only PRIVATE_SERVICE_ACCESS is supported.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for peeringMode. + */ + @java.lang.Override + public int getPeeringModeValue() { + return peeringMode_; + } + + /** + * + * + *
+   * Optional. The network connect mode of the ManagementServer instance. For
+   * this version, only PRIVATE_SERVICE_ACCESS is supported.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The peeringMode. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode getPeeringMode() { + com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode result = + com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode.forNumber(peeringMode_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode.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.GeneratedMessage.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, network_); + } + if (peeringMode_ + != com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode.PEERING_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, peeringMode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, network_); + } + if (peeringMode_ + != com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode.PEERING_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, peeringMode_); + } + 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.backupdr.v1beta.NetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.NetworkConfig other = + (com.google.cloud.backupdr.v1beta.NetworkConfig) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (peeringMode_ != other.peeringMode_) 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) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + PEERING_MODE_FIELD_NUMBER; + hash = (53 * hash) + peeringMode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig 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.backupdr.v1beta.NetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig 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.backupdr.v1beta.NetworkConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.NetworkConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Network configuration for ManagementServer instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.NetworkConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.NetworkConfig) + com.google.cloud.backupdr.v1beta.NetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.NetworkConfig.class, + com.google.cloud.backupdr.v1beta.NetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.NetworkConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + network_ = ""; + peeringMode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_NetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.NetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkConfig build() { + com.google.cloud.backupdr.v1beta.NetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkConfig buildPartial() { + com.google.cloud.backupdr.v1beta.NetworkConfig result = + new com.google.cloud.backupdr.v1beta.NetworkConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.NetworkConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.peeringMode_ = peeringMode_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.NetworkConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.NetworkConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.NetworkConfig other) { + if (other == com.google.cloud.backupdr.v1beta.NetworkConfig.getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.peeringMode_ != 0) { + setPeeringModeValue(other.getPeeringModeValue()); + } + 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: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + peeringMode_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 network_ = ""; + + /** + * + * + *
+     * Optional. The resource name of the Google Compute Engine VPC network to
+     * which the ManagementServer instance is connected.
+     * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the Google Compute Engine VPC network to
+     * which the ManagementServer instance is connected.
+     * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The resource name of the Google Compute Engine VPC network to
+     * which the ManagementServer instance is connected.
+     * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the Google Compute Engine VPC network to
+     * which the ManagementServer instance is connected.
+     * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The resource name of the Google Compute Engine VPC network to
+     * which the ManagementServer instance is connected.
+     * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int peeringMode_ = 0; + + /** + * + * + *
+     * Optional. The network connect mode of the ManagementServer instance. For
+     * this version, only PRIVATE_SERVICE_ACCESS is supported.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for peeringMode. + */ + @java.lang.Override + public int getPeeringModeValue() { + return peeringMode_; + } + + /** + * + * + *
+     * Optional. The network connect mode of the ManagementServer instance. For
+     * this version, only PRIVATE_SERVICE_ACCESS is supported.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for peeringMode to set. + * @return This builder for chaining. + */ + public Builder setPeeringModeValue(int value) { + peeringMode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The network connect mode of the ManagementServer instance. For
+     * this version, only PRIVATE_SERVICE_ACCESS is supported.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The peeringMode. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode getPeeringMode() { + com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode result = + com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode.forNumber(peeringMode_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The network connect mode of the ManagementServer instance. For
+     * this version, only PRIVATE_SERVICE_ACCESS is supported.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The peeringMode to set. + * @return This builder for chaining. + */ + public Builder setPeeringMode( + com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + peeringMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The network connect mode of the ManagementServer instance. For
+     * this version, only PRIVATE_SERVICE_ACCESS is supported.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPeeringMode() { + bitField0_ = (bitField0_ & ~0x00000002); + peeringMode_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.NetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.NetworkConfig) + private static final com.google.cloud.backupdr.v1beta.NetworkConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.NetworkConfig(); + } + + public static com.google.cloud.backupdr.v1beta.NetworkConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig 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.backupdr.v1beta.NetworkConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkConfigOrBuilder.java new file mode 100644 index 000000000000..f0badd86a419 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkConfigOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface NetworkConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.NetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The resource name of the Google Compute Engine VPC network to
+   * which the ManagementServer instance is connected.
+   * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + java.lang.String getNetwork(); + + /** + * + * + *
+   * Optional. The resource name of the Google Compute Engine VPC network to
+   * which the ManagementServer instance is connected.
+   * 
+ * + * string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Optional. The network connect mode of the ManagementServer instance. For
+   * this version, only PRIVATE_SERVICE_ACCESS is supported.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for peeringMode. + */ + int getPeeringModeValue(); + + /** + * + * + *
+   * Optional. The network connect mode of the ManagementServer instance. For
+   * this version, only PRIVATE_SERVICE_ACCESS is supported.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode peering_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The peeringMode. + */ + com.google.cloud.backupdr.v1beta.NetworkConfig.PeeringMode getPeeringMode(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkInterface.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkInterface.java new file mode 100644 index 000000000000..4893e7b6f83d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkInterface.java @@ -0,0 +1,5221 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A network interface resource attached to an instance.
+ * s
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.NetworkInterface} + */ +@com.google.protobuf.Generated +public final class NetworkInterface extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.NetworkInterface) + NetworkInterfaceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "NetworkInterface"); + } + + // Use NetworkInterface.newBuilder() to construct. + private NetworkInterface(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NetworkInterface() { + network_ = ""; + subnetwork_ = ""; + ipAddress_ = ""; + ipv6Address_ = ""; + name_ = ""; + accessConfigs_ = java.util.Collections.emptyList(); + ipv6AccessConfigs_ = java.util.Collections.emptyList(); + aliasIpRanges_ = java.util.Collections.emptyList(); + stackType_ = 0; + ipv6AccessType_ = 0; + nicType_ = 0; + networkAttachment_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkInterface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkInterface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.NetworkInterface.class, + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder.class); + } + + /** + * + * + *
+   * Stack type for this network interface.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.NetworkInterface.StackType} + */ + public enum StackType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default should be STACK_TYPE_UNSPECIFIED.
+     * 
+ * + * STACK_TYPE_UNSPECIFIED = 0; + */ + STACK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The network interface will be assigned IPv4 address.
+     * 
+ * + * IPV4_ONLY = 1; + */ + IPV4_ONLY(1), + /** + * + * + *
+     * The network interface can have both IPv4 and IPv6 addresses.
+     * 
+ * + * IPV4_IPV6 = 2; + */ + IPV4_IPV6(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "StackType"); + } + + /** + * + * + *
+     * Default should be STACK_TYPE_UNSPECIFIED.
+     * 
+ * + * STACK_TYPE_UNSPECIFIED = 0; + */ + public static final int STACK_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The network interface will be assigned IPv4 address.
+     * 
+ * + * IPV4_ONLY = 1; + */ + public static final int IPV4_ONLY_VALUE = 1; + + /** + * + * + *
+     * The network interface can have both IPv4 and IPv6 addresses.
+     * 
+ * + * IPV4_IPV6 = 2; + */ + public static final int IPV4_IPV6_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 StackType 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 StackType forNumber(int value) { + switch (value) { + case 0: + return STACK_TYPE_UNSPECIFIED; + case 1: + return IPV4_ONLY; + case 2: + return IPV4_IPV6; + 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 StackType findValueByNumber(int number) { + return StackType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.NetworkInterface.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final StackType[] VALUES = values(); + + public static StackType 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 StackType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.NetworkInterface.StackType) + } + + /** + * + * + *
+   * IPv6 access type for this network interface.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType} + */ + public enum Ipv6AccessType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * IPv6 access type not set. Means this network interface hasn't been
+     * turned on IPv6 yet.
+     * 
+ * + * UNSPECIFIED_IPV6_ACCESS_TYPE = 0; + */ + UNSPECIFIED_IPV6_ACCESS_TYPE(0), + /** + * + * + *
+     * This network interface can have internal IPv6.
+     * 
+ * + * INTERNAL = 1; + */ + INTERNAL(1), + /** + * + * + *
+     * This network interface can have external IPv6.
+     * 
+ * + * EXTERNAL = 2; + */ + EXTERNAL(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Ipv6AccessType"); + } + + /** + * + * + *
+     * IPv6 access type not set. Means this network interface hasn't been
+     * turned on IPv6 yet.
+     * 
+ * + * UNSPECIFIED_IPV6_ACCESS_TYPE = 0; + */ + public static final int UNSPECIFIED_IPV6_ACCESS_TYPE_VALUE = 0; + + /** + * + * + *
+     * This network interface can have internal IPv6.
+     * 
+ * + * INTERNAL = 1; + */ + public static final int INTERNAL_VALUE = 1; + + /** + * + * + *
+     * This network interface can have external IPv6.
+     * 
+ * + * EXTERNAL = 2; + */ + public static final int EXTERNAL_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 Ipv6AccessType 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 Ipv6AccessType forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED_IPV6_ACCESS_TYPE; + case 1: + return INTERNAL; + case 2: + return EXTERNAL; + 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 Ipv6AccessType findValueByNumber(int number) { + return Ipv6AccessType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.NetworkInterface.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final Ipv6AccessType[] VALUES = values(); + + public static Ipv6AccessType 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 Ipv6AccessType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType) + } + + /** + * + * + *
+   * Nic type for this network interface.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.NetworkInterface.NicType} + */ + public enum NicType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default should be NIC_TYPE_UNSPECIFIED.
+     * 
+ * + * NIC_TYPE_UNSPECIFIED = 0; + */ + NIC_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + VIRTIO_NET(1), + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + GVNIC(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "NicType"); + } + + /** + * + * + *
+     * Default should be NIC_TYPE_UNSPECIFIED.
+     * 
+ * + * NIC_TYPE_UNSPECIFIED = 0; + */ + public static final int NIC_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * VIRTIO
+     * 
+ * + * VIRTIO_NET = 1; + */ + public static final int VIRTIO_NET_VALUE = 1; + + /** + * + * + *
+     * GVNIC
+     * 
+ * + * GVNIC = 2; + */ + public static final int GVNIC_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 NicType 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 NicType forNumber(int value) { + switch (value) { + case 0: + return NIC_TYPE_UNSPECIFIED; + case 1: + return VIRTIO_NET; + case 2: + return GVNIC; + 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 NicType findValueByNumber(int number) { + return NicType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.NetworkInterface.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final NicType[] VALUES = values(); + + public static NicType 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 NicType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.NetworkInterface.NicType) + } + + private int bitField0_; + public static final int NETWORK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + + /** + * + * + *
+   * Optional. URL of the VPC network resource for this instance.
+   * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. URL of the VPC network resource for this instance.
+   * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. URL of the VPC network resource for this instance.
+   * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNETWORK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object subnetwork_ = ""; + + /** + * + * + *
+   * Optional. The URL of the Subnetwork resource for this instance.
+   * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the subnetwork field is set. + */ + @java.lang.Override + public boolean hasSubnetwork() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The URL of the Subnetwork resource for this instance.
+   * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + 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(); + subnetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The URL of the Subnetwork resource for this instance.
+   * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + + /** + * + * + *
+   * Optional. An IPv4 internal IP address to assign to the instance for this
+   * network interface. If not specified by the user, an unused internal IP is
+   * assigned by the system.
+   * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return Whether the ipAddress field is set. + */ + @java.lang.Override + public boolean hasIpAddress() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. An IPv4 internal IP address to assign to the instance for this
+   * network interface. If not specified by the user, an unused internal IP is
+   * assigned by the system.
+   * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + 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(); + ipAddress_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An IPv4 internal IP address to assign to the instance for this
+   * network interface. If not specified by the user, an unused internal IP is
+   * assigned by the system.
+   * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IPV6_ADDRESS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipv6Address_ = ""; + + /** + * + * + *
+   * Optional. An IPv6 internal network address for this network interface. To
+   * use a static internal IP address, it must be unused and in the same region
+   * as the instance's zone. If not specified, Google Cloud will automatically
+   * assign an internal IPv6 address from the instance's subnetwork.
+   * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return Whether the ipv6Address field is set. + */ + @java.lang.Override + public boolean hasIpv6Address() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. An IPv6 internal network address for this network interface. To
+   * use a static internal IP address, it must be unused and in the same region
+   * as the instance's zone. If not specified, Google Cloud will automatically
+   * assign an internal IPv6 address from the instance's subnetwork.
+   * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The ipv6Address. + */ + @java.lang.Override + public java.lang.String getIpv6Address() { + java.lang.Object ref = ipv6Address_; + 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(); + ipv6Address_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An IPv6 internal network address for this network interface. To
+   * use a static internal IP address, it must be unused and in the same region
+   * as the instance's zone. If not specified, Google Cloud will automatically
+   * assign an internal IPv6 address from the instance's subnetwork.
+   * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipv6Address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpv6AddressBytes() { + java.lang.Object ref = ipv6Address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipv6Address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERNAL_IPV6_PREFIX_LENGTH_FIELD_NUMBER = 5; + private int internalIpv6PrefixLength_ = 0; + + /** + * + * + *
+   * Optional. The prefix length of the primary internal IPv6 range.
+   * 
+ * + * optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the internalIpv6PrefixLength field is set. + */ + @java.lang.Override + public boolean hasInternalIpv6PrefixLength() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. The prefix length of the primary internal IPv6 range.
+   * 
+ * + * optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The internalIpv6PrefixLength. + */ + @java.lang.Override + public int getInternalIpv6PrefixLength() { + return internalIpv6PrefixLength_; + } + + public static final int NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. [Output Only] The name of the network interface, which is
+   * generated by the server.
+   * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the name field is set. + */ + @java.lang.Override + public boolean hasName() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Output only. [Output Only] The name of the network interface, which is
+   * generated by the server.
+   * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+   * Output only. [Output Only] The name of the network interface, which is
+   * generated by the server.
+   * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 ACCESS_CONFIGS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List accessConfigs_; + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getAccessConfigsList() { + return accessConfigs_; + } + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAccessConfigsOrBuilderList() { + return accessConfigs_; + } + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAccessConfigsCount() { + return accessConfigs_.size(); + } + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig getAccessConfigs(int index) { + return accessConfigs_.get(index); + } + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder getAccessConfigsOrBuilder( + int index) { + return accessConfigs_.get(index); + } + + public static final int IPV6_ACCESS_CONFIGS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List ipv6AccessConfigs_; + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getIpv6AccessConfigsList() { + return ipv6AccessConfigs_; + } + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getIpv6AccessConfigsOrBuilderList() { + return ipv6AccessConfigs_; + } + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getIpv6AccessConfigsCount() { + return ipv6AccessConfigs_.size(); + } + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfig getIpv6AccessConfigs(int index) { + return ipv6AccessConfigs_.get(index); + } + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder getIpv6AccessConfigsOrBuilder( + int index) { + return ipv6AccessConfigs_.get(index); + } + + public static final int ALIAS_IP_RANGES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List aliasIpRanges_; + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getAliasIpRangesList() { + return aliasIpRanges_; + } + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getAliasIpRangesOrBuilderList() { + return aliasIpRanges_; + } + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAliasIpRangesCount() { + return aliasIpRanges_.size(); + } + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AliasIpRange getAliasIpRanges(int index) { + return aliasIpRanges_.get(index); + } + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AliasIpRangeOrBuilder getAliasIpRangesOrBuilder( + int index) { + return aliasIpRanges_.get(index); + } + + public static final int STACK_TYPE_FIELD_NUMBER = 10; + private int stackType_ = 0; + + /** + * + * + *
+   * The stack type for this network interface.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * @return Whether the stackType field is set. + */ + @java.lang.Override + public boolean hasStackType() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * The stack type for this network interface.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * @return The enum numeric value on the wire for stackType. + */ + @java.lang.Override + public int getStackTypeValue() { + return stackType_; + } + + /** + * + * + *
+   * The stack type for this network interface.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * @return The stackType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface.StackType getStackType() { + com.google.cloud.backupdr.v1beta.NetworkInterface.StackType result = + com.google.cloud.backupdr.v1beta.NetworkInterface.StackType.forNumber(stackType_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkInterface.StackType.UNRECOGNIZED + : result; + } + + public static final int IPV6_ACCESS_TYPE_FIELD_NUMBER = 11; + private int ipv6AccessType_ = 0; + + /** + * + * + *
+   * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+   * IP can be accessed from the Internet. This field is always inherited from
+   * its subnetwork.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipv6AccessType field is set. + */ + @java.lang.Override + public boolean hasIpv6AccessType() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+   * IP can be accessed from the Internet. This field is always inherited from
+   * its subnetwork.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ipv6AccessType. + */ + @java.lang.Override + public int getIpv6AccessTypeValue() { + return ipv6AccessType_; + } + + /** + * + * + *
+   * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+   * IP can be accessed from the Internet. This field is always inherited from
+   * its subnetwork.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipv6AccessType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType getIpv6AccessType() { + com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType result = + com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType.forNumber(ipv6AccessType_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType.UNRECOGNIZED + : result; + } + + public static final int QUEUE_COUNT_FIELD_NUMBER = 12; + private int queueCount_ = 0; + + /** + * + * + *
+   * Optional. The networking queue count that's specified by users for the
+   * network interface. Both Rx and Tx queues will be set to this number. It'll
+   * be empty if not specified by the users.
+   * 
+ * + * optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the queueCount field is set. + */ + @java.lang.Override + public boolean hasQueueCount() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. The networking queue count that's specified by users for the
+   * network interface. Both Rx and Tx queues will be set to this number. It'll
+   * be empty if not specified by the users.
+   * 
+ * + * optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The queueCount. + */ + @java.lang.Override + public int getQueueCount() { + return queueCount_; + } + + public static final int NIC_TYPE_FIELD_NUMBER = 13; + private int nicType_ = 0; + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nicType field is set. + */ + @java.lang.Override + public boolean hasNicType() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface.NicType getNicType() { + com.google.cloud.backupdr.v1beta.NetworkInterface.NicType result = + com.google.cloud.backupdr.v1beta.NetworkInterface.NicType.forNumber(nicType_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkInterface.NicType.UNRECOGNIZED + : result; + } + + public static final int NETWORK_ATTACHMENT_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkAttachment_ = ""; + + /** + * + * + *
+   * Optional. The URL of the network attachment that this interface should
+   * connect to in the following format:
+   * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+   * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the networkAttachment field is set. + */ + @java.lang.Override + public boolean hasNetworkAttachment() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+   * Optional. The URL of the network attachment that this interface should
+   * connect to in the following format:
+   * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+   * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The networkAttachment. + */ + @java.lang.Override + public java.lang.String getNetworkAttachment() { + java.lang.Object ref = networkAttachment_; + 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(); + networkAttachment_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The URL of the network attachment that this interface should
+   * connect to in the following format:
+   * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+   * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for networkAttachment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkAttachmentBytes() { + java.lang.Object ref = networkAttachment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkAttachment_ = 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 (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, network_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, subnetwork_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, ipAddress_); + } + if (((bitField0_ & 0x00000008) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, ipv6Address_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeInt32(5, internalIpv6PrefixLength_); + } + if (((bitField0_ & 0x00000020) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, name_); + } + for (int i = 0; i < accessConfigs_.size(); i++) { + output.writeMessage(7, accessConfigs_.get(i)); + } + for (int i = 0; i < ipv6AccessConfigs_.size(); i++) { + output.writeMessage(8, ipv6AccessConfigs_.get(i)); + } + for (int i = 0; i < aliasIpRanges_.size(); i++) { + output.writeMessage(9, aliasIpRanges_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeEnum(10, stackType_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeEnum(11, ipv6AccessType_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeInt32(12, queueCount_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeEnum(13, nicType_); + } + if (((bitField0_ & 0x00000400) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, networkAttachment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, network_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, subnetwork_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, ipAddress_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, ipv6Address_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, internalIpv6PrefixLength_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, name_); + } + for (int i = 0; i < accessConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, accessConfigs_.get(i)); + } + for (int i = 0; i < ipv6AccessConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, ipv6AccessConfigs_.get(i)); + } + for (int i = 0; i < aliasIpRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, aliasIpRanges_.get(i)); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, stackType_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, ipv6AccessType_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, queueCount_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, nicType_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, networkAttachment_); + } + 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.backupdr.v1beta.NetworkInterface)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.NetworkInterface other = + (com.google.cloud.backupdr.v1beta.NetworkInterface) obj; + + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (hasSubnetwork() != other.hasSubnetwork()) return false; + if (hasSubnetwork()) { + if (!getSubnetwork().equals(other.getSubnetwork())) return false; + } + if (hasIpAddress() != other.hasIpAddress()) return false; + if (hasIpAddress()) { + if (!getIpAddress().equals(other.getIpAddress())) return false; + } + if (hasIpv6Address() != other.hasIpv6Address()) return false; + if (hasIpv6Address()) { + if (!getIpv6Address().equals(other.getIpv6Address())) return false; + } + if (hasInternalIpv6PrefixLength() != other.hasInternalIpv6PrefixLength()) return false; + if (hasInternalIpv6PrefixLength()) { + if (getInternalIpv6PrefixLength() != other.getInternalIpv6PrefixLength()) return false; + } + if (hasName() != other.hasName()) return false; + if (hasName()) { + if (!getName().equals(other.getName())) return false; + } + if (!getAccessConfigsList().equals(other.getAccessConfigsList())) return false; + if (!getIpv6AccessConfigsList().equals(other.getIpv6AccessConfigsList())) return false; + if (!getAliasIpRangesList().equals(other.getAliasIpRangesList())) return false; + if (hasStackType() != other.hasStackType()) return false; + if (hasStackType()) { + if (stackType_ != other.stackType_) return false; + } + if (hasIpv6AccessType() != other.hasIpv6AccessType()) return false; + if (hasIpv6AccessType()) { + if (ipv6AccessType_ != other.ipv6AccessType_) return false; + } + if (hasQueueCount() != other.hasQueueCount()) return false; + if (hasQueueCount()) { + if (getQueueCount() != other.getQueueCount()) return false; + } + if (hasNicType() != other.hasNicType()) return false; + if (hasNicType()) { + if (nicType_ != other.nicType_) return false; + } + if (hasNetworkAttachment() != other.hasNetworkAttachment()) return false; + if (hasNetworkAttachment()) { + if (!getNetworkAttachment().equals(other.getNetworkAttachment())) 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 (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (hasSubnetwork()) { + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + } + if (hasIpAddress()) { + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + } + if (hasIpv6Address()) { + hash = (37 * hash) + IPV6_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpv6Address().hashCode(); + } + if (hasInternalIpv6PrefixLength()) { + hash = (37 * hash) + INTERNAL_IPV6_PREFIX_LENGTH_FIELD_NUMBER; + hash = (53 * hash) + getInternalIpv6PrefixLength(); + } + if (hasName()) { + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + } + if (getAccessConfigsCount() > 0) { + hash = (37 * hash) + ACCESS_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getAccessConfigsList().hashCode(); + } + if (getIpv6AccessConfigsCount() > 0) { + hash = (37 * hash) + IPV6_ACCESS_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getIpv6AccessConfigsList().hashCode(); + } + if (getAliasIpRangesCount() > 0) { + hash = (37 * hash) + ALIAS_IP_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getAliasIpRangesList().hashCode(); + } + if (hasStackType()) { + hash = (37 * hash) + STACK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + stackType_; + } + if (hasIpv6AccessType()) { + hash = (37 * hash) + IPV6_ACCESS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + ipv6AccessType_; + } + if (hasQueueCount()) { + hash = (37 * hash) + QUEUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getQueueCount(); + } + if (hasNicType()) { + hash = (37 * hash) + NIC_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nicType_; + } + if (hasNetworkAttachment()) { + hash = (37 * hash) + NETWORK_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getNetworkAttachment().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface 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.backupdr.v1beta.NetworkInterface parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface 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.backupdr.v1beta.NetworkInterface parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.NetworkInterface 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A network interface resource attached to an instance.
+   * s
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.NetworkInterface} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.NetworkInterface) + com.google.cloud.backupdr.v1beta.NetworkInterfaceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkInterface_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkInterface_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.NetworkInterface.class, + com.google.cloud.backupdr.v1beta.NetworkInterface.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.NetworkInterface.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + network_ = ""; + subnetwork_ = ""; + ipAddress_ = ""; + ipv6Address_ = ""; + internalIpv6PrefixLength_ = 0; + name_ = ""; + if (accessConfigsBuilder_ == null) { + accessConfigs_ = java.util.Collections.emptyList(); + } else { + accessConfigs_ = null; + accessConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (ipv6AccessConfigsBuilder_ == null) { + ipv6AccessConfigs_ = java.util.Collections.emptyList(); + } else { + ipv6AccessConfigs_ = null; + ipv6AccessConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (aliasIpRangesBuilder_ == null) { + aliasIpRanges_ = java.util.Collections.emptyList(); + } else { + aliasIpRanges_ = null; + aliasIpRangesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + stackType_ = 0; + ipv6AccessType_ = 0; + queueCount_ = 0; + nicType_ = 0; + networkAttachment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkInterface_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.NetworkInterface.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface build() { + com.google.cloud.backupdr.v1beta.NetworkInterface result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface buildPartial() { + com.google.cloud.backupdr.v1beta.NetworkInterface result = + new com.google.cloud.backupdr.v1beta.NetworkInterface(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.NetworkInterface result) { + if (accessConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + accessConfigs_ = java.util.Collections.unmodifiableList(accessConfigs_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.accessConfigs_ = accessConfigs_; + } else { + result.accessConfigs_ = accessConfigsBuilder_.build(); + } + if (ipv6AccessConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + ipv6AccessConfigs_ = java.util.Collections.unmodifiableList(ipv6AccessConfigs_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.ipv6AccessConfigs_ = ipv6AccessConfigs_; + } else { + result.ipv6AccessConfigs_ = ipv6AccessConfigsBuilder_.build(); + } + if (aliasIpRangesBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + aliasIpRanges_ = java.util.Collections.unmodifiableList(aliasIpRanges_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.aliasIpRanges_ = aliasIpRanges_; + } else { + result.aliasIpRanges_ = aliasIpRangesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.NetworkInterface result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.network_ = network_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subnetwork_ = subnetwork_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ipAddress_ = ipAddress_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ipv6Address_ = ipv6Address_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.internalIpv6PrefixLength_ = internalIpv6PrefixLength_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.name_ = name_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.stackType_ = stackType_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.ipv6AccessType_ = ipv6AccessType_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.queueCount_ = queueCount_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.nicType_ = nicType_; + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.networkAttachment_ = networkAttachment_; + to_bitField0_ |= 0x00000400; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.NetworkInterface) { + return mergeFrom((com.google.cloud.backupdr.v1beta.NetworkInterface) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.NetworkInterface other) { + if (other == com.google.cloud.backupdr.v1beta.NetworkInterface.getDefaultInstance()) + return this; + if (other.hasNetwork()) { + network_ = other.network_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSubnetwork()) { + subnetwork_ = other.subnetwork_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasIpAddress()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasIpv6Address()) { + ipv6Address_ = other.ipv6Address_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasInternalIpv6PrefixLength()) { + setInternalIpv6PrefixLength(other.getInternalIpv6PrefixLength()); + } + if (other.hasName()) { + name_ = other.name_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (accessConfigsBuilder_ == null) { + if (!other.accessConfigs_.isEmpty()) { + if (accessConfigs_.isEmpty()) { + accessConfigs_ = other.accessConfigs_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureAccessConfigsIsMutable(); + accessConfigs_.addAll(other.accessConfigs_); + } + onChanged(); + } + } else { + if (!other.accessConfigs_.isEmpty()) { + if (accessConfigsBuilder_.isEmpty()) { + accessConfigsBuilder_.dispose(); + accessConfigsBuilder_ = null; + accessConfigs_ = other.accessConfigs_; + bitField0_ = (bitField0_ & ~0x00000040); + accessConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAccessConfigsFieldBuilder() + : null; + } else { + accessConfigsBuilder_.addAllMessages(other.accessConfigs_); + } + } + } + if (ipv6AccessConfigsBuilder_ == null) { + if (!other.ipv6AccessConfigs_.isEmpty()) { + if (ipv6AccessConfigs_.isEmpty()) { + ipv6AccessConfigs_ = other.ipv6AccessConfigs_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.addAll(other.ipv6AccessConfigs_); + } + onChanged(); + } + } else { + if (!other.ipv6AccessConfigs_.isEmpty()) { + if (ipv6AccessConfigsBuilder_.isEmpty()) { + ipv6AccessConfigsBuilder_.dispose(); + ipv6AccessConfigsBuilder_ = null; + ipv6AccessConfigs_ = other.ipv6AccessConfigs_; + bitField0_ = (bitField0_ & ~0x00000080); + ipv6AccessConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetIpv6AccessConfigsFieldBuilder() + : null; + } else { + ipv6AccessConfigsBuilder_.addAllMessages(other.ipv6AccessConfigs_); + } + } + } + if (aliasIpRangesBuilder_ == null) { + if (!other.aliasIpRanges_.isEmpty()) { + if (aliasIpRanges_.isEmpty()) { + aliasIpRanges_ = other.aliasIpRanges_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.addAll(other.aliasIpRanges_); + } + onChanged(); + } + } else { + if (!other.aliasIpRanges_.isEmpty()) { + if (aliasIpRangesBuilder_.isEmpty()) { + aliasIpRangesBuilder_.dispose(); + aliasIpRangesBuilder_ = null; + aliasIpRanges_ = other.aliasIpRanges_; + bitField0_ = (bitField0_ & ~0x00000100); + aliasIpRangesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAliasIpRangesFieldBuilder() + : null; + } else { + aliasIpRangesBuilder_.addAllMessages(other.aliasIpRanges_); + } + } + } + if (other.hasStackType()) { + setStackTypeValue(other.getStackTypeValue()); + } + if (other.hasIpv6AccessType()) { + setIpv6AccessTypeValue(other.getIpv6AccessTypeValue()); + } + if (other.hasQueueCount()) { + setQueueCount(other.getQueueCount()); + } + if (other.hasNicType()) { + setNicTypeValue(other.getNicTypeValue()); + } + if (other.hasNetworkAttachment()) { + networkAttachment_ = other.networkAttachment_; + bitField0_ |= 0x00002000; + 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: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + ipv6Address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + internalIpv6PrefixLength_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.cloud.backupdr.v1beta.AccessConfig m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AccessConfig.parser(), extensionRegistry); + if (accessConfigsBuilder_ == null) { + ensureAccessConfigsIsMutable(); + accessConfigs_.add(m); + } else { + accessConfigsBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + com.google.cloud.backupdr.v1beta.AccessConfig m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AccessConfig.parser(), extensionRegistry); + if (ipv6AccessConfigsBuilder_ == null) { + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.add(m); + } else { + ipv6AccessConfigsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + com.google.cloud.backupdr.v1beta.AliasIpRange m = + input.readMessage( + com.google.cloud.backupdr.v1beta.AliasIpRange.parser(), extensionRegistry); + if (aliasIpRangesBuilder_ == null) { + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.add(m); + } else { + aliasIpRangesBuilder_.addMessage(m); + } + break; + } // case 74 + case 80: + { + stackType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: + { + ipv6AccessType_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: + { + queueCount_ = input.readInt32(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: + { + nicType_ = input.readEnum(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 114: + { + networkAttachment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + 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 network_ = ""; + + /** + * + * + *
+     * Optional. URL of the VPC network resource for this instance.
+     * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. URL of the VPC network resource for this instance.
+     * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. URL of the VPC network resource for this instance.
+     * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. URL of the VPC network resource for this instance.
+     * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. URL of the VPC network resource for this instance.
+     * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. URL of the VPC network resource for this instance.
+     * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object subnetwork_ = ""; + + /** + * + * + *
+     * Optional. The URL of the Subnetwork resource for this instance.
+     * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the subnetwork field is set. + */ + public boolean hasSubnetwork() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The URL of the Subnetwork resource for this instance.
+     * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The URL of the Subnetwork resource for this instance.
+     * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The URL of the Subnetwork resource for this instance.
+     * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subnetwork_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URL of the Subnetwork resource for this instance.
+     * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + subnetwork_ = getDefaultInstance().getSubnetwork(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URL of the Subnetwork resource for this instance.
+     * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subnetwork_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object ipAddress_ = ""; + + /** + * + * + *
+     * Optional. An IPv4 internal IP address to assign to the instance for this
+     * network interface. If not specified by the user, an unused internal IP is
+     * assigned by the system.
+     * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return Whether the ipAddress field is set. + */ + public boolean hasIpAddress() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. An IPv4 internal IP address to assign to the instance for this
+     * network interface. If not specified by the user, an unused internal IP is
+     * assigned by the system.
+     * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An IPv4 internal IP address to assign to the instance for this
+     * network interface. If not specified by the user, an unused internal IP is
+     * assigned by the system.
+     * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An IPv4 internal IP address to assign to the instance for this
+     * network interface. If not specified by the user, an unused internal IP is
+     * assigned by the system.
+     * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An IPv4 internal IP address to assign to the instance for this
+     * network interface. If not specified by the user, an unused internal IP is
+     * assigned by the system.
+     * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An IPv4 internal IP address to assign to the instance for this
+     * network interface. If not specified by the user, an unused internal IP is
+     * assigned by the system.
+     * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object ipv6Address_ = ""; + + /** + * + * + *
+     * Optional. An IPv6 internal network address for this network interface. To
+     * use a static internal IP address, it must be unused and in the same region
+     * as the instance's zone. If not specified, Google Cloud will automatically
+     * assign an internal IPv6 address from the instance's subnetwork.
+     * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return Whether the ipv6Address field is set. + */ + public boolean hasIpv6Address() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. An IPv6 internal network address for this network interface. To
+     * use a static internal IP address, it must be unused and in the same region
+     * as the instance's zone. If not specified, Google Cloud will automatically
+     * assign an internal IPv6 address from the instance's subnetwork.
+     * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The ipv6Address. + */ + public java.lang.String getIpv6Address() { + java.lang.Object ref = ipv6Address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipv6Address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An IPv6 internal network address for this network interface. To
+     * use a static internal IP address, it must be unused and in the same region
+     * as the instance's zone. If not specified, Google Cloud will automatically
+     * assign an internal IPv6 address from the instance's subnetwork.
+     * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipv6Address. + */ + public com.google.protobuf.ByteString getIpv6AddressBytes() { + java.lang.Object ref = ipv6Address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipv6Address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An IPv6 internal network address for this network interface. To
+     * use a static internal IP address, it must be unused and in the same region
+     * as the instance's zone. If not specified, Google Cloud will automatically
+     * assign an internal IPv6 address from the instance's subnetwork.
+     * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The ipv6Address to set. + * @return This builder for chaining. + */ + public Builder setIpv6Address(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipv6Address_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An IPv6 internal network address for this network interface. To
+     * use a static internal IP address, it must be unused and in the same region
+     * as the instance's zone. If not specified, Google Cloud will automatically
+     * assign an internal IPv6 address from the instance's subnetwork.
+     * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIpv6Address() { + ipv6Address_ = getDefaultInstance().getIpv6Address(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An IPv6 internal network address for this network interface. To
+     * use a static internal IP address, it must be unused and in the same region
+     * as the instance's zone. If not specified, Google Cloud will automatically
+     * assign an internal IPv6 address from the instance's subnetwork.
+     * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for ipv6Address to set. + * @return This builder for chaining. + */ + public Builder setIpv6AddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipv6Address_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int internalIpv6PrefixLength_; + + /** + * + * + *
+     * Optional. The prefix length of the primary internal IPv6 range.
+     * 
+ * + * + * optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the internalIpv6PrefixLength field is set. + */ + @java.lang.Override + public boolean hasInternalIpv6PrefixLength() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The prefix length of the primary internal IPv6 range.
+     * 
+ * + * + * optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The internalIpv6PrefixLength. + */ + @java.lang.Override + public int getInternalIpv6PrefixLength() { + return internalIpv6PrefixLength_; + } + + /** + * + * + *
+     * Optional. The prefix length of the primary internal IPv6 range.
+     * 
+ * + * + * optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The internalIpv6PrefixLength to set. + * @return This builder for chaining. + */ + public Builder setInternalIpv6PrefixLength(int value) { + + internalIpv6PrefixLength_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The prefix length of the primary internal IPv6 range.
+     * 
+ * + * + * optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearInternalIpv6PrefixLength() { + bitField0_ = (bitField0_ & ~0x00000010); + internalIpv6PrefixLength_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. [Output Only] The name of the network interface, which is
+     * generated by the server.
+     * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the name field is set. + */ + public boolean hasName() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. [Output Only] The name of the network interface, which is
+     * generated by the server.
+     * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. [Output Only] The name of the network interface, which is
+     * generated by the server.
+     * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. [Output Only] The name of the network interface, which is
+     * generated by the server.
+     * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output Only] The name of the network interface, which is
+     * generated by the server.
+     * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output Only] The name of the network interface, which is
+     * generated by the server.
+     * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List accessConfigs_ = + java.util.Collections.emptyList(); + + private void ensureAccessConfigsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + accessConfigs_ = + new java.util.ArrayList(accessConfigs_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AccessConfig, + com.google.cloud.backupdr.v1beta.AccessConfig.Builder, + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder> + accessConfigsBuilder_; + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getAccessConfigsList() { + if (accessConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accessConfigs_); + } else { + return accessConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAccessConfigsCount() { + if (accessConfigsBuilder_ == null) { + return accessConfigs_.size(); + } else { + return accessConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfig getAccessConfigs(int index) { + if (accessConfigsBuilder_ == null) { + return accessConfigs_.get(index); + } else { + return accessConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAccessConfigs( + int index, com.google.cloud.backupdr.v1beta.AccessConfig value) { + if (accessConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessConfigsIsMutable(); + accessConfigs_.set(index, value); + onChanged(); + } else { + accessConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAccessConfigs( + int index, com.google.cloud.backupdr.v1beta.AccessConfig.Builder builderForValue) { + if (accessConfigsBuilder_ == null) { + ensureAccessConfigsIsMutable(); + accessConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + accessConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAccessConfigs(com.google.cloud.backupdr.v1beta.AccessConfig value) { + if (accessConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessConfigsIsMutable(); + accessConfigs_.add(value); + onChanged(); + } else { + accessConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAccessConfigs( + int index, com.google.cloud.backupdr.v1beta.AccessConfig value) { + if (accessConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessConfigsIsMutable(); + accessConfigs_.add(index, value); + onChanged(); + } else { + accessConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAccessConfigs( + com.google.cloud.backupdr.v1beta.AccessConfig.Builder builderForValue) { + if (accessConfigsBuilder_ == null) { + ensureAccessConfigsIsMutable(); + accessConfigs_.add(builderForValue.build()); + onChanged(); + } else { + accessConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAccessConfigs( + int index, com.google.cloud.backupdr.v1beta.AccessConfig.Builder builderForValue) { + if (accessConfigsBuilder_ == null) { + ensureAccessConfigsIsMutable(); + accessConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + accessConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAccessConfigs( + java.lang.Iterable values) { + if (accessConfigsBuilder_ == null) { + ensureAccessConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accessConfigs_); + onChanged(); + } else { + accessConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAccessConfigs() { + if (accessConfigsBuilder_ == null) { + accessConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + accessConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAccessConfigs(int index) { + if (accessConfigsBuilder_ == null) { + ensureAccessConfigsIsMutable(); + accessConfigs_.remove(index); + onChanged(); + } else { + accessConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfig.Builder getAccessConfigsBuilder( + int index) { + return internalGetAccessConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder getAccessConfigsOrBuilder( + int index) { + if (accessConfigsBuilder_ == null) { + return accessConfigs_.get(index); + } else { + return accessConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAccessConfigsOrBuilderList() { + if (accessConfigsBuilder_ != null) { + return accessConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accessConfigs_); + } + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfig.Builder addAccessConfigsBuilder() { + return internalGetAccessConfigsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AccessConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfig.Builder addAccessConfigsBuilder( + int index) { + return internalGetAccessConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.AccessConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. An array of configurations for this interface. Currently, only
+     * one access config,ONE_TO_ONE_NAT is supported. If there are no
+     * accessConfigs specified, then this instance will have
+     * no external internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAccessConfigsBuilderList() { + return internalGetAccessConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AccessConfig, + com.google.cloud.backupdr.v1beta.AccessConfig.Builder, + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder> + internalGetAccessConfigsFieldBuilder() { + if (accessConfigsBuilder_ == null) { + accessConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AccessConfig, + com.google.cloud.backupdr.v1beta.AccessConfig.Builder, + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder>( + accessConfigs_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + accessConfigs_ = null; + } + return accessConfigsBuilder_; + } + + private java.util.List ipv6AccessConfigs_ = + java.util.Collections.emptyList(); + + private void ensureIpv6AccessConfigsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + ipv6AccessConfigs_ = + new java.util.ArrayList( + ipv6AccessConfigs_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AccessConfig, + com.google.cloud.backupdr.v1beta.AccessConfig.Builder, + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder> + ipv6AccessConfigsBuilder_; + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getIpv6AccessConfigsList() { + if (ipv6AccessConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ipv6AccessConfigs_); + } else { + return ipv6AccessConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getIpv6AccessConfigsCount() { + if (ipv6AccessConfigsBuilder_ == null) { + return ipv6AccessConfigs_.size(); + } else { + return ipv6AccessConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfig getIpv6AccessConfigs(int index) { + if (ipv6AccessConfigsBuilder_ == null) { + return ipv6AccessConfigs_.get(index); + } else { + return ipv6AccessConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpv6AccessConfigs( + int index, com.google.cloud.backupdr.v1beta.AccessConfig value) { + if (ipv6AccessConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.set(index, value); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpv6AccessConfigs( + int index, com.google.cloud.backupdr.v1beta.AccessConfig.Builder builderForValue) { + if (ipv6AccessConfigsBuilder_ == null) { + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIpv6AccessConfigs(com.google.cloud.backupdr.v1beta.AccessConfig value) { + if (ipv6AccessConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.add(value); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIpv6AccessConfigs( + int index, com.google.cloud.backupdr.v1beta.AccessConfig value) { + if (ipv6AccessConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.add(index, value); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIpv6AccessConfigs( + com.google.cloud.backupdr.v1beta.AccessConfig.Builder builderForValue) { + if (ipv6AccessConfigsBuilder_ == null) { + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.add(builderForValue.build()); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIpv6AccessConfigs( + int index, com.google.cloud.backupdr.v1beta.AccessConfig.Builder builderForValue) { + if (ipv6AccessConfigsBuilder_ == null) { + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllIpv6AccessConfigs( + java.lang.Iterable values) { + if (ipv6AccessConfigsBuilder_ == null) { + ensureIpv6AccessConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipv6AccessConfigs_); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIpv6AccessConfigs() { + if (ipv6AccessConfigsBuilder_ == null) { + ipv6AccessConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeIpv6AccessConfigs(int index) { + if (ipv6AccessConfigsBuilder_ == null) { + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.remove(index); + onChanged(); + } else { + ipv6AccessConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfig.Builder getIpv6AccessConfigsBuilder( + int index) { + return internalGetIpv6AccessConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder getIpv6AccessConfigsOrBuilder( + int index) { + if (ipv6AccessConfigsBuilder_ == null) { + return ipv6AccessConfigs_.get(index); + } else { + return ipv6AccessConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getIpv6AccessConfigsOrBuilderList() { + if (ipv6AccessConfigsBuilder_ != null) { + return ipv6AccessConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ipv6AccessConfigs_); + } + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfig.Builder addIpv6AccessConfigsBuilder() { + return internalGetIpv6AccessConfigsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AccessConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AccessConfig.Builder addIpv6AccessConfigsBuilder( + int index) { + return internalGetIpv6AccessConfigsFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.AccessConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. An array of IPv6 access configurations for this interface.
+     * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+     * is no ipv6AccessConfig specified, then this instance will
+     * have no external IPv6 Internet access.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getIpv6AccessConfigsBuilderList() { + return internalGetIpv6AccessConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AccessConfig, + com.google.cloud.backupdr.v1beta.AccessConfig.Builder, + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder> + internalGetIpv6AccessConfigsFieldBuilder() { + if (ipv6AccessConfigsBuilder_ == null) { + ipv6AccessConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AccessConfig, + com.google.cloud.backupdr.v1beta.AccessConfig.Builder, + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder>( + ipv6AccessConfigs_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + ipv6AccessConfigs_ = null; + } + return ipv6AccessConfigsBuilder_; + } + + private java.util.List aliasIpRanges_ = + java.util.Collections.emptyList(); + + private void ensureAliasIpRangesIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + aliasIpRanges_ = + new java.util.ArrayList(aliasIpRanges_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AliasIpRange, + com.google.cloud.backupdr.v1beta.AliasIpRange.Builder, + com.google.cloud.backupdr.v1beta.AliasIpRangeOrBuilder> + aliasIpRangesBuilder_; + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getAliasIpRangesList() { + if (aliasIpRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(aliasIpRanges_); + } else { + return aliasIpRangesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAliasIpRangesCount() { + if (aliasIpRangesBuilder_ == null) { + return aliasIpRanges_.size(); + } else { + return aliasIpRangesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AliasIpRange getAliasIpRanges(int index) { + if (aliasIpRangesBuilder_ == null) { + return aliasIpRanges_.get(index); + } else { + return aliasIpRangesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAliasIpRanges( + int index, com.google.cloud.backupdr.v1beta.AliasIpRange value) { + if (aliasIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.set(index, value); + onChanged(); + } else { + aliasIpRangesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAliasIpRanges( + int index, com.google.cloud.backupdr.v1beta.AliasIpRange.Builder builderForValue) { + if (aliasIpRangesBuilder_ == null) { + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + aliasIpRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAliasIpRanges(com.google.cloud.backupdr.v1beta.AliasIpRange value) { + if (aliasIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.add(value); + onChanged(); + } else { + aliasIpRangesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAliasIpRanges( + int index, com.google.cloud.backupdr.v1beta.AliasIpRange value) { + if (aliasIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.add(index, value); + onChanged(); + } else { + aliasIpRangesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAliasIpRanges( + com.google.cloud.backupdr.v1beta.AliasIpRange.Builder builderForValue) { + if (aliasIpRangesBuilder_ == null) { + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.add(builderForValue.build()); + onChanged(); + } else { + aliasIpRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAliasIpRanges( + int index, com.google.cloud.backupdr.v1beta.AliasIpRange.Builder builderForValue) { + if (aliasIpRangesBuilder_ == null) { + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + aliasIpRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAliasIpRanges( + java.lang.Iterable values) { + if (aliasIpRangesBuilder_ == null) { + ensureAliasIpRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aliasIpRanges_); + onChanged(); + } else { + aliasIpRangesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAliasIpRanges() { + if (aliasIpRangesBuilder_ == null) { + aliasIpRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + aliasIpRangesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAliasIpRanges(int index) { + if (aliasIpRangesBuilder_ == null) { + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.remove(index); + onChanged(); + } else { + aliasIpRangesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AliasIpRange.Builder getAliasIpRangesBuilder( + int index) { + return internalGetAliasIpRangesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AliasIpRangeOrBuilder getAliasIpRangesOrBuilder( + int index) { + if (aliasIpRangesBuilder_ == null) { + return aliasIpRanges_.get(index); + } else { + return aliasIpRangesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAliasIpRangesOrBuilderList() { + if (aliasIpRangesBuilder_ != null) { + return aliasIpRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aliasIpRanges_); + } + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AliasIpRange.Builder addAliasIpRangesBuilder() { + return internalGetAliasIpRangesFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.AliasIpRange.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.AliasIpRange.Builder addAliasIpRangesBuilder( + int index) { + return internalGetAliasIpRangesFieldBuilder() + .addBuilder(index, com.google.cloud.backupdr.v1beta.AliasIpRange.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. An array of alias IP ranges for this network interface.
+     * You can only specify this field for network interfaces in VPC networks.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAliasIpRangesBuilderList() { + return internalGetAliasIpRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AliasIpRange, + com.google.cloud.backupdr.v1beta.AliasIpRange.Builder, + com.google.cloud.backupdr.v1beta.AliasIpRangeOrBuilder> + internalGetAliasIpRangesFieldBuilder() { + if (aliasIpRangesBuilder_ == null) { + aliasIpRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.AliasIpRange, + com.google.cloud.backupdr.v1beta.AliasIpRange.Builder, + com.google.cloud.backupdr.v1beta.AliasIpRangeOrBuilder>( + aliasIpRanges_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + aliasIpRanges_ = null; + } + return aliasIpRangesBuilder_; + } + + private int stackType_ = 0; + + /** + * + * + *
+     * The stack type for this network interface.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * + * @return Whether the stackType field is set. + */ + @java.lang.Override + public boolean hasStackType() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * The stack type for this network interface.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * + * @return The enum numeric value on the wire for stackType. + */ + @java.lang.Override + public int getStackTypeValue() { + return stackType_; + } + + /** + * + * + *
+     * The stack type for this network interface.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * + * @param value The enum numeric value on the wire for stackType to set. + * @return This builder for chaining. + */ + public Builder setStackTypeValue(int value) { + stackType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * The stack type for this network interface.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * + * @return The stackType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface.StackType getStackType() { + com.google.cloud.backupdr.v1beta.NetworkInterface.StackType result = + com.google.cloud.backupdr.v1beta.NetworkInterface.StackType.forNumber(stackType_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkInterface.StackType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The stack type for this network interface.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * + * @param value The stackType to set. + * @return This builder for chaining. + */ + public Builder setStackType(com.google.cloud.backupdr.v1beta.NetworkInterface.StackType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + stackType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The stack type for this network interface.
+     * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * + * @return This builder for chaining. + */ + public Builder clearStackType() { + bitField0_ = (bitField0_ & ~0x00000200); + stackType_ = 0; + onChanged(); + return this; + } + + private int ipv6AccessType_ = 0; + + /** + * + * + *
+     * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+     * IP can be accessed from the Internet. This field is always inherited from
+     * its subnetwork.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipv6AccessType field is set. + */ + @java.lang.Override + public boolean hasIpv6AccessType() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+     * IP can be accessed from the Internet. This field is always inherited from
+     * its subnetwork.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ipv6AccessType. + */ + @java.lang.Override + public int getIpv6AccessTypeValue() { + return ipv6AccessType_; + } + + /** + * + * + *
+     * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+     * IP can be accessed from the Internet. This field is always inherited from
+     * its subnetwork.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for ipv6AccessType to set. + * @return This builder for chaining. + */ + public Builder setIpv6AccessTypeValue(int value) { + ipv6AccessType_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+     * IP can be accessed from the Internet. This field is always inherited from
+     * its subnetwork.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipv6AccessType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType getIpv6AccessType() { + com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType result = + com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType.forNumber( + ipv6AccessType_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+     * IP can be accessed from the Internet. This field is always inherited from
+     * its subnetwork.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The ipv6AccessType to set. + * @return This builder for chaining. + */ + public Builder setIpv6AccessType( + com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + ipv6AccessType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+     * IP can be accessed from the Internet. This field is always inherited from
+     * its subnetwork.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIpv6AccessType() { + bitField0_ = (bitField0_ & ~0x00000400); + ipv6AccessType_ = 0; + onChanged(); + return this; + } + + private int queueCount_; + + /** + * + * + *
+     * Optional. The networking queue count that's specified by users for the
+     * network interface. Both Rx and Tx queues will be set to this number. It'll
+     * be empty if not specified by the users.
+     * 
+ * + * optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the queueCount field is set. + */ + @java.lang.Override + public boolean hasQueueCount() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Optional. The networking queue count that's specified by users for the
+     * network interface. Both Rx and Tx queues will be set to this number. It'll
+     * be empty if not specified by the users.
+     * 
+ * + * optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The queueCount. + */ + @java.lang.Override + public int getQueueCount() { + return queueCount_; + } + + /** + * + * + *
+     * Optional. The networking queue count that's specified by users for the
+     * network interface. Both Rx and Tx queues will be set to this number. It'll
+     * be empty if not specified by the users.
+     * 
+ * + * optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The queueCount to set. + * @return This builder for chaining. + */ + public Builder setQueueCount(int value) { + + queueCount_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The networking queue count that's specified by users for the
+     * network interface. Both Rx and Tx queues will be set to this number. It'll
+     * be empty if not specified by the users.
+     * 
+ * + * optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearQueueCount() { + bitField0_ = (bitField0_ & ~0x00000800); + queueCount_ = 0; + onChanged(); + return this; + } + + private int nicType_ = 0; + + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nicType field is set. + */ + @java.lang.Override + public boolean hasNicType() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + @java.lang.Override + public int getNicTypeValue() { + return nicType_; + } + + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for nicType to set. + * @return This builder for chaining. + */ + public Builder setNicTypeValue(int value) { + nicType_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkInterface.NicType getNicType() { + com.google.cloud.backupdr.v1beta.NetworkInterface.NicType result = + com.google.cloud.backupdr.v1beta.NetworkInterface.NicType.forNumber(nicType_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkInterface.NicType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The nicType to set. + * @return This builder for chaining. + */ + public Builder setNicType(com.google.cloud.backupdr.v1beta.NetworkInterface.NicType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + nicType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+     * or VirtioNet.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNicType() { + bitField0_ = (bitField0_ & ~0x00001000); + nicType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object networkAttachment_ = ""; + + /** + * + * + *
+     * Optional. The URL of the network attachment that this interface should
+     * connect to in the following format:
+     * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+     * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkAttachment field is set. + */ + public boolean hasNetworkAttachment() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+     * Optional. The URL of the network attachment that this interface should
+     * connect to in the following format:
+     * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+     * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkAttachment. + */ + public java.lang.String getNetworkAttachment() { + java.lang.Object ref = networkAttachment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkAttachment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The URL of the network attachment that this interface should
+     * connect to in the following format:
+     * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+     * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for networkAttachment. + */ + public com.google.protobuf.ByteString getNetworkAttachmentBytes() { + java.lang.Object ref = networkAttachment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The URL of the network attachment that this interface should
+     * connect to in the following format:
+     * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+     * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The networkAttachment to set. + * @return This builder for chaining. + */ + public Builder setNetworkAttachment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkAttachment_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URL of the network attachment that this interface should
+     * connect to in the following format:
+     * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+     * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNetworkAttachment() { + networkAttachment_ = getDefaultInstance().getNetworkAttachment(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URL of the network attachment that this interface should
+     * connect to in the following format:
+     * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+     * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for networkAttachment to set. + * @return This builder for chaining. + */ + public Builder setNetworkAttachmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkAttachment_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.NetworkInterface) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.NetworkInterface) + private static final com.google.cloud.backupdr.v1beta.NetworkInterface DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.NetworkInterface(); + } + + public static com.google.cloud.backupdr.v1beta.NetworkInterface getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkInterface 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.backupdr.v1beta.NetworkInterface getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkInterfaceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkInterfaceOrBuilder.java new file mode 100644 index 000000000000..549249287b92 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkInterfaceOrBuilder.java @@ -0,0 +1,727 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface NetworkInterfaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.NetworkInterface) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. URL of the VPC network resource for this instance.
+   * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + + /** + * + * + *
+   * Optional. URL of the VPC network resource for this instance.
+   * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + java.lang.String getNetwork(); + + /** + * + * + *
+   * Optional. URL of the VPC network resource for this instance.
+   * 
+ * + * optional string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Optional. The URL of the Subnetwork resource for this instance.
+   * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the subnetwork field is set. + */ + boolean hasSubnetwork(); + + /** + * + * + *
+   * Optional. The URL of the Subnetwork resource for this instance.
+   * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + + /** + * + * + *
+   * Optional. The URL of the Subnetwork resource for this instance.
+   * 
+ * + * optional string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString getSubnetworkBytes(); + + /** + * + * + *
+   * Optional. An IPv4 internal IP address to assign to the instance for this
+   * network interface. If not specified by the user, an unused internal IP is
+   * assigned by the system.
+   * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return Whether the ipAddress field is set. + */ + boolean hasIpAddress(); + + /** + * + * + *
+   * Optional. An IPv4 internal IP address to assign to the instance for this
+   * network interface. If not specified by the user, an unused internal IP is
+   * assigned by the system.
+   * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + + /** + * + * + *
+   * Optional. An IPv4 internal IP address to assign to the instance for this
+   * network interface. If not specified by the user, an unused internal IP is
+   * assigned by the system.
+   * 
+ * + * + * optional string ip_address = 3 [json_name = "networkIP", (.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); + + /** + * + * + *
+   * Optional. An IPv6 internal network address for this network interface. To
+   * use a static internal IP address, it must be unused and in the same region
+   * as the instance's zone. If not specified, Google Cloud will automatically
+   * assign an internal IPv6 address from the instance's subnetwork.
+   * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return Whether the ipv6Address field is set. + */ + boolean hasIpv6Address(); + + /** + * + * + *
+   * Optional. An IPv6 internal network address for this network interface. To
+   * use a static internal IP address, it must be unused and in the same region
+   * as the instance's zone. If not specified, Google Cloud will automatically
+   * assign an internal IPv6 address from the instance's subnetwork.
+   * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The ipv6Address. + */ + java.lang.String getIpv6Address(); + + /** + * + * + *
+   * Optional. An IPv6 internal network address for this network interface. To
+   * use a static internal IP address, it must be unused and in the same region
+   * as the instance's zone. If not specified, Google Cloud will automatically
+   * assign an internal IPv6 address from the instance's subnetwork.
+   * 
+ * + * + * optional string ipv6_address = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for ipv6Address. + */ + com.google.protobuf.ByteString getIpv6AddressBytes(); + + /** + * + * + *
+   * Optional. The prefix length of the primary internal IPv6 range.
+   * 
+ * + * optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the internalIpv6PrefixLength field is set. + */ + boolean hasInternalIpv6PrefixLength(); + + /** + * + * + *
+   * Optional. The prefix length of the primary internal IPv6 range.
+   * 
+ * + * optional int32 internal_ipv6_prefix_length = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The internalIpv6PrefixLength. + */ + int getInternalIpv6PrefixLength(); + + /** + * + * + *
+   * Output only. [Output Only] The name of the network interface, which is
+   * generated by the server.
+   * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the name field is set. + */ + boolean hasName(); + + /** + * + * + *
+   * Output only. [Output Only] The name of the network interface, which is
+   * generated by the server.
+   * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. [Output Only] The name of the network interface, which is
+   * generated by the server.
+   * 
+ * + * optional string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getAccessConfigsList(); + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AccessConfig getAccessConfigs(int index); + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAccessConfigsCount(); + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAccessConfigsOrBuilderList(); + + /** + * + * + *
+   * Optional. An array of configurations for this interface. Currently, only
+   * one access config,ONE_TO_ONE_NAT is supported. If there are no
+   * accessConfigs specified, then this instance will have
+   * no external internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig access_configs = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder getAccessConfigsOrBuilder(int index); + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getIpv6AccessConfigsList(); + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AccessConfig getIpv6AccessConfigs(int index); + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getIpv6AccessConfigsCount(); + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getIpv6AccessConfigsOrBuilderList(); + + /** + * + * + *
+   * Optional. An array of IPv6 access configurations for this interface.
+   * Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there
+   * is no ipv6AccessConfig specified, then this instance will
+   * have no external IPv6 Internet access.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AccessConfig ipv6_access_configs = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AccessConfigOrBuilder getIpv6AccessConfigsOrBuilder(int index); + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getAliasIpRangesList(); + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AliasIpRange getAliasIpRanges(int index); + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAliasIpRangesCount(); + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getAliasIpRangesOrBuilderList(); + + /** + * + * + *
+   * Optional. An array of alias IP ranges for this network interface.
+   * You can only specify this field for network interfaces in VPC networks.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.AliasIpRange alias_ip_ranges = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.AliasIpRangeOrBuilder getAliasIpRangesOrBuilder(int index); + + /** + * + * + *
+   * The stack type for this network interface.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * @return Whether the stackType field is set. + */ + boolean hasStackType(); + + /** + * + * + *
+   * The stack type for this network interface.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * @return The enum numeric value on the wire for stackType. + */ + int getStackTypeValue(); + + /** + * + * + *
+   * The stack type for this network interface.
+   * 
+ * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.StackType stack_type = 10; + * + * @return The stackType. + */ + com.google.cloud.backupdr.v1beta.NetworkInterface.StackType getStackType(); + + /** + * + * + *
+   * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+   * IP can be accessed from the Internet. This field is always inherited from
+   * its subnetwork.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipv6AccessType field is set. + */ + boolean hasIpv6AccessType(); + + /** + * + * + *
+   * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+   * IP can be accessed from the Internet. This field is always inherited from
+   * its subnetwork.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for ipv6AccessType. + */ + int getIpv6AccessTypeValue(); + + /** + * + * + *
+   * Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the
+   * IP can be accessed from the Internet. This field is always inherited from
+   * its subnetwork.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType ipv6_access_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipv6AccessType. + */ + com.google.cloud.backupdr.v1beta.NetworkInterface.Ipv6AccessType getIpv6AccessType(); + + /** + * + * + *
+   * Optional. The networking queue count that's specified by users for the
+   * network interface. Both Rx and Tx queues will be set to this number. It'll
+   * be empty if not specified by the users.
+   * 
+ * + * optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the queueCount field is set. + */ + boolean hasQueueCount(); + + /** + * + * + *
+   * Optional. The networking queue count that's specified by users for the
+   * network interface. Both Rx and Tx queues will be set to this number. It'll
+   * be empty if not specified by the users.
+   * 
+ * + * optional int32 queue_count = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The queueCount. + */ + int getQueueCount(); + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nicType field is set. + */ + boolean hasNicType(); + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nicType. + */ + int getNicTypeValue(); + + /** + * + * + *
+   * Optional. The type of vNIC to be used on this interface. This may be gVNIC
+   * or VirtioNet.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkInterface.NicType nic_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nicType. + */ + com.google.cloud.backupdr.v1beta.NetworkInterface.NicType getNicType(); + + /** + * + * + *
+   * Optional. The URL of the network attachment that this interface should
+   * connect to in the following format:
+   * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+   * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the networkAttachment field is set. + */ + boolean hasNetworkAttachment(); + + /** + * + * + *
+   * Optional. The URL of the network attachment that this interface should
+   * connect to in the following format:
+   * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+   * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The networkAttachment. + */ + java.lang.String getNetworkAttachment(); + + /** + * + * + *
+   * Optional. The URL of the network attachment that this interface should
+   * connect to in the following format:
+   * projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}.
+   * 
+ * + * optional string network_attachment = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for networkAttachment. + */ + com.google.protobuf.ByteString getNetworkAttachmentBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkPerformanceConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkPerformanceConfig.java new file mode 100644 index 000000000000..1dac7b6d99cc --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkPerformanceConfig.java @@ -0,0 +1,802 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Network performance configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.NetworkPerformanceConfig} + */ +@com.google.protobuf.Generated +public final class NetworkPerformanceConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.NetworkPerformanceConfig) + NetworkPerformanceConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "NetworkPerformanceConfig"); + } + + // Use NetworkPerformanceConfig.newBuilder() to construct. + private NetworkPerformanceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NetworkPerformanceConfig() { + totalEgressBandwidthTier_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkPerformanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkPerformanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.class, + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Builder.class); + } + + /** + * + * + *
+   * Network performance tier.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier} + */ + public enum Tier implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * This value is unused.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + TIER_UNSPECIFIED(0), + /** + * + * + *
+     * Default network performance config.
+     * 
+ * + * DEFAULT = 1; + */ + DEFAULT(1), + /** + * + * + *
+     * Tier 1 network performance config.
+     * 
+ * + * TIER_1 = 2; + */ + TIER_1(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Tier"); + } + + /** + * + * + *
+     * This value is unused.
+     * 
+ * + * TIER_UNSPECIFIED = 0; + */ + public static final int TIER_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Default network performance config.
+     * 
+ * + * DEFAULT = 1; + */ + public static final int DEFAULT_VALUE = 1; + + /** + * + * + *
+     * Tier 1 network performance config.
+     * 
+ * + * TIER_1 = 2; + */ + public static final int TIER_1_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 Tier 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 Tier forNumber(int value) { + switch (value) { + case 0: + return TIER_UNSPECIFIED; + case 1: + return DEFAULT; + case 2: + return TIER_1; + 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 Tier findValueByNumber(int number) { + return Tier.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Tier[] VALUES = values(); + + public static Tier 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 Tier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier) + } + + private int bitField0_; + public static final int TOTAL_EGRESS_BANDWIDTH_TIER_FIELD_NUMBER = 1; + private int totalEgressBandwidthTier_ = 0; + + /** + * + * + *
+   * Optional. The tier of the total egress bandwidth.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the totalEgressBandwidthTier field is set. + */ + @java.lang.Override + public boolean hasTotalEgressBandwidthTier() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The tier of the total egress bandwidth.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for totalEgressBandwidthTier. + */ + @java.lang.Override + public int getTotalEgressBandwidthTierValue() { + return totalEgressBandwidthTier_; + } + + /** + * + * + *
+   * Optional. The tier of the total egress bandwidth.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The totalEgressBandwidthTier. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier + getTotalEgressBandwidthTier() { + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier result = + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier.forNumber( + totalEgressBandwidthTier_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier.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 (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, totalEgressBandwidthTier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, totalEgressBandwidthTier_); + } + 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.backupdr.v1beta.NetworkPerformanceConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig other = + (com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig) obj; + + if (hasTotalEgressBandwidthTier() != other.hasTotalEgressBandwidthTier()) return false; + if (hasTotalEgressBandwidthTier()) { + if (totalEgressBandwidthTier_ != other.totalEgressBandwidthTier_) 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 (hasTotalEgressBandwidthTier()) { + hash = (37 * hash) + TOTAL_EGRESS_BANDWIDTH_TIER_FIELD_NUMBER; + hash = (53 * hash) + totalEgressBandwidthTier_; + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig 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.backupdr.v1beta.NetworkPerformanceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig 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.backupdr.v1beta.NetworkPerformanceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.NetworkPerformanceConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Network performance configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.NetworkPerformanceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.NetworkPerformanceConfig) + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkPerformanceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkPerformanceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.class, + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + totalEgressBandwidthTier_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_NetworkPerformanceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig build() { + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig buildPartial() { + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig result = + new com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalEgressBandwidthTier_ = totalEgressBandwidthTier_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig other) { + if (other == com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.getDefaultInstance()) + return this; + if (other.hasTotalEgressBandwidthTier()) { + setTotalEgressBandwidthTierValue(other.getTotalEgressBandwidthTierValue()); + } + 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 8: + { + totalEgressBandwidthTier_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 int totalEgressBandwidthTier_ = 0; + + /** + * + * + *
+     * Optional. The tier of the total egress bandwidth.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the totalEgressBandwidthTier field is set. + */ + @java.lang.Override + public boolean hasTotalEgressBandwidthTier() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The tier of the total egress bandwidth.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for totalEgressBandwidthTier. + */ + @java.lang.Override + public int getTotalEgressBandwidthTierValue() { + return totalEgressBandwidthTier_; + } + + /** + * + * + *
+     * Optional. The tier of the total egress bandwidth.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for totalEgressBandwidthTier to set. + * @return This builder for chaining. + */ + public Builder setTotalEgressBandwidthTierValue(int value) { + totalEgressBandwidthTier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The tier of the total egress bandwidth.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The totalEgressBandwidthTier. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier + getTotalEgressBandwidthTier() { + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier result = + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier.forNumber( + totalEgressBandwidthTier_); + return result == null + ? com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The tier of the total egress bandwidth.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The totalEgressBandwidthTier to set. + * @return This builder for chaining. + */ + public Builder setTotalEgressBandwidthTier( + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + totalEgressBandwidthTier_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The tier of the total egress bandwidth.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTotalEgressBandwidthTier() { + bitField0_ = (bitField0_ & ~0x00000001); + totalEgressBandwidthTier_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.NetworkPerformanceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.NetworkPerformanceConfig) + private static final com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig(); + } + + public static com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkPerformanceConfig 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.backupdr.v1beta.NetworkPerformanceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkPerformanceConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkPerformanceConfigOrBuilder.java new file mode 100644 index 000000000000..86eba777d135 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/NetworkPerformanceConfigOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface NetworkPerformanceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.NetworkPerformanceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The tier of the total egress bandwidth.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the totalEgressBandwidthTier field is set. + */ + boolean hasTotalEgressBandwidthTier(); + + /** + * + * + *
+   * Optional. The tier of the total egress bandwidth.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for totalEgressBandwidthTier. + */ + int getTotalEgressBandwidthTierValue(); + + /** + * + * + *
+   * Optional. The tier of the total egress bandwidth.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier total_egress_bandwidth_tier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The totalEgressBandwidthTier. + */ + com.google.cloud.backupdr.v1beta.NetworkPerformanceConfig.Tier getTotalEgressBandwidthTier(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/OperationMetadata.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/OperationMetadata.java new file mode 100644 index 000000000000..f83b46cb4bcd --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/OperationMetadata.java @@ -0,0 +1,2260 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_OperationMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetAdditionalInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.OperationMetadata.class, + com.google.cloud.backupdr.v1beta.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.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 END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + 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(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + 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(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to 'Code.CANCELLED'.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + 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(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDITIONAL_INFO_FIELD_NUMBER = 8; + + private static final class AdditionalInfoDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_OperationMetadata_AdditionalInfoEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField additionalInfo_; + + private com.google.protobuf.MapField + internalGetAdditionalInfo() { + if (additionalInfo_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AdditionalInfoDefaultEntryHolder.defaultEntry); + } + return additionalInfo_; + } + + public int getAdditionalInfoCount() { + return internalGetAdditionalInfo().getMap().size(); + } + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAdditionalInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAdditionalInfo().getMap().containsKey(key); + } + + /** Use {@link #getAdditionalInfoMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAdditionalInfo() { + return getAdditionalInfoMap(); + } + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAdditionalInfoMap() { + return internalGetAdditionalInfo().getMap(); + } + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAdditionalInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAdditionalInfo().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getAdditionalInfoOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAdditionalInfo().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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetAdditionalInfo(), AdditionalInfoDefaultEntryHolder.defaultEntry, 8); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + for (java.util.Map.Entry entry : + internalGetAdditionalInfo().getMap().entrySet()) { + com.google.protobuf.MapEntry additionalInfo__ = + AdditionalInfoDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, additionalInfo__); + } + 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.backupdr.v1beta.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.OperationMetadata other = + (com.google.cloud.backupdr.v1beta.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!internalGetAdditionalInfo().equals(other.internalGetAdditionalInfo())) 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + if (!internalGetAdditionalInfo().getMap().isEmpty()) { + hash = (37 * hash) + ADDITIONAL_INFO_FIELD_NUMBER; + hash = (53 * hash) + internalGetAdditionalInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata 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.backupdr.v1beta.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata 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.backupdr.v1beta.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.OperationMetadata 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.OperationMetadata) + com.google.cloud.backupdr.v1beta.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_OperationMetadata_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetAdditionalInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetMutableAdditionalInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.OperationMetadata.class, + com.google.cloud.backupdr.v1beta.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + internalGetMutableAdditionalInfo().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.OperationMetadata build() { + com.google.cloud.backupdr.v1beta.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.OperationMetadata buildPartial() { + com.google.cloud.backupdr.v1beta.OperationMetadata result = + new com.google.cloud.backupdr.v1beta.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.additionalInfo_ = internalGetAdditionalInfo(); + result.additionalInfo_.makeImmutable(); + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.OperationMetadata) { + return mergeFrom((com.google.cloud.backupdr.v1beta.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.OperationMetadata other) { + if (other == com.google.cloud.backupdr.v1beta.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + internalGetMutableAdditionalInfo().mergeFrom(other.internalGetAdditionalInfo()); + bitField0_ |= 0x00000080; + 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( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry additionalInfo__ = + input.readMessage( + AdditionalInfoDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAdditionalInfo() + .getMutableMap() + .put(additionalInfo__.getKey(), additionalInfo__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to 'Code.CANCELLED'.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to 'Code.CANCELLED'.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have successfully been cancelled
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to 'Code.CANCELLED'.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.MapField additionalInfo_; + + private com.google.protobuf.MapField + internalGetAdditionalInfo() { + if (additionalInfo_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AdditionalInfoDefaultEntryHolder.defaultEntry); + } + return additionalInfo_; + } + + private com.google.protobuf.MapField + internalGetMutableAdditionalInfo() { + if (additionalInfo_ == null) { + additionalInfo_ = + com.google.protobuf.MapField.newMapField(AdditionalInfoDefaultEntryHolder.defaultEntry); + } + if (!additionalInfo_.isMutable()) { + additionalInfo_ = additionalInfo_.copy(); + } + bitField0_ |= 0x00000080; + onChanged(); + return additionalInfo_; + } + + public int getAdditionalInfoCount() { + return internalGetAdditionalInfo().getMap().size(); + } + + /** + * + * + *
+     * Output only. AdditionalInfo contains additional Info related to backup plan
+     * association resource.
+     * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsAdditionalInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAdditionalInfo().getMap().containsKey(key); + } + + /** Use {@link #getAdditionalInfoMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAdditionalInfo() { + return getAdditionalInfoMap(); + } + + /** + * + * + *
+     * Output only. AdditionalInfo contains additional Info related to backup plan
+     * association resource.
+     * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getAdditionalInfoMap() { + return internalGetAdditionalInfo().getMap(); + } + + /** + * + * + *
+     * Output only. AdditionalInfo contains additional Info related to backup plan
+     * association resource.
+     * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAdditionalInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAdditionalInfo().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Output only. AdditionalInfo contains additional Info related to backup plan
+     * association resource.
+     * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getAdditionalInfoOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAdditionalInfo().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAdditionalInfo() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableAdditionalInfo().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Output only. AdditionalInfo contains additional Info related to backup plan
+     * association resource.
+     * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAdditionalInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAdditionalInfo().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAdditionalInfo() { + bitField0_ |= 0x00000080; + return internalGetMutableAdditionalInfo().getMutableMap(); + } + + /** + * + * + *
+     * Output only. AdditionalInfo contains additional Info related to backup plan
+     * association resource.
+     * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAdditionalInfo(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAdditionalInfo().getMutableMap().put(key, value); + bitField0_ |= 0x00000080; + return this; + } + + /** + * + * + *
+     * Output only. AdditionalInfo contains additional Info related to backup plan
+     * association resource.
+     * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllAdditionalInfo(java.util.Map values) { + internalGetMutableAdditionalInfo().getMutableMap().putAll(values); + bitField0_ |= 0x00000080; + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.OperationMetadata) + private static final com.google.cloud.backupdr.v1beta.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.OperationMetadata(); + } + + public static com.google.cloud.backupdr.v1beta.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata 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.backupdr.v1beta.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/OperationMetadataOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..eedbfc6a6735 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/OperationMetadataOrBuilder.java @@ -0,0 +1,308 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have successfully been cancelled
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to 'Code.CANCELLED'.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAdditionalInfoCount(); + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsAdditionalInfo(java.lang.String key); + + /** Use {@link #getAdditionalInfoMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAdditionalInfo(); + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getAdditionalInfoMap(); + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + java.lang.String getAdditionalInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Output only. AdditionalInfo contains additional Info related to backup plan
+   * association resource.
+   * 
+ * + * + * map<string, string> additional_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getAdditionalInfoOrThrow(java.lang.String key); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PitrSettings.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PitrSettings.java new file mode 100644 index 000000000000..ec085bd95699 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PitrSettings.java @@ -0,0 +1,502 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Point in time recovery settings of the backup configuration resource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.PitrSettings} + */ +@com.google.protobuf.Generated +public final class PitrSettings extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.PitrSettings) + PitrSettingsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "PitrSettings"); + } + + // Use PitrSettings.newBuilder() to construct. + private PitrSettings(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PitrSettings() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_PitrSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_PitrSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.PitrSettings.class, + com.google.cloud.backupdr.v1beta.PitrSettings.Builder.class); + } + + public static final int RETENTION_DAYS_FIELD_NUMBER = 1; + private int retentionDays_ = 0; + + /** + * + * + *
+   * Output only. Number of days to retain the backup.
+   * 
+ * + * int32 retention_days = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The retentionDays. + */ + @java.lang.Override + public int getRetentionDays() { + return retentionDays_; + } + + 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 (retentionDays_ != 0) { + output.writeInt32(1, retentionDays_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (retentionDays_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, retentionDays_); + } + 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.backupdr.v1beta.PitrSettings)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.PitrSettings other = + (com.google.cloud.backupdr.v1beta.PitrSettings) obj; + + if (getRetentionDays() != other.getRetentionDays()) 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) + RETENTION_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getRetentionDays(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings 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.backupdr.v1beta.PitrSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings 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.backupdr.v1beta.PitrSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.PitrSettings 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Point in time recovery settings of the backup configuration resource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.PitrSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.PitrSettings) + com.google.cloud.backupdr.v1beta.PitrSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_PitrSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_PitrSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.PitrSettings.class, + com.google.cloud.backupdr.v1beta.PitrSettings.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.PitrSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + retentionDays_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_PitrSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PitrSettings getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.PitrSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PitrSettings build() { + com.google.cloud.backupdr.v1beta.PitrSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PitrSettings buildPartial() { + com.google.cloud.backupdr.v1beta.PitrSettings result = + new com.google.cloud.backupdr.v1beta.PitrSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.PitrSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.retentionDays_ = retentionDays_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.PitrSettings) { + return mergeFrom((com.google.cloud.backupdr.v1beta.PitrSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.PitrSettings other) { + if (other == com.google.cloud.backupdr.v1beta.PitrSettings.getDefaultInstance()) return this; + if (other.getRetentionDays() != 0) { + setRetentionDays(other.getRetentionDays()); + } + 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 8: + { + retentionDays_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + 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 int retentionDays_; + + /** + * + * + *
+     * Output only. Number of days to retain the backup.
+     * 
+ * + * int32 retention_days = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The retentionDays. + */ + @java.lang.Override + public int getRetentionDays() { + return retentionDays_; + } + + /** + * + * + *
+     * Output only. Number of days to retain the backup.
+     * 
+ * + * int32 retention_days = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The retentionDays to set. + * @return This builder for chaining. + */ + public Builder setRetentionDays(int value) { + + retentionDays_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Number of days to retain the backup.
+     * 
+ * + * int32 retention_days = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRetentionDays() { + bitField0_ = (bitField0_ & ~0x00000001); + retentionDays_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.PitrSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.PitrSettings) + private static final com.google.cloud.backupdr.v1beta.PitrSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.PitrSettings(); + } + + public static com.google.cloud.backupdr.v1beta.PitrSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PitrSettings 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.backupdr.v1beta.PitrSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PitrSettingsOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PitrSettingsOrBuilder.java new file mode 100644 index 000000000000..ad94c0df0bf5 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PitrSettingsOrBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface PitrSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.PitrSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Number of days to retain the backup.
+   * 
+ * + * int32 retention_days = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The retentionDays. + */ + int getRetentionDays(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PolicyEvaluationSummary.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PolicyEvaluationSummary.java new file mode 100644 index 000000000000..875ddc81e075 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PolicyEvaluationSummary.java @@ -0,0 +1,712 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * PolicyEvaluationSummary contains the summary of the last run of job that
+ * applies policy to matching resources.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.PolicyEvaluationSummary} + */ +@com.google.protobuf.Generated +public final class PolicyEvaluationSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.PolicyEvaluationSummary) + PolicyEvaluationSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "PolicyEvaluationSummary"); + } + + // Use PolicyEvaluationSummary.newBuilder() to construct. + private PolicyEvaluationSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyEvaluationSummary() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_PolicyEvaluationSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_PolicyEvaluationSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.class, + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.Builder.class); + } + + public static final int MATCHING_RESOURCE_COUNT_FIELD_NUMBER = 1; + private long matchingResourceCount_ = 0L; + + /** + * + * + *
+   * Output only. The number of resources that currently match the policy's
+   * criteria.
+   * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The matchingResourceCount. + */ + @java.lang.Override + public long getMatchingResourceCount() { + return matchingResourceCount_; + } + + public static final int PROTECTED_RESOURCE_COUNT_FIELD_NUMBER = 2; + private long protectedResourceCount_ = 0L; + + /** + * + * + *
+   * Output only. The number of matching resources that are successfully
+   * protected.
+   * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protectedResourceCount. + */ + @java.lang.Override + public long getProtectedResourceCount() { + return protectedResourceCount_; + } + + public static final int FAILED_RESOURCE_COUNT_FIELD_NUMBER = 3; + private long failedResourceCount_ = 0L; + + /** + * + * + *
+   * Output only. The number of matching resources whose protection failed
+   * during job run.
+   * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedResourceCount. + */ + @java.lang.Override + public long getFailedResourceCount() { + return failedResourceCount_; + } + + 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 (matchingResourceCount_ != 0L) { + output.writeInt64(1, matchingResourceCount_); + } + if (protectedResourceCount_ != 0L) { + output.writeInt64(2, protectedResourceCount_); + } + if (failedResourceCount_ != 0L) { + output.writeInt64(3, failedResourceCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (matchingResourceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, matchingResourceCount_); + } + if (protectedResourceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, protectedResourceCount_); + } + if (failedResourceCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, failedResourceCount_); + } + 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.backupdr.v1beta.PolicyEvaluationSummary)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary other = + (com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary) obj; + + if (getMatchingResourceCount() != other.getMatchingResourceCount()) return false; + if (getProtectedResourceCount() != other.getProtectedResourceCount()) return false; + if (getFailedResourceCount() != other.getFailedResourceCount()) 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) + MATCHING_RESOURCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMatchingResourceCount()); + hash = (37 * hash) + PROTECTED_RESOURCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProtectedResourceCount()); + hash = (37 * hash) + FAILED_RESOURCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedResourceCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary 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.backupdr.v1beta.PolicyEvaluationSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary 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.backupdr.v1beta.PolicyEvaluationSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.PolicyEvaluationSummary 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * PolicyEvaluationSummary contains the summary of the last run of job that
+   * applies policy to matching resources.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.PolicyEvaluationSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.PolicyEvaluationSummary) + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_PolicyEvaluationSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_PolicyEvaluationSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.class, + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + matchingResourceCount_ = 0L; + protectedResourceCount_ = 0L; + failedResourceCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_PolicyEvaluationSummary_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary build() { + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary buildPartial() { + com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary result = + new com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.matchingResourceCount_ = matchingResourceCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.protectedResourceCount_ = protectedResourceCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.failedResourceCount_ = failedResourceCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary) { + return mergeFrom((com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary other) { + if (other == com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary.getDefaultInstance()) + return this; + if (other.getMatchingResourceCount() != 0L) { + setMatchingResourceCount(other.getMatchingResourceCount()); + } + if (other.getProtectedResourceCount() != 0L) { + setProtectedResourceCount(other.getProtectedResourceCount()); + } + if (other.getFailedResourceCount() != 0L) { + setFailedResourceCount(other.getFailedResourceCount()); + } + 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 8: + { + matchingResourceCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + protectedResourceCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + failedResourceCount_ = input.readInt64(); + 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 long matchingResourceCount_; + + /** + * + * + *
+     * Output only. The number of resources that currently match the policy's
+     * criteria.
+     * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The matchingResourceCount. + */ + @java.lang.Override + public long getMatchingResourceCount() { + return matchingResourceCount_; + } + + /** + * + * + *
+     * Output only. The number of resources that currently match the policy's
+     * criteria.
+     * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The matchingResourceCount to set. + * @return This builder for chaining. + */ + public Builder setMatchingResourceCount(long value) { + + matchingResourceCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of resources that currently match the policy's
+     * criteria.
+     * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMatchingResourceCount() { + bitField0_ = (bitField0_ & ~0x00000001); + matchingResourceCount_ = 0L; + onChanged(); + return this; + } + + private long protectedResourceCount_; + + /** + * + * + *
+     * Output only. The number of matching resources that are successfully
+     * protected.
+     * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protectedResourceCount. + */ + @java.lang.Override + public long getProtectedResourceCount() { + return protectedResourceCount_; + } + + /** + * + * + *
+     * Output only. The number of matching resources that are successfully
+     * protected.
+     * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The protectedResourceCount to set. + * @return This builder for chaining. + */ + public Builder setProtectedResourceCount(long value) { + + protectedResourceCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of matching resources that are successfully
+     * protected.
+     * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProtectedResourceCount() { + bitField0_ = (bitField0_ & ~0x00000002); + protectedResourceCount_ = 0L; + onChanged(); + return this; + } + + private long failedResourceCount_; + + /** + * + * + *
+     * Output only. The number of matching resources whose protection failed
+     * during job run.
+     * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedResourceCount. + */ + @java.lang.Override + public long getFailedResourceCount() { + return failedResourceCount_; + } + + /** + * + * + *
+     * Output only. The number of matching resources whose protection failed
+     * during job run.
+     * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failedResourceCount to set. + * @return This builder for chaining. + */ + public Builder setFailedResourceCount(long value) { + + failedResourceCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of matching resources whose protection failed
+     * during job run.
+     * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailedResourceCount() { + bitField0_ = (bitField0_ & ~0x00000004); + failedResourceCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.PolicyEvaluationSummary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.PolicyEvaluationSummary) + private static final com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary(); + } + + public static com.google.cloud.backupdr.v1beta.PolicyEvaluationSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyEvaluationSummary 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.backupdr.v1beta.PolicyEvaluationSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PolicyEvaluationSummaryOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PolicyEvaluationSummaryOrBuilder.java new file mode 100644 index 000000000000..c49322586fb6 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/PolicyEvaluationSummaryOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface PolicyEvaluationSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.PolicyEvaluationSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The number of resources that currently match the policy's
+   * criteria.
+   * 
+ * + * int64 matching_resource_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The matchingResourceCount. + */ + long getMatchingResourceCount(); + + /** + * + * + *
+   * Output only. The number of matching resources that are successfully
+   * protected.
+   * 
+ * + * int64 protected_resource_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The protectedResourceCount. + */ + long getProtectedResourceCount(); + + /** + * + * + *
+   * Output only. The number of matching resources whose protection failed
+   * during job run.
+   * 
+ * + * int64 failed_resource_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failedResourceCount. + */ + long getFailedResourceCount(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ProtectionSummaryProto.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ProtectionSummaryProto.java new file mode 100644 index 000000000000..aaf6ae634ee5 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ProtectionSummaryProto.java @@ -0,0 +1,332 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public final class ProtectionSummaryProto extends com.google.protobuf.GeneratedFile { + private ProtectionSummaryProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProtectionSummaryProto"); + } + + 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_backupdr_v1beta_ListResourceBackupConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ListResourceBackupConfigsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_TargetResourceLabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_TargetResourceLabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupConfigDetails_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupConfigDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_PitrSettings_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_PitrSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupDrTemplateConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupDrTemplateConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupDrPlanConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupDrPlanConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupDrPlanRule_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupDrPlanRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_backupdr_v1beta_BackupLocation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_backupdr_v1beta_BackupLocation_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" + + "5google/cloud/backupdr/v1beta/protection_summary.proto\022\034google.cloud.backupdr.v" + + "1beta\032\034google/api/annotations.proto\032\027goo" + + "gle/api/client.proto\032\037google/api/field_b" + + "ehavior.proto\032\033google/api/field_info.pro" + + "to\032\031google/api/resource.proto\032\037google/protobuf/timestamp.proto\"\272\001\n" + + " ListResourceBackupConfigsRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\221\001\n" + + "!ListResourceBackupConfigsResponse\022S\n" + + "\027resource_backup_configs\030\001 \003" + + "(\01322.google.cloud.backupdr.v1beta.ResourceBackupConfig\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\370\006\n" + + "\024ResourceBackupConfig\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" + + "\003uid\030\002 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022\034\n" + + "\017target_resource\030\003 \001(\tB\003\340A\003\022)\n" + + "\034target_resource_display_name\030\004 \001(\tB\003\340A\003\022b\n" + + "\024target_resource_type\030\005 \001(\0162?.google.cloud.backupdr.v1b" + + "eta.ResourceBackupConfig.ResourceTypeB\003\340A\003\022l\n" + + "\026target_resource_labels\030\006 \003(\0132L.goo" + + "gle.cloud.backupdr.v1beta.ResourceBackupConfig.TargetResourceLabelsEntry\022Q\n" + + "\026backup_configs_details\030\007" + + " \003(\01321.google.cloud.backupdr.v1beta.BackupConfigDetails\022\036\n" + + "\021backup_configured\030\010 \001(\010B\003\340A\003\022\024\n" + + "\007vaulted\030\t \001(\010B\003\340A\003\032;\n" + + "\031TargetResourceLabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"\227\001\n" + + "\014ResourceType\022\035\n" + + "\031RESOURCE_TYPE_UNSPECIFIED\020\000\022\026\n" + + "\022CLOUD_SQL_INSTANCE\020\001\022\025\n" + + "\021COMPUTE_ENGINE_VM\020\002\022\027\n" + + "\023COMPUTE_ENGINE_DISK\020\003\022 \n" + + "\034COMPUTE_ENGINE_REGIONAL_DISK\020\004:\267\001\352A\263\001\n" + + ",backupdr.googleapis.com/ResourceBackupConfig\022Vp" + + "rojects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_co" + + "nfig}*\025resourceBackupConfigs2\024resourceBackupConfig\"\272\007\n" + + "\023BackupConfigDetails\022Q\n" + + "\025backup_dr_plan_config\030\n" + + " \001(\01320.google.cloud.backupdr.v1beta.BackupDrPlanConfigH\000\022Y\n" + + "\031backup_dr_template_config\030\013 \001(\01324.googl" + + "e.cloud.backupdr.v1beta.BackupDrTemplateConfigH\000\022!\n" + + "\024backup_config_source\030\001 \001(\tB\003\340A\003\022.\n" + + "!backup_config_source_display_name\030\002 \001(\tB\003\340A\003\022I\n" + + "\004type\030\003 \001(\01626.google.cloud" + + ".backupdr.v1beta.BackupConfigDetails.TypeB\003\340A\003\022K\n" + + "\005state\030\004 \001(\01627.google.cloud.bac" + + "kupdr.v1beta.BackupConfigDetails.StateB\003\340A\003\022F\n\r" + + "pitr_settings\030\005" + + " \001(\0132*.google.cloud.backupdr.v1beta.PitrSettingsB\003\340A\003\022F\n" + + "\035latest_successful_backup_time\030\006" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022 \n" + + "\023applicable_resource\030\007 \001(\tB\003\340A\003\022\031\n" + + "\014backup_vault\030\010 \001(\tB\003\340A\003\022F\n" + + "\020backup_locations\030\014 \003(\0132,.goo" + + "gle.cloud.backupdr.v1beta.BackupLocation\"\227\001\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022$\n" + + " CLOUD_SQL_INSTANCE_BACKUP_CONFIG\020\001\022\"\n" + + "\036COMPUTE_ENGINE_RESOURCE_POLICY\020\002\022\030\n" + + "\024BACKUPDR_BACKUP_PLAN\020\003\022\025\n" + + "\021BACKUPDR_TEMPLATE\020\004\"C\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\014\n" + + "\010INACTIVE\020\002\022\t\n" + + "\005ERROR\020\003B\026\n" + + "\024plan_specific_config\"+\n" + + "\014PitrSettings\022\033\n" + + "\016retention_days\030\001 \001(\005B\003\340A\003\"j\n" + + "\026BackupDrTemplateConfig\022\'\n" + + "\032first_party_management_uri\030\001 \001(\tB\003\340A\003\022\'\n" + + "\032third_party_management_uri\030\002 \001(\tB\003\340A\003\"b\n" + + "\022BackupDrPlanConfig\022L\n" + + "\024backup_dr_plan_rules\030\001" + + " \003(\0132..google.cloud.backupdr.v1beta.BackupDrPlanRule\"n\n" + + "\020BackupDrPlanRule\022\024\n" + + "\007rule_id\030\001 \001(\tB\003\340A\003\022D\n" + + "\033last_successful_backup_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"\273\001\n" + + "\016BackupLocation\022D\n" + + "\004type\030\001" + + " \001(\01621.google.cloud.backupdr.v1beta.BackupLocation.TypeB\003\340A\003\022\030\n" + + "\013location_id\030\002 \001(\tB\003\340A\003\"I\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\t\n" + + "\005ZONAL\020\001\022\014\n" + + "\010REGIONAL\020\002\022\022\n" + + "\016MULTI_REGIONAL\020\0032\206\003\n" + + "\031BackupDrProtectionSummary\022\354\001\n" + + "\031ListResourceBackupConfigs\022>.google.cloud.ba" + + "ckupdr.v1beta.ListResourceBackupConfigsRequest\032?.google.cloud.backupdr.v1beta.Li" + + "stResourceBackupConfigsResponse\"N\332A\006pare" + + "nt\202\323\344\223\002?\022=/v1beta/{parent=projects/*/loc" + + "ations/*}/resourceBackupConfigs\032z\312A\027back" + + "updr.googleapis.com\322A]https://www.google" + + "apis.com/auth/cloud-backupdr,https://www.googleapis.com/auth/cloud-platformB\332\001\n" + + " com.google.cloud.backupdr.v1betaB\026Protec" + + "tionSummaryProtoP\001Z + * RegionDiskTargetEnvironment represents the target environment for the disk. + * + * + * Protobuf type {@code google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment} + */ +@com.google.protobuf.Generated +public final class RegionDiskTargetEnvironment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) + RegionDiskTargetEnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "RegionDiskTargetEnvironment"); + } + + // Use RegionDiskTargetEnvironment.newBuilder() to construct. + private RegionDiskTargetEnvironment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RegionDiskTargetEnvironment() { + project_ = ""; + region_ = ""; + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RegionDiskTargetEnvironment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RegionDiskTargetEnvironment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.class, + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.Builder.class); + } + + private int bitField0_; + public static final int PROJECT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object project_ = ""; + + /** + * + * + *
+   * Required. Target project for the disk.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + @java.lang.Override + public java.lang.String getProject() { + java.lang.Object ref = project_; + 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(); + project_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Target project for the disk.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + + /** + * + * + *
+   * Required. Target region for the disk.
+   * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + 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(); + region_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Target region for the disk.
+   * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLICA_ZONES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList replicaZones_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. Target URLs of the replica zones for the disk.
+   * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the replicaZones. + */ + public com.google.protobuf.ProtocolStringList getReplicaZonesList() { + return replicaZones_; + } + + /** + * + * + *
+   * Required. Target URLs of the replica zones for the disk.
+   * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of replicaZones. + */ + public int getReplicaZonesCount() { + return replicaZones_.size(); + } + + /** + * + * + *
+   * Required. Target URLs of the replica zones for the disk.
+   * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + public java.lang.String getReplicaZones(int index) { + return replicaZones_.get(index); + } + + /** + * + * + *
+   * Required. Target URLs of the replica zones for the disk.
+   * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + public com.google.protobuf.ByteString getReplicaZonesBytes(int index) { + return replicaZones_.getByteString(index); + } + + public static final int USE_PROJECT_SERVICE_ACCOUNT_FIELD_NUMBER = 4; + private boolean useProjectServiceAccount_ = false; + + /** + * + * + *
+   * Optional. Whether to use the project service account for the disk restore.
+   * 
+ * + * optional bool use_project_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + @java.lang.Override + public boolean hasUseProjectServiceAccount() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Whether to use the project service account for the disk restore.
+   * 
+ * + * optional bool use_project_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + @java.lang.Override + public boolean getUseProjectServiceAccount() { + return useProjectServiceAccount_; + } + + 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.GeneratedMessage.isStringEmpty(project_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, project_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, region_); + } + for (int i = 0; i < replicaZones_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, replicaZones_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(4, useProjectServiceAccount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(project_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, project_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, region_); + } + { + int dataSize = 0; + for (int i = 0; i < replicaZones_.size(); i++) { + dataSize += computeStringSizeNoTag(replicaZones_.getRaw(i)); + } + size += dataSize; + size += 1 * getReplicaZonesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, useProjectServiceAccount_); + } + 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.backupdr.v1beta.RegionDiskTargetEnvironment)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment other = + (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) obj; + + if (!getProject().equals(other.getProject())) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (!getReplicaZonesList().equals(other.getReplicaZonesList())) return false; + if (hasUseProjectServiceAccount() != other.hasUseProjectServiceAccount()) return false; + if (hasUseProjectServiceAccount()) { + if (getUseProjectServiceAccount() != other.getUseProjectServiceAccount()) 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) + PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getProject().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + if (getReplicaZonesCount() > 0) { + hash = (37 * hash) + REPLICA_ZONES_FIELD_NUMBER; + hash = (53 * hash) + getReplicaZonesList().hashCode(); + } + if (hasUseProjectServiceAccount()) { + hash = (37 * hash) + USE_PROJECT_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseProjectServiceAccount()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment 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.backupdr.v1beta.RegionDiskTargetEnvironment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment 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.backupdr.v1beta.RegionDiskTargetEnvironment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.RegionDiskTargetEnvironment 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * RegionDiskTargetEnvironment represents the target environment for the disk.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RegionDiskTargetEnvironment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RegionDiskTargetEnvironment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.class, + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + project_ = ""; + region_ = ""; + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + useProjectServiceAccount_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RegionDiskTargetEnvironment_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment build() { + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment buildPartial() { + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment result = + new com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.project_ = project_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.region_ = region_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + replicaZones_.makeImmutable(); + result.replicaZones_ = replicaZones_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.useProjectServiceAccount_ = useProjectServiceAccount_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) { + return mergeFrom((com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment other) { + if (other + == com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.getDefaultInstance()) + return this; + if (!other.getProject().isEmpty()) { + project_ = other.project_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.replicaZones_.isEmpty()) { + if (replicaZones_.isEmpty()) { + replicaZones_ = other.replicaZones_; + bitField0_ |= 0x00000004; + } else { + ensureReplicaZonesIsMutable(); + replicaZones_.addAll(other.replicaZones_); + } + onChanged(); + } + if (other.hasUseProjectServiceAccount()) { + setUseProjectServiceAccount(other.getUseProjectServiceAccount()); + } + 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: + { + project_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReplicaZonesIsMutable(); + replicaZones_.add(s); + break; + } // case 26 + case 32: + { + useProjectServiceAccount_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 project_ = ""; + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + project_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + public com.google.protobuf.ByteString getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The project to set. + * @return This builder for chaining. + */ + public Builder setProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProject() { + project_ = getDefaultInstance().getProject(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target project for the disk.
+     * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for project to set. + * @return This builder for chaining. + */ + public Builder setProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + project_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + + /** + * + * + *
+     * Required. Target region for the disk.
+     * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Target region for the disk.
+     * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Target region for the disk.
+     * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + region_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target region for the disk.
+     * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target region for the disk.
+     * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList replicaZones_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReplicaZonesIsMutable() { + if (!replicaZones_.isModifiable()) { + replicaZones_ = new com.google.protobuf.LazyStringArrayList(replicaZones_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the replicaZones. + */ + public com.google.protobuf.ProtocolStringList getReplicaZonesList() { + replicaZones_.makeImmutable(); + return replicaZones_; + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of replicaZones. + */ + public int getReplicaZonesCount() { + return replicaZones_.size(); + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + public java.lang.String getReplicaZones(int index) { + return replicaZones_.get(index); + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + public com.google.protobuf.ByteString getReplicaZonesBytes(int index) { + return replicaZones_.getByteString(index); + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The replicaZones to set. + * @return This builder for chaining. + */ + public Builder setReplicaZones(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaZonesIsMutable(); + replicaZones_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The replicaZones to add. + * @return This builder for chaining. + */ + public Builder addReplicaZones(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReplicaZonesIsMutable(); + replicaZones_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The replicaZones to add. + * @return This builder for chaining. + */ + public Builder addAllReplicaZones(java.lang.Iterable values) { + ensureReplicaZonesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, replicaZones_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearReplicaZones() { + replicaZones_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Target URLs of the replica zones for the disk.
+     * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the replicaZones to add. + * @return This builder for chaining. + */ + public Builder addReplicaZonesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReplicaZonesIsMutable(); + replicaZones_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean useProjectServiceAccount_; + + /** + * + * + *
+     * Optional. Whether to use the project service account for the disk restore.
+     * 
+ * + * + * optional bool use_project_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + @java.lang.Override + public boolean hasUseProjectServiceAccount() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the disk restore.
+     * 
+ * + * + * optional bool use_project_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + @java.lang.Override + public boolean getUseProjectServiceAccount() { + return useProjectServiceAccount_; + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the disk restore.
+     * 
+ * + * + * optional bool use_project_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The useProjectServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setUseProjectServiceAccount(boolean value) { + + useProjectServiceAccount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether to use the project service account for the disk restore.
+     * 
+ * + * + * optional bool use_project_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearUseProjectServiceAccount() { + bitField0_ = (bitField0_ & ~0x00000008); + useProjectServiceAccount_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) + private static final com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment(); + } + + public static com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RegionDiskTargetEnvironment 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.backupdr.v1beta.RegionDiskTargetEnvironment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RegionDiskTargetEnvironmentOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RegionDiskTargetEnvironmentOrBuilder.java new file mode 100644 index 000000000000..96df4f41be8e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RegionDiskTargetEnvironmentOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface RegionDiskTargetEnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Target project for the disk.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The project. + */ + java.lang.String getProject(); + + /** + * + * + *
+   * Required. Target project for the disk.
+   * 
+ * + * string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for project. + */ + com.google.protobuf.ByteString getProjectBytes(); + + /** + * + * + *
+   * Required. Target region for the disk.
+   * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The region. + */ + java.lang.String getRegion(); + + /** + * + * + *
+   * Required. Target region for the disk.
+   * 
+ * + * string region = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * + * + *
+   * Required. Target URLs of the replica zones for the disk.
+   * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the replicaZones. + */ + java.util.List getReplicaZonesList(); + + /** + * + * + *
+   * Required. Target URLs of the replica zones for the disk.
+   * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of replicaZones. + */ + int getReplicaZonesCount(); + + /** + * + * + *
+   * Required. Target URLs of the replica zones for the disk.
+   * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The replicaZones at the given index. + */ + java.lang.String getReplicaZones(int index); + + /** + * + * + *
+   * Required. Target URLs of the replica zones for the disk.
+   * 
+ * + * repeated string replica_zones = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the replicaZones at the given index. + */ + com.google.protobuf.ByteString getReplicaZonesBytes(int index); + + /** + * + * + *
+   * Optional. Whether to use the project service account for the disk restore.
+   * 
+ * + * optional bool use_project_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the useProjectServiceAccount field is set. + */ + boolean hasUseProjectServiceAccount(); + + /** + * + * + *
+   * Optional. Whether to use the project service account for the disk restore.
+   * 
+ * + * optional bool use_project_service_account = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The useProjectServiceAccount. + */ + boolean getUseProjectServiceAccount(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ResourceBackupConfig.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ResourceBackupConfig.java new file mode 100644 index 000000000000..bb09d7009ff3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ResourceBackupConfig.java @@ -0,0 +1,2840 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ResourceBackupConfig represents a resource along with its backup
+ * configurations.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ResourceBackupConfig} + */ +@com.google.protobuf.Generated +public final class ResourceBackupConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ResourceBackupConfig) + ResourceBackupConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ResourceBackupConfig"); + } + + // Use ResourceBackupConfig.newBuilder() to construct. + private ResourceBackupConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ResourceBackupConfig() { + name_ = ""; + uid_ = ""; + targetResource_ = ""; + targetResourceDisplayName_ = ""; + targetResourceType_ = 0; + backupConfigsDetails_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetTargetResourceLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.class, + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder.class); + } + + /** + * + * + *
+   * The type of the cloud resource.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType} + */ + public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Resource type not set.
+     * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + RESOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 1; + */ + CLOUD_SQL_INSTANCE(1), + /** + * + * + *
+     * Compute Engine VM.
+     * 
+ * + * COMPUTE_ENGINE_VM = 2; + */ + COMPUTE_ENGINE_VM(2), + /** + * + * + *
+     * Compute Engine Disk.
+     * 
+ * + * COMPUTE_ENGINE_DISK = 3; + */ + COMPUTE_ENGINE_DISK(3), + /** + * + * + *
+     * Compute Engine Regional Disk.
+     * 
+ * + * COMPUTE_ENGINE_REGIONAL_DISK = 4; + */ + COMPUTE_ENGINE_REGIONAL_DISK(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ResourceType"); + } + + /** + * + * + *
+     * Resource type not set.
+     * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESOURCE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Cloud SQL instance.
+     * 
+ * + * CLOUD_SQL_INSTANCE = 1; + */ + public static final int CLOUD_SQL_INSTANCE_VALUE = 1; + + /** + * + * + *
+     * Compute Engine VM.
+     * 
+ * + * COMPUTE_ENGINE_VM = 2; + */ + public static final int COMPUTE_ENGINE_VM_VALUE = 2; + + /** + * + * + *
+     * Compute Engine Disk.
+     * 
+ * + * COMPUTE_ENGINE_DISK = 3; + */ + public static final int COMPUTE_ENGINE_DISK_VALUE = 3; + + /** + * + * + *
+     * Compute Engine Regional Disk.
+     * 
+ * + * COMPUTE_ENGINE_REGIONAL_DISK = 4; + */ + public static final int COMPUTE_ENGINE_REGIONAL_DISK_VALUE = 4; + + 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 ResourceType 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 ResourceType forNumber(int value) { + switch (value) { + case 0: + return RESOURCE_TYPE_UNSPECIFIED; + case 1: + return CLOUD_SQL_INSTANCE; + case 2: + return COMPUTE_ENGINE_VM; + case 3: + return COMPUTE_ENGINE_DISK; + case 4: + return COMPUTE_ENGINE_REGIONAL_DISK; + 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 ResourceType findValueByNumber(int number) { + return ResourceType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ResourceBackupConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ResourceType[] VALUES = values(); + + public static ResourceType 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 ResourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the ResourceBackupConfig.
+   * Format:
+   * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+   * 
+ * + * 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 ResourceBackupConfig.
+   * Format:
+   * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+   * 
+ * + * 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 UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The unique identifier of the resource backup config.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The unique identifier of the resource backup config.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_RESOURCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetResource_ = ""; + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the cloud resource that this configuration applies to. Supported
+   * resource types are
+   * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+   * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The targetResource. + */ + @java.lang.Override + public java.lang.String getTargetResource() { + java.lang.Object ref = targetResource_; + 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(); + targetResource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the cloud resource that this configuration applies to. Supported
+   * resource types are
+   * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+   * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for targetResource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetResourceBytes() { + java.lang.Object ref = targetResource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_RESOURCE_DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetResourceDisplayName_ = ""; + + /** + * + * + *
+   * Output only. The human friendly name of the target resource.
+   * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetResourceDisplayName. + */ + @java.lang.Override + public java.lang.String getTargetResourceDisplayName() { + java.lang.Object ref = targetResourceDisplayName_; + 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(); + targetResourceDisplayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The human friendly name of the target resource.
+   * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for targetResourceDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetResourceDisplayNameBytes() { + java.lang.Object ref = targetResourceDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetResourceDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_RESOURCE_TYPE_FIELD_NUMBER = 5; + private int targetResourceType_ = 0; + + /** + * + * + *
+   * Output only. The type of the target resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for targetResourceType. + */ + @java.lang.Override + public int getTargetResourceTypeValue() { + return targetResourceType_; + } + + /** + * + * + *
+   * Output only. The type of the target resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetResourceType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType + getTargetResourceType() { + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType result = + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType.forNumber( + targetResourceType_); + return result == null + ? com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType.UNRECOGNIZED + : result; + } + + public static final int TARGET_RESOURCE_LABELS_FIELD_NUMBER = 6; + + private static final class TargetResourceLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_TargetResourceLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField targetResourceLabels_; + + private com.google.protobuf.MapField + internalGetTargetResourceLabels() { + if (targetResourceLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TargetResourceLabelsDefaultEntryHolder.defaultEntry); + } + return targetResourceLabels_; + } + + public int getTargetResourceLabelsCount() { + return internalGetTargetResourceLabels().getMap().size(); + } + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + @java.lang.Override + public boolean containsTargetResourceLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTargetResourceLabels().getMap().containsKey(key); + } + + /** Use {@link #getTargetResourceLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTargetResourceLabels() { + return getTargetResourceLabelsMap(); + } + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + @java.lang.Override + public java.util.Map getTargetResourceLabelsMap() { + return internalGetTargetResourceLabels().getMap(); + } + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getTargetResourceLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetTargetResourceLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + @java.lang.Override + public java.lang.String getTargetResourceLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetTargetResourceLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int BACKUP_CONFIGS_DETAILS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List + backupConfigsDetails_; + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + @java.lang.Override + public java.util.List + getBackupConfigsDetailsList() { + return backupConfigsDetails_; + } + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + @java.lang.Override + public java.util.List + getBackupConfigsDetailsOrBuilderList() { + return backupConfigsDetails_; + } + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + @java.lang.Override + public int getBackupConfigsDetailsCount() { + return backupConfigsDetails_.size(); + } + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetails getBackupConfigsDetails(int index) { + return backupConfigsDetails_.get(index); + } + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupConfigDetailsOrBuilder + getBackupConfigsDetailsOrBuilder(int index) { + return backupConfigsDetails_.get(index); + } + + public static final int BACKUP_CONFIGURED_FIELD_NUMBER = 8; + private boolean backupConfigured_ = false; + + /** + * + * + *
+   * Output only. Whether the target resource is configured for backup. This is
+   * true if the backup_configs_details is not empty.
+   * 
+ * + * bool backup_configured = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupConfigured. + */ + @java.lang.Override + public boolean getBackupConfigured() { + return backupConfigured_; + } + + public static final int VAULTED_FIELD_NUMBER = 9; + private boolean vaulted_ = false; + + /** + * + * + *
+   * Output only. Whether the target resource is protected by a backup vault.
+   * This is true if the backup_configs_details is not empty and any of the
+   * [ResourceBackupConfig.backup_configs_details][google.cloud.backupdr.v1beta.ResourceBackupConfig.backup_configs_details]
+   * has a backup configuration with
+   * [BackupConfigDetails.backup_vault][google.cloud.backupdr.v1beta.BackupConfigDetails.backup_vault]
+   * set.
+   * 
+ * + * bool vaulted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vaulted. + */ + @java.lang.Override + public boolean getVaulted() { + return vaulted_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetResource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, targetResource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetResourceDisplayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, targetResourceDisplayName_); + } + if (targetResourceType_ + != com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType + .RESOURCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, targetResourceType_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, + internalGetTargetResourceLabels(), + TargetResourceLabelsDefaultEntryHolder.defaultEntry, + 6); + for (int i = 0; i < backupConfigsDetails_.size(); i++) { + output.writeMessage(7, backupConfigsDetails_.get(i)); + } + if (backupConfigured_ != false) { + output.writeBool(8, backupConfigured_); + } + if (vaulted_ != false) { + output.writeBool(9, vaulted_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetResource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, targetResource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetResourceDisplayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, targetResourceDisplayName_); + } + if (targetResourceType_ + != com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType + .RESOURCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, targetResourceType_); + } + for (java.util.Map.Entry entry : + internalGetTargetResourceLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry targetResourceLabels__ = + TargetResourceLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, targetResourceLabels__); + } + for (int i = 0; i < backupConfigsDetails_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, backupConfigsDetails_.get(i)); + } + if (backupConfigured_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, backupConfigured_); + } + if (vaulted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, vaulted_); + } + 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.backupdr.v1beta.ResourceBackupConfig)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ResourceBackupConfig other = + (com.google.cloud.backupdr.v1beta.ResourceBackupConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getTargetResource().equals(other.getTargetResource())) return false; + if (!getTargetResourceDisplayName().equals(other.getTargetResourceDisplayName())) return false; + if (targetResourceType_ != other.targetResourceType_) return false; + if (!internalGetTargetResourceLabels().equals(other.internalGetTargetResourceLabels())) + return false; + if (!getBackupConfigsDetailsList().equals(other.getBackupConfigsDetailsList())) return false; + if (getBackupConfigured() != other.getBackupConfigured()) return false; + if (getVaulted() != other.getVaulted()) 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) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + TARGET_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getTargetResource().hashCode(); + hash = (37 * hash) + TARGET_RESOURCE_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTargetResourceDisplayName().hashCode(); + hash = (37 * hash) + TARGET_RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + targetResourceType_; + if (!internalGetTargetResourceLabels().getMap().isEmpty()) { + hash = (37 * hash) + TARGET_RESOURCE_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetTargetResourceLabels().hashCode(); + } + if (getBackupConfigsDetailsCount() > 0) { + hash = (37 * hash) + BACKUP_CONFIGS_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getBackupConfigsDetailsList().hashCode(); + } + hash = (37 * hash) + BACKUP_CONFIGURED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBackupConfigured()); + hash = (37 * hash) + VAULTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVaulted()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig 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.backupdr.v1beta.ResourceBackupConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig 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.backupdr.v1beta.ResourceBackupConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ResourceBackupConfig 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ResourceBackupConfig represents a resource along with its backup
+   * configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ResourceBackupConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ResourceBackupConfig) + com.google.cloud.backupdr.v1beta.ResourceBackupConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetTargetResourceLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetMutableTargetResourceLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.class, + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ResourceBackupConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + targetResource_ = ""; + targetResourceDisplayName_ = ""; + targetResourceType_ = 0; + internalGetMutableTargetResourceLabels().clear(); + if (backupConfigsDetailsBuilder_ == null) { + backupConfigsDetails_ = java.util.Collections.emptyList(); + } else { + backupConfigsDetails_ = null; + backupConfigsDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + backupConfigured_ = false; + vaulted_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.ProtectionSummaryProto + .internal_static_google_cloud_backupdr_v1beta_ResourceBackupConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ResourceBackupConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig build() { + com.google.cloud.backupdr.v1beta.ResourceBackupConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig buildPartial() { + com.google.cloud.backupdr.v1beta.ResourceBackupConfig result = + new com.google.cloud.backupdr.v1beta.ResourceBackupConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.backupdr.v1beta.ResourceBackupConfig result) { + if (backupConfigsDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + backupConfigsDetails_ = java.util.Collections.unmodifiableList(backupConfigsDetails_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.backupConfigsDetails_ = backupConfigsDetails_; + } else { + result.backupConfigsDetails_ = backupConfigsDetailsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ResourceBackupConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.targetResource_ = targetResource_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.targetResourceDisplayName_ = targetResourceDisplayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.targetResourceType_ = targetResourceType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.targetResourceLabels_ = internalGetTargetResourceLabels(); + result.targetResourceLabels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.backupConfigured_ = backupConfigured_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.vaulted_ = vaulted_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ResourceBackupConfig) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ResourceBackupConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ResourceBackupConfig other) { + if (other == com.google.cloud.backupdr.v1beta.ResourceBackupConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTargetResource().isEmpty()) { + targetResource_ = other.targetResource_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTargetResourceDisplayName().isEmpty()) { + targetResourceDisplayName_ = other.targetResourceDisplayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.targetResourceType_ != 0) { + setTargetResourceTypeValue(other.getTargetResourceTypeValue()); + } + internalGetMutableTargetResourceLabels().mergeFrom(other.internalGetTargetResourceLabels()); + bitField0_ |= 0x00000020; + if (backupConfigsDetailsBuilder_ == null) { + if (!other.backupConfigsDetails_.isEmpty()) { + if (backupConfigsDetails_.isEmpty()) { + backupConfigsDetails_ = other.backupConfigsDetails_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.addAll(other.backupConfigsDetails_); + } + onChanged(); + } + } else { + if (!other.backupConfigsDetails_.isEmpty()) { + if (backupConfigsDetailsBuilder_.isEmpty()) { + backupConfigsDetailsBuilder_.dispose(); + backupConfigsDetailsBuilder_ = null; + backupConfigsDetails_ = other.backupConfigsDetails_; + bitField0_ = (bitField0_ & ~0x00000040); + backupConfigsDetailsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBackupConfigsDetailsFieldBuilder() + : null; + } else { + backupConfigsDetailsBuilder_.addAllMessages(other.backupConfigsDetails_); + } + } + } + if (other.getBackupConfigured() != false) { + setBackupConfigured(other.getBackupConfigured()); + } + if (other.getVaulted() != false) { + setVaulted(other.getVaulted()); + } + 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 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + targetResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + targetResourceDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + targetResourceType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + com.google.protobuf.MapEntry + targetResourceLabels__ = + input.readMessage( + TargetResourceLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableTargetResourceLabels() + .getMutableMap() + .put(targetResourceLabels__.getKey(), targetResourceLabels__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.cloud.backupdr.v1beta.BackupConfigDetails m = + input.readMessage( + com.google.cloud.backupdr.v1beta.BackupConfigDetails.parser(), + extensionRegistry); + if (backupConfigsDetailsBuilder_ == null) { + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.add(m); + } else { + backupConfigsDetailsBuilder_.addMessage(m); + } + break; + } // case 58 + case 64: + { + backupConfigured_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: + { + vaulted_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + 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 ResourceBackupConfig.
+     * Format:
+     * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+     * 
+ * + * 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 ResourceBackupConfig.
+     * Format:
+     * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+     * 
+ * + * 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 ResourceBackupConfig.
+     * Format:
+     * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+     * 
+ * + * 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 ResourceBackupConfig.
+     * Format:
+     * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+     * 
+ * + * 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 ResourceBackupConfig.
+     * Format:
+     * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+     * 
+ * + * 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 java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The unique identifier of the resource backup config.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The unique identifier of the resource backup config.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The unique identifier of the resource backup config.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The unique identifier of the resource backup config.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The unique identifier of the resource backup config.
+     * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object targetResource_ = ""; + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the cloud resource that this configuration applies to. Supported
+     * resource types are
+     * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+     * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The targetResource. + */ + public java.lang.String getTargetResource() { + java.lang.Object ref = targetResource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetResource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the cloud resource that this configuration applies to. Supported
+     * resource types are
+     * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+     * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for targetResource. + */ + public com.google.protobuf.ByteString getTargetResourceBytes() { + java.lang.Object ref = targetResource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetResource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the cloud resource that this configuration applies to. Supported
+     * resource types are
+     * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+     * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The targetResource to set. + * @return This builder for chaining. + */ + public Builder setTargetResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetResource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the cloud resource that this configuration applies to. Supported
+     * resource types are
+     * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+     * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTargetResource() { + targetResource_ = getDefaultInstance().getTargetResource(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the cloud resource that this configuration applies to. Supported
+     * resource types are
+     * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+     * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for targetResource to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetResource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object targetResourceDisplayName_ = ""; + + /** + * + * + *
+     * Output only. The human friendly name of the target resource.
+     * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetResourceDisplayName. + */ + public java.lang.String getTargetResourceDisplayName() { + java.lang.Object ref = targetResourceDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetResourceDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The human friendly name of the target resource.
+     * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for targetResourceDisplayName. + */ + public com.google.protobuf.ByteString getTargetResourceDisplayNameBytes() { + java.lang.Object ref = targetResourceDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetResourceDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The human friendly name of the target resource.
+     * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The targetResourceDisplayName to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetResourceDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The human friendly name of the target resource.
+     * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTargetResourceDisplayName() { + targetResourceDisplayName_ = getDefaultInstance().getTargetResourceDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The human friendly name of the target resource.
+     * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for targetResourceDisplayName to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetResourceDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int targetResourceType_ = 0; + + /** + * + * + *
+     * Output only. The type of the target resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for targetResourceType. + */ + @java.lang.Override + public int getTargetResourceTypeValue() { + return targetResourceType_; + } + + /** + * + * + *
+     * Output only. The type of the target resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for targetResourceType to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceTypeValue(int value) { + targetResourceType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the target resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetResourceType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType + getTargetResourceType() { + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType result = + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType.forNumber( + targetResourceType_); + return result == null + ? com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The type of the target resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The targetResourceType to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceType( + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + targetResourceType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of the target resource.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTargetResourceType() { + bitField0_ = (bitField0_ & ~0x00000010); + targetResourceType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField targetResourceLabels_; + + private com.google.protobuf.MapField + internalGetTargetResourceLabels() { + if (targetResourceLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + TargetResourceLabelsDefaultEntryHolder.defaultEntry); + } + return targetResourceLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableTargetResourceLabels() { + if (targetResourceLabels_ == null) { + targetResourceLabels_ = + com.google.protobuf.MapField.newMapField( + TargetResourceLabelsDefaultEntryHolder.defaultEntry); + } + if (!targetResourceLabels_.isMutable()) { + targetResourceLabels_ = targetResourceLabels_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return targetResourceLabels_; + } + + public int getTargetResourceLabelsCount() { + return internalGetTargetResourceLabels().getMap().size(); + } + + /** + * + * + *
+     * Labels associated with the target resource.
+     * 
+ * + * map<string, string> target_resource_labels = 6; + */ + @java.lang.Override + public boolean containsTargetResourceLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetTargetResourceLabels().getMap().containsKey(key); + } + + /** Use {@link #getTargetResourceLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getTargetResourceLabels() { + return getTargetResourceLabelsMap(); + } + + /** + * + * + *
+     * Labels associated with the target resource.
+     * 
+ * + * map<string, string> target_resource_labels = 6; + */ + @java.lang.Override + public java.util.Map getTargetResourceLabelsMap() { + return internalGetTargetResourceLabels().getMap(); + } + + /** + * + * + *
+     * Labels associated with the target resource.
+     * 
+ * + * map<string, string> target_resource_labels = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getTargetResourceLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetTargetResourceLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Labels associated with the target resource.
+     * 
+ * + * map<string, string> target_resource_labels = 6; + */ + @java.lang.Override + public java.lang.String getTargetResourceLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetTargetResourceLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearTargetResourceLabels() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableTargetResourceLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Labels associated with the target resource.
+     * 
+ * + * map<string, string> target_resource_labels = 6; + */ + public Builder removeTargetResourceLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableTargetResourceLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableTargetResourceLabels() { + bitField0_ |= 0x00000020; + return internalGetMutableTargetResourceLabels().getMutableMap(); + } + + /** + * + * + *
+     * Labels associated with the target resource.
+     * 
+ * + * map<string, string> target_resource_labels = 6; + */ + public Builder putTargetResourceLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableTargetResourceLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + + /** + * + * + *
+     * Labels associated with the target resource.
+     * 
+ * + * map<string, string> target_resource_labels = 6; + */ + public Builder putAllTargetResourceLabels( + java.util.Map values) { + internalGetMutableTargetResourceLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private java.util.List + backupConfigsDetails_ = java.util.Collections.emptyList(); + + private void ensureBackupConfigsDetailsIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + backupConfigsDetails_ = + new java.util.ArrayList( + backupConfigsDetails_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupConfigDetails, + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder, + com.google.cloud.backupdr.v1beta.BackupConfigDetailsOrBuilder> + backupConfigsDetailsBuilder_; + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public java.util.List + getBackupConfigsDetailsList() { + if (backupConfigsDetailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(backupConfigsDetails_); + } else { + return backupConfigsDetailsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public int getBackupConfigsDetailsCount() { + if (backupConfigsDetailsBuilder_ == null) { + return backupConfigsDetails_.size(); + } else { + return backupConfigsDetailsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public com.google.cloud.backupdr.v1beta.BackupConfigDetails getBackupConfigsDetails(int index) { + if (backupConfigsDetailsBuilder_ == null) { + return backupConfigsDetails_.get(index); + } else { + return backupConfigsDetailsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder setBackupConfigsDetails( + int index, com.google.cloud.backupdr.v1beta.BackupConfigDetails value) { + if (backupConfigsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.set(index, value); + onChanged(); + } else { + backupConfigsDetailsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder setBackupConfigsDetails( + int index, com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder builderForValue) { + if (backupConfigsDetailsBuilder_ == null) { + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.set(index, builderForValue.build()); + onChanged(); + } else { + backupConfigsDetailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder addBackupConfigsDetails( + com.google.cloud.backupdr.v1beta.BackupConfigDetails value) { + if (backupConfigsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.add(value); + onChanged(); + } else { + backupConfigsDetailsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder addBackupConfigsDetails( + int index, com.google.cloud.backupdr.v1beta.BackupConfigDetails value) { + if (backupConfigsDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.add(index, value); + onChanged(); + } else { + backupConfigsDetailsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder addBackupConfigsDetails( + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder builderForValue) { + if (backupConfigsDetailsBuilder_ == null) { + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.add(builderForValue.build()); + onChanged(); + } else { + backupConfigsDetailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder addBackupConfigsDetails( + int index, com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder builderForValue) { + if (backupConfigsDetailsBuilder_ == null) { + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.add(index, builderForValue.build()); + onChanged(); + } else { + backupConfigsDetailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder addAllBackupConfigsDetails( + java.lang.Iterable values) { + if (backupConfigsDetailsBuilder_ == null) { + ensureBackupConfigsDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, backupConfigsDetails_); + onChanged(); + } else { + backupConfigsDetailsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder clearBackupConfigsDetails() { + if (backupConfigsDetailsBuilder_ == null) { + backupConfigsDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + backupConfigsDetailsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public Builder removeBackupConfigsDetails(int index) { + if (backupConfigsDetailsBuilder_ == null) { + ensureBackupConfigsDetailsIsMutable(); + backupConfigsDetails_.remove(index); + onChanged(); + } else { + backupConfigsDetailsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder + getBackupConfigsDetailsBuilder(int index) { + return internalGetBackupConfigsDetailsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public com.google.cloud.backupdr.v1beta.BackupConfigDetailsOrBuilder + getBackupConfigsDetailsOrBuilder(int index) { + if (backupConfigsDetailsBuilder_ == null) { + return backupConfigsDetails_.get(index); + } else { + return backupConfigsDetailsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public java.util.List + getBackupConfigsDetailsOrBuilderList() { + if (backupConfigsDetailsBuilder_ != null) { + return backupConfigsDetailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(backupConfigsDetails_); + } + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder + addBackupConfigsDetailsBuilder() { + return internalGetBackupConfigsDetailsFieldBuilder() + .addBuilder(com.google.cloud.backupdr.v1beta.BackupConfigDetails.getDefaultInstance()); + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder + addBackupConfigsDetailsBuilder(int index) { + return internalGetBackupConfigsDetailsFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.BackupConfigDetails.getDefaultInstance()); + } + + /** + * + * + *
+     * Backup configurations applying to the target resource, including those
+     * targeting its related/child resources. For example, backup configuration
+     * applicable to Compute Engine disks will be populated in this field for a
+     * Compute Engine VM which has the disk associated.
+     * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + public java.util.List + getBackupConfigsDetailsBuilderList() { + return internalGetBackupConfigsDetailsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupConfigDetails, + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder, + com.google.cloud.backupdr.v1beta.BackupConfigDetailsOrBuilder> + internalGetBackupConfigsDetailsFieldBuilder() { + if (backupConfigsDetailsBuilder_ == null) { + backupConfigsDetailsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupConfigDetails, + com.google.cloud.backupdr.v1beta.BackupConfigDetails.Builder, + com.google.cloud.backupdr.v1beta.BackupConfigDetailsOrBuilder>( + backupConfigsDetails_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + backupConfigsDetails_ = null; + } + return backupConfigsDetailsBuilder_; + } + + private boolean backupConfigured_; + + /** + * + * + *
+     * Output only. Whether the target resource is configured for backup. This is
+     * true if the backup_configs_details is not empty.
+     * 
+ * + * bool backup_configured = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupConfigured. + */ + @java.lang.Override + public boolean getBackupConfigured() { + return backupConfigured_; + } + + /** + * + * + *
+     * Output only. Whether the target resource is configured for backup. This is
+     * true if the backup_configs_details is not empty.
+     * 
+ * + * bool backup_configured = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The backupConfigured to set. + * @return This builder for chaining. + */ + public Builder setBackupConfigured(boolean value) { + + backupConfigured_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Whether the target resource is configured for backup. This is
+     * true if the backup_configs_details is not empty.
+     * 
+ * + * bool backup_configured = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBackupConfigured() { + bitField0_ = (bitField0_ & ~0x00000080); + backupConfigured_ = false; + onChanged(); + return this; + } + + private boolean vaulted_; + + /** + * + * + *
+     * Output only. Whether the target resource is protected by a backup vault.
+     * This is true if the backup_configs_details is not empty and any of the
+     * [ResourceBackupConfig.backup_configs_details][google.cloud.backupdr.v1beta.ResourceBackupConfig.backup_configs_details]
+     * has a backup configuration with
+     * [BackupConfigDetails.backup_vault][google.cloud.backupdr.v1beta.BackupConfigDetails.backup_vault]
+     * set.
+     * 
+ * + * bool vaulted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vaulted. + */ + @java.lang.Override + public boolean getVaulted() { + return vaulted_; + } + + /** + * + * + *
+     * Output only. Whether the target resource is protected by a backup vault.
+     * This is true if the backup_configs_details is not empty and any of the
+     * [ResourceBackupConfig.backup_configs_details][google.cloud.backupdr.v1beta.ResourceBackupConfig.backup_configs_details]
+     * has a backup configuration with
+     * [BackupConfigDetails.backup_vault][google.cloud.backupdr.v1beta.BackupConfigDetails.backup_vault]
+     * set.
+     * 
+ * + * bool vaulted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The vaulted to set. + * @return This builder for chaining. + */ + public Builder setVaulted(boolean value) { + + vaulted_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Whether the target resource is protected by a backup vault.
+     * This is true if the backup_configs_details is not empty and any of the
+     * [ResourceBackupConfig.backup_configs_details][google.cloud.backupdr.v1beta.ResourceBackupConfig.backup_configs_details]
+     * has a backup configuration with
+     * [BackupConfigDetails.backup_vault][google.cloud.backupdr.v1beta.BackupConfigDetails.backup_vault]
+     * set.
+     * 
+ * + * bool vaulted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVaulted() { + bitField0_ = (bitField0_ & ~0x00000100); + vaulted_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ResourceBackupConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ResourceBackupConfig) + private static final com.google.cloud.backupdr.v1beta.ResourceBackupConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ResourceBackupConfig(); + } + + public static com.google.cloud.backupdr.v1beta.ResourceBackupConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceBackupConfig 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.backupdr.v1beta.ResourceBackupConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ResourceBackupConfigOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ResourceBackupConfigOrBuilder.java new file mode 100644 index 000000000000..014a1ad03dc2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ResourceBackupConfigOrBuilder.java @@ -0,0 +1,353 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/protection_summary.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ResourceBackupConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ResourceBackupConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the ResourceBackupConfig.
+   * Format:
+   * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the ResourceBackupConfig.
+   * Format:
+   * projects/{project}/locations/{location}/resourceBackupConfigs/{uid}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The unique identifier of the resource backup config.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The unique identifier of the resource backup config.
+   * 
+ * + * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the cloud resource that this configuration applies to. Supported
+   * resource types are
+   * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+   * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The targetResource. + */ + java.lang.String getTargetResource(); + + /** + * + * + *
+   * Output only. The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the cloud resource that this configuration applies to. Supported
+   * resource types are
+   * [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType].
+   * 
+ * + * string target_resource = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for targetResource. + */ + com.google.protobuf.ByteString getTargetResourceBytes(); + + /** + * + * + *
+   * Output only. The human friendly name of the target resource.
+   * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetResourceDisplayName. + */ + java.lang.String getTargetResourceDisplayName(); + + /** + * + * + *
+   * Output only. The human friendly name of the target resource.
+   * 
+ * + * string target_resource_display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for targetResourceDisplayName. + */ + com.google.protobuf.ByteString getTargetResourceDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The type of the target resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for targetResourceType. + */ + int getTargetResourceTypeValue(); + + /** + * + * + *
+   * Output only. The type of the target resource.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType target_resource_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The targetResourceType. + */ + com.google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType getTargetResourceType(); + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + int getTargetResourceLabelsCount(); + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + boolean containsTargetResourceLabels(java.lang.String key); + + /** Use {@link #getTargetResourceLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getTargetResourceLabels(); + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + java.util.Map getTargetResourceLabelsMap(); + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + /* nullable */ + java.lang.String getTargetResourceLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Labels associated with the target resource.
+   * 
+ * + * map<string, string> target_resource_labels = 6; + */ + java.lang.String getTargetResourceLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + java.util.List + getBackupConfigsDetailsList(); + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + com.google.cloud.backupdr.v1beta.BackupConfigDetails getBackupConfigsDetails(int index); + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + int getBackupConfigsDetailsCount(); + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + java.util.List + getBackupConfigsDetailsOrBuilderList(); + + /** + * + * + *
+   * Backup configurations applying to the target resource, including those
+   * targeting its related/child resources. For example, backup configuration
+   * applicable to Compute Engine disks will be populated in this field for a
+   * Compute Engine VM which has the disk associated.
+   * 
+ * + * repeated .google.cloud.backupdr.v1beta.BackupConfigDetails backup_configs_details = 7; + * + */ + com.google.cloud.backupdr.v1beta.BackupConfigDetailsOrBuilder getBackupConfigsDetailsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. Whether the target resource is configured for backup. This is
+   * true if the backup_configs_details is not empty.
+   * 
+ * + * bool backup_configured = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The backupConfigured. + */ + boolean getBackupConfigured(); + + /** + * + * + *
+   * Output only. Whether the target resource is protected by a backup vault.
+   * This is true if the backup_configs_details is not empty and any of the
+   * [ResourceBackupConfig.backup_configs_details][google.cloud.backupdr.v1beta.ResourceBackupConfig.backup_configs_details]
+   * has a backup configuration with
+   * [BackupConfigDetails.backup_vault][google.cloud.backupdr.v1beta.BackupConfigDetails.backup_vault]
+   * set.
+   * 
+ * + * bool vaulted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The vaulted. + */ + boolean getVaulted(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupRequest.java new file mode 100644 index 000000000000..8d6293e5239f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupRequest.java @@ -0,0 +1,3209 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for restoring from a Backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RestoreBackupRequest} + */ +@com.google.protobuf.Generated +public final class RestoreBackupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.RestoreBackupRequest) + RestoreBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "RestoreBackupRequest"); + } + + // Use RestoreBackupRequest.newBuilder() to construct. + private RestoreBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RestoreBackupRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RestoreBackupRequest.class, + com.google.cloud.backupdr.v1beta.RestoreBackupRequest.Builder.class); + } + + private int bitField0_; + private int targetEnvironmentCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object targetEnvironment_; + + public enum TargetEnvironmentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COMPUTE_INSTANCE_TARGET_ENVIRONMENT(3), + DISK_TARGET_ENVIRONMENT(5), + REGION_DISK_TARGET_ENVIRONMENT(6), + TARGETENVIRONMENT_NOT_SET(0); + private final int value; + + private TargetEnvironmentCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetEnvironmentCase valueOf(int value) { + return forNumber(value); + } + + public static TargetEnvironmentCase forNumber(int value) { + switch (value) { + case 3: + return COMPUTE_INSTANCE_TARGET_ENVIRONMENT; + case 5: + return DISK_TARGET_ENVIRONMENT; + case 6: + return REGION_DISK_TARGET_ENVIRONMENT; + case 0: + return TARGETENVIRONMENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetEnvironmentCase getTargetEnvironmentCase() { + return TargetEnvironmentCase.forNumber(targetEnvironmentCase_); + } + + private int instancePropertiesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object instanceProperties_; + + public enum InstancePropertiesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + COMPUTE_INSTANCE_RESTORE_PROPERTIES(4), + DISK_RESTORE_PROPERTIES(7), + INSTANCEPROPERTIES_NOT_SET(0); + private final int value; + + private InstancePropertiesCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InstancePropertiesCase valueOf(int value) { + return forNumber(value); + } + + public static InstancePropertiesCase forNumber(int value) { + switch (value) { + case 4: + return COMPUTE_INSTANCE_RESTORE_PROPERTIES; + case 7: + return DISK_RESTORE_PROPERTIES; + case 0: + return INSTANCEPROPERTIES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InstancePropertiesCase getInstancePropertiesCase() { + return InstancePropertiesCase.forNumber(instancePropertiesCase_); + } + + public static final int COMPUTE_INSTANCE_TARGET_ENVIRONMENT_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Compute Engine target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + * + * @return Whether the computeInstanceTargetEnvironment field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceTargetEnvironment() { + return targetEnvironmentCase_ == 3; + } + + /** + * + * + *
+   * Compute Engine target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + * + * @return The computeInstanceTargetEnvironment. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + getComputeInstanceTargetEnvironment() { + if (targetEnvironmentCase_ == 3) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.getDefaultInstance(); + } + + /** + * + * + *
+   * Compute Engine target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironmentOrBuilder + getComputeInstanceTargetEnvironmentOrBuilder() { + if (targetEnvironmentCase_ == 3) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.getDefaultInstance(); + } + + public static final int DISK_TARGET_ENVIRONMENT_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Disk target environment to be used during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + * + * @return Whether the diskTargetEnvironment field is set. + */ + @java.lang.Override + public boolean hasDiskTargetEnvironment() { + return targetEnvironmentCase_ == 5; + } + + /** + * + * + *
+   * Disk target environment to be used during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + * + * @return The diskTargetEnvironment. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskTargetEnvironment getDiskTargetEnvironment() { + if (targetEnvironmentCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance(); + } + + /** + * + * + *
+   * Disk target environment to be used during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskTargetEnvironmentOrBuilder + getDiskTargetEnvironmentOrBuilder() { + if (targetEnvironmentCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance(); + } + + public static final int REGION_DISK_TARGET_ENVIRONMENT_FIELD_NUMBER = 6; + + /** + * + * + *
+   * Region disk target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + * + * @return Whether the regionDiskTargetEnvironment field is set. + */ + @java.lang.Override + public boolean hasRegionDiskTargetEnvironment() { + return targetEnvironmentCase_ == 6; + } + + /** + * + * + *
+   * Region disk target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + * + * @return The regionDiskTargetEnvironment. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment + getRegionDiskTargetEnvironment() { + if (targetEnvironmentCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.getDefaultInstance(); + } + + /** + * + * + *
+   * Region disk target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironmentOrBuilder + getRegionDiskTargetEnvironmentOrBuilder() { + if (targetEnvironmentCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.getDefaultInstance(); + } + + public static final int COMPUTE_INSTANCE_RESTORE_PROPERTIES_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Compute Engine instance properties to be overridden during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + * + * @return Whether the computeInstanceRestoreProperties field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceRestoreProperties() { + return instancePropertiesCase_ == 4; + } + + /** + * + * + *
+   * Compute Engine instance properties to be overridden during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + * + * @return The computeInstanceRestoreProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + getComputeInstanceRestoreProperties() { + if (instancePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + instanceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Compute Engine instance properties to be overridden during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestorePropertiesOrBuilder + getComputeInstanceRestorePropertiesOrBuilder() { + if (instancePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + instanceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.getDefaultInstance(); + } + + public static final int DISK_RESTORE_PROPERTIES_FIELD_NUMBER = 7; + + /** + * + * + *
+   * Disk properties to be overridden during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + * + * @return Whether the diskRestoreProperties field is set. + */ + @java.lang.Override + public boolean hasDiskRestoreProperties() { + return instancePropertiesCase_ == 7; + } + + /** + * + * + *
+   * Disk properties to be overridden during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + * + * @return The diskRestoreProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties getDiskRestoreProperties() { + if (instancePropertiesCase_ == 7) { + return (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) instanceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance(); + } + + /** + * + * + *
+   * Disk properties to be overridden during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestorePropertiesOrBuilder + getDiskRestorePropertiesOrBuilder() { + if (instancePropertiesCase_ == 7) { + return (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) instanceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource name of the Backup instance, in the format
+   * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+   * 
+ * + * + * 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 resource name of the Backup instance, in the format
+   * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLEAR_OVERRIDES_FIELD_MASK_FIELD_NUMBER = 8; + private com.google.protobuf.FieldMask clearOverridesFieldMask_; + + /** + * + * + *
+   * Optional. A field mask used to clear server-side default values
+   * for fields within the `instance_properties` oneof.
+   *
+   * When a field in this mask is cleared, the server will not apply its
+   * default logic (like inheriting a value from the source) for that field.
+   *
+   * The most common current use case is clearing default encryption keys.
+   *
+   * Examples of field mask paths:
+   * - Compute Instance Disks:
+   * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+   * - Single Disk: `disk_restore_properties.disk_encryption_key`
+   * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clearOverridesFieldMask field is set. + */ + @java.lang.Override + public boolean hasClearOverridesFieldMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. A field mask used to clear server-side default values
+   * for fields within the `instance_properties` oneof.
+   *
+   * When a field in this mask is cleared, the server will not apply its
+   * default logic (like inheriting a value from the source) for that field.
+   *
+   * The most common current use case is clearing default encryption keys.
+   *
+   * Examples of field mask paths:
+   * - Compute Instance Disks:
+   * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+   * - Single Disk: `disk_restore_properties.disk_encryption_key`
+   * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clearOverridesFieldMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getClearOverridesFieldMask() { + return clearOverridesFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : clearOverridesFieldMask_; + } + + /** + * + * + *
+   * Optional. A field mask used to clear server-side default values
+   * for fields within the `instance_properties` oneof.
+   *
+   * When a field in this mask is cleared, the server will not apply its
+   * default logic (like inheriting a value from the source) for that field.
+   *
+   * The most common current use case is clearing default encryption keys.
+   *
+   * Examples of field mask paths:
+   * - Compute Instance Disks:
+   * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+   * - Single Disk: `disk_restore_properties.disk_encryption_key`
+   * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getClearOverridesFieldMaskOrBuilder() { + return clearOverridesFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : clearOverridesFieldMask_; + } + + 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (targetEnvironmentCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) targetEnvironment_); + } + if (instancePropertiesCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) instanceProperties_); + } + if (targetEnvironmentCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) targetEnvironment_); + } + if (targetEnvironmentCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) targetEnvironment_); + } + if (instancePropertiesCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) instanceProperties_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getClearOverridesFieldMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (targetEnvironmentCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + targetEnvironment_); + } + if (instancePropertiesCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + instanceProperties_); + } + if (targetEnvironmentCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) targetEnvironment_); + } + if (targetEnvironmentCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) targetEnvironment_); + } + if (instancePropertiesCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) instanceProperties_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getClearOverridesFieldMask()); + } + 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.backupdr.v1beta.RestoreBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.RestoreBackupRequest other = + (com.google.cloud.backupdr.v1beta.RestoreBackupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (hasClearOverridesFieldMask() != other.hasClearOverridesFieldMask()) return false; + if (hasClearOverridesFieldMask()) { + if (!getClearOverridesFieldMask().equals(other.getClearOverridesFieldMask())) return false; + } + if (!getTargetEnvironmentCase().equals(other.getTargetEnvironmentCase())) return false; + switch (targetEnvironmentCase_) { + case 3: + if (!getComputeInstanceTargetEnvironment() + .equals(other.getComputeInstanceTargetEnvironment())) return false; + break; + case 5: + if (!getDiskTargetEnvironment().equals(other.getDiskTargetEnvironment())) return false; + break; + case 6: + if (!getRegionDiskTargetEnvironment().equals(other.getRegionDiskTargetEnvironment())) + return false; + break; + case 0: + default: + } + if (!getInstancePropertiesCase().equals(other.getInstancePropertiesCase())) return false; + switch (instancePropertiesCase_) { + case 4: + if (!getComputeInstanceRestoreProperties() + .equals(other.getComputeInstanceRestoreProperties())) return false; + break; + case 7: + if (!getDiskRestoreProperties().equals(other.getDiskRestoreProperties())) return false; + break; + case 0: + default: + } + 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + if (hasClearOverridesFieldMask()) { + hash = (37 * hash) + CLEAR_OVERRIDES_FIELD_MASK_FIELD_NUMBER; + hash = (53 * hash) + getClearOverridesFieldMask().hashCode(); + } + switch (targetEnvironmentCase_) { + case 3: + hash = (37 * hash) + COMPUTE_INSTANCE_TARGET_ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getComputeInstanceTargetEnvironment().hashCode(); + break; + case 5: + hash = (37 * hash) + DISK_TARGET_ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getDiskTargetEnvironment().hashCode(); + break; + case 6: + hash = (37 * hash) + REGION_DISK_TARGET_ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getRegionDiskTargetEnvironment().hashCode(); + break; + case 0: + default: + } + switch (instancePropertiesCase_) { + case 4: + hash = (37 * hash) + COMPUTE_INSTANCE_RESTORE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getComputeInstanceRestoreProperties().hashCode(); + break; + case 7: + hash = (37 * hash) + DISK_RESTORE_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getDiskRestoreProperties().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest 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.backupdr.v1beta.RestoreBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest 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.backupdr.v1beta.RestoreBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.RestoreBackupRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for restoring from a Backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RestoreBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.RestoreBackupRequest) + com.google.cloud.backupdr.v1beta.RestoreBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RestoreBackupRequest.class, + com.google.cloud.backupdr.v1beta.RestoreBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.RestoreBackupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetClearOverridesFieldMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (computeInstanceTargetEnvironmentBuilder_ != null) { + computeInstanceTargetEnvironmentBuilder_.clear(); + } + if (diskTargetEnvironmentBuilder_ != null) { + diskTargetEnvironmentBuilder_.clear(); + } + if (regionDiskTargetEnvironmentBuilder_ != null) { + regionDiskTargetEnvironmentBuilder_.clear(); + } + if (computeInstanceRestorePropertiesBuilder_ != null) { + computeInstanceRestorePropertiesBuilder_.clear(); + } + if (diskRestorePropertiesBuilder_ != null) { + diskRestorePropertiesBuilder_.clear(); + } + name_ = ""; + requestId_ = ""; + clearOverridesFieldMask_ = null; + if (clearOverridesFieldMaskBuilder_ != null) { + clearOverridesFieldMaskBuilder_.dispose(); + clearOverridesFieldMaskBuilder_ = null; + } + targetEnvironmentCase_ = 0; + targetEnvironment_ = null; + instancePropertiesCase_ = 0; + instanceProperties_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreBackupRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.RestoreBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreBackupRequest build() { + com.google.cloud.backupdr.v1beta.RestoreBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreBackupRequest buildPartial() { + com.google.cloud.backupdr.v1beta.RestoreBackupRequest result = + new com.google.cloud.backupdr.v1beta.RestoreBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.RestoreBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.requestId_ = requestId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.clearOverridesFieldMask_ = + clearOverridesFieldMaskBuilder_ == null + ? clearOverridesFieldMask_ + : clearOverridesFieldMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.RestoreBackupRequest result) { + result.targetEnvironmentCase_ = targetEnvironmentCase_; + result.targetEnvironment_ = this.targetEnvironment_; + if (targetEnvironmentCase_ == 3 && computeInstanceTargetEnvironmentBuilder_ != null) { + result.targetEnvironment_ = computeInstanceTargetEnvironmentBuilder_.build(); + } + if (targetEnvironmentCase_ == 5 && diskTargetEnvironmentBuilder_ != null) { + result.targetEnvironment_ = diskTargetEnvironmentBuilder_.build(); + } + if (targetEnvironmentCase_ == 6 && regionDiskTargetEnvironmentBuilder_ != null) { + result.targetEnvironment_ = regionDiskTargetEnvironmentBuilder_.build(); + } + result.instancePropertiesCase_ = instancePropertiesCase_; + result.instanceProperties_ = this.instanceProperties_; + if (instancePropertiesCase_ == 4 && computeInstanceRestorePropertiesBuilder_ != null) { + result.instanceProperties_ = computeInstanceRestorePropertiesBuilder_.build(); + } + if (instancePropertiesCase_ == 7 && diskRestorePropertiesBuilder_ != null) { + result.instanceProperties_ = diskRestorePropertiesBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.RestoreBackupRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.RestoreBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.RestoreBackupRequest other) { + if (other == com.google.cloud.backupdr.v1beta.RestoreBackupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasClearOverridesFieldMask()) { + mergeClearOverridesFieldMask(other.getClearOverridesFieldMask()); + } + switch (other.getTargetEnvironmentCase()) { + case COMPUTE_INSTANCE_TARGET_ENVIRONMENT: + { + mergeComputeInstanceTargetEnvironment(other.getComputeInstanceTargetEnvironment()); + break; + } + case DISK_TARGET_ENVIRONMENT: + { + mergeDiskTargetEnvironment(other.getDiskTargetEnvironment()); + break; + } + case REGION_DISK_TARGET_ENVIRONMENT: + { + mergeRegionDiskTargetEnvironment(other.getRegionDiskTargetEnvironment()); + break; + } + case TARGETENVIRONMENT_NOT_SET: + { + break; + } + } + switch (other.getInstancePropertiesCase()) { + case COMPUTE_INSTANCE_RESTORE_PROPERTIES: + { + mergeComputeInstanceRestoreProperties(other.getComputeInstanceRestoreProperties()); + break; + } + case DISK_RESTORE_PROPERTIES: + { + mergeDiskRestoreProperties(other.getDiskRestoreProperties()); + break; + } + case INSTANCEPROPERTIES_NOT_SET: + { + break; + } + } + 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_ |= 0x00000020; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetComputeInstanceTargetEnvironmentFieldBuilder().getBuilder(), + extensionRegistry); + targetEnvironmentCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetComputeInstanceRestorePropertiesFieldBuilder().getBuilder(), + extensionRegistry); + instancePropertiesCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetDiskTargetEnvironmentFieldBuilder().getBuilder(), extensionRegistry); + targetEnvironmentCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetRegionDiskTargetEnvironmentFieldBuilder().getBuilder(), + extensionRegistry); + targetEnvironmentCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetDiskRestorePropertiesFieldBuilder().getBuilder(), extensionRegistry); + instancePropertiesCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetClearOverridesFieldMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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 targetEnvironmentCase_ = 0; + private java.lang.Object targetEnvironment_; + + public TargetEnvironmentCase getTargetEnvironmentCase() { + return TargetEnvironmentCase.forNumber(targetEnvironmentCase_); + } + + public Builder clearTargetEnvironment() { + targetEnvironmentCase_ = 0; + targetEnvironment_ = null; + onChanged(); + return this; + } + + private int instancePropertiesCase_ = 0; + private java.lang.Object instanceProperties_; + + public InstancePropertiesCase getInstancePropertiesCase() { + return InstancePropertiesCase.forNumber(instancePropertiesCase_); + } + + public Builder clearInstanceProperties() { + instancePropertiesCase_ = 0; + instanceProperties_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment, + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironmentOrBuilder> + computeInstanceTargetEnvironmentBuilder_; + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + * + * @return Whether the computeInstanceTargetEnvironment field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceTargetEnvironment() { + return targetEnvironmentCase_ == 3; + } + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + * + * @return The computeInstanceTargetEnvironment. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + getComputeInstanceTargetEnvironment() { + if (computeInstanceTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 3) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + .getDefaultInstance(); + } else { + if (targetEnvironmentCase_ == 3) { + return computeInstanceTargetEnvironmentBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + public Builder setComputeInstanceTargetEnvironment( + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment value) { + if (computeInstanceTargetEnvironmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetEnvironment_ = value; + onChanged(); + } else { + computeInstanceTargetEnvironmentBuilder_.setMessage(value); + } + targetEnvironmentCase_ = 3; + return this; + } + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + public Builder setComputeInstanceTargetEnvironment( + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.Builder builderForValue) { + if (computeInstanceTargetEnvironmentBuilder_ == null) { + targetEnvironment_ = builderForValue.build(); + onChanged(); + } else { + computeInstanceTargetEnvironmentBuilder_.setMessage(builderForValue.build()); + } + targetEnvironmentCase_ = 3; + return this; + } + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + public Builder mergeComputeInstanceTargetEnvironment( + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment value) { + if (computeInstanceTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 3 + && targetEnvironment_ + != com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + .getDefaultInstance()) { + targetEnvironment_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.newBuilder( + (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + targetEnvironment_) + .mergeFrom(value) + .buildPartial(); + } else { + targetEnvironment_ = value; + } + onChanged(); + } else { + if (targetEnvironmentCase_ == 3) { + computeInstanceTargetEnvironmentBuilder_.mergeFrom(value); + } else { + computeInstanceTargetEnvironmentBuilder_.setMessage(value); + } + } + targetEnvironmentCase_ = 3; + return this; + } + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + public Builder clearComputeInstanceTargetEnvironment() { + if (computeInstanceTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 3) { + targetEnvironmentCase_ = 0; + targetEnvironment_ = null; + onChanged(); + } + } else { + if (targetEnvironmentCase_ == 3) { + targetEnvironmentCase_ = 0; + targetEnvironment_ = null; + } + computeInstanceTargetEnvironmentBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + public com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.Builder + getComputeInstanceTargetEnvironmentBuilder() { + return internalGetComputeInstanceTargetEnvironmentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironmentOrBuilder + getComputeInstanceTargetEnvironmentOrBuilder() { + if ((targetEnvironmentCase_ == 3) && (computeInstanceTargetEnvironmentBuilder_ != null)) { + return computeInstanceTargetEnvironmentBuilder_.getMessageOrBuilder(); + } else { + if (targetEnvironmentCase_ == 3) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Compute Engine target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment, + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironmentOrBuilder> + internalGetComputeInstanceTargetEnvironmentFieldBuilder() { + if (computeInstanceTargetEnvironmentBuilder_ == null) { + if (!(targetEnvironmentCase_ == 3)) { + targetEnvironment_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + .getDefaultInstance(); + } + computeInstanceTargetEnvironmentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment, + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironmentOrBuilder>( + (com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment) + targetEnvironment_, + getParentForChildren(), + isClean()); + targetEnvironment_ = null; + } + targetEnvironmentCase_ = 3; + onChanged(); + return computeInstanceTargetEnvironmentBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment, + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.DiskTargetEnvironmentOrBuilder> + diskTargetEnvironmentBuilder_; + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + * + * @return Whether the diskTargetEnvironment field is set. + */ + @java.lang.Override + public boolean hasDiskTargetEnvironment() { + return targetEnvironmentCase_ == 5; + } + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + * + * @return The diskTargetEnvironment. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskTargetEnvironment getDiskTargetEnvironment() { + if (diskTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance(); + } else { + if (targetEnvironmentCase_ == 5) { + return diskTargetEnvironmentBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + public Builder setDiskTargetEnvironment( + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment value) { + if (diskTargetEnvironmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetEnvironment_ = value; + onChanged(); + } else { + diskTargetEnvironmentBuilder_.setMessage(value); + } + targetEnvironmentCase_ = 5; + return this; + } + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + public Builder setDiskTargetEnvironment( + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.Builder builderForValue) { + if (diskTargetEnvironmentBuilder_ == null) { + targetEnvironment_ = builderForValue.build(); + onChanged(); + } else { + diskTargetEnvironmentBuilder_.setMessage(builderForValue.build()); + } + targetEnvironmentCase_ = 5; + return this; + } + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + public Builder mergeDiskTargetEnvironment( + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment value) { + if (diskTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 5 + && targetEnvironment_ + != com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance()) { + targetEnvironment_ = + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.newBuilder( + (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) targetEnvironment_) + .mergeFrom(value) + .buildPartial(); + } else { + targetEnvironment_ = value; + } + onChanged(); + } else { + if (targetEnvironmentCase_ == 5) { + diskTargetEnvironmentBuilder_.mergeFrom(value); + } else { + diskTargetEnvironmentBuilder_.setMessage(value); + } + } + targetEnvironmentCase_ = 5; + return this; + } + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + public Builder clearDiskTargetEnvironment() { + if (diskTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 5) { + targetEnvironmentCase_ = 0; + targetEnvironment_ = null; + onChanged(); + } + } else { + if (targetEnvironmentCase_ == 5) { + targetEnvironmentCase_ = 0; + targetEnvironment_ = null; + } + diskTargetEnvironmentBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + public com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.Builder + getDiskTargetEnvironmentBuilder() { + return internalGetDiskTargetEnvironmentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskTargetEnvironmentOrBuilder + getDiskTargetEnvironmentOrBuilder() { + if ((targetEnvironmentCase_ == 5) && (diskTargetEnvironmentBuilder_ != null)) { + return diskTargetEnvironmentBuilder_.getMessageOrBuilder(); + } else { + if (targetEnvironmentCase_ == 5) { + return (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Disk target environment to be used during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment, + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.DiskTargetEnvironmentOrBuilder> + internalGetDiskTargetEnvironmentFieldBuilder() { + if (diskTargetEnvironmentBuilder_ == null) { + if (!(targetEnvironmentCase_ == 5)) { + targetEnvironment_ = + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.getDefaultInstance(); + } + diskTargetEnvironmentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment, + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.DiskTargetEnvironmentOrBuilder>( + (com.google.cloud.backupdr.v1beta.DiskTargetEnvironment) targetEnvironment_, + getParentForChildren(), + isClean()); + targetEnvironment_ = null; + } + targetEnvironmentCase_ = 5; + onChanged(); + return diskTargetEnvironmentBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment, + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironmentOrBuilder> + regionDiskTargetEnvironmentBuilder_; + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + * + * @return Whether the regionDiskTargetEnvironment field is set. + */ + @java.lang.Override + public boolean hasRegionDiskTargetEnvironment() { + return targetEnvironmentCase_ == 6; + } + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + * + * @return The regionDiskTargetEnvironment. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment + getRegionDiskTargetEnvironment() { + if (regionDiskTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.getDefaultInstance(); + } else { + if (targetEnvironmentCase_ == 6) { + return regionDiskTargetEnvironmentBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + public Builder setRegionDiskTargetEnvironment( + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment value) { + if (regionDiskTargetEnvironmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetEnvironment_ = value; + onChanged(); + } else { + regionDiskTargetEnvironmentBuilder_.setMessage(value); + } + targetEnvironmentCase_ = 6; + return this; + } + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + public Builder setRegionDiskTargetEnvironment( + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.Builder builderForValue) { + if (regionDiskTargetEnvironmentBuilder_ == null) { + targetEnvironment_ = builderForValue.build(); + onChanged(); + } else { + regionDiskTargetEnvironmentBuilder_.setMessage(builderForValue.build()); + } + targetEnvironmentCase_ = 6; + return this; + } + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + public Builder mergeRegionDiskTargetEnvironment( + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment value) { + if (regionDiskTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 6 + && targetEnvironment_ + != com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment + .getDefaultInstance()) { + targetEnvironment_ = + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.newBuilder( + (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) + targetEnvironment_) + .mergeFrom(value) + .buildPartial(); + } else { + targetEnvironment_ = value; + } + onChanged(); + } else { + if (targetEnvironmentCase_ == 6) { + regionDiskTargetEnvironmentBuilder_.mergeFrom(value); + } else { + regionDiskTargetEnvironmentBuilder_.setMessage(value); + } + } + targetEnvironmentCase_ = 6; + return this; + } + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + public Builder clearRegionDiskTargetEnvironment() { + if (regionDiskTargetEnvironmentBuilder_ == null) { + if (targetEnvironmentCase_ == 6) { + targetEnvironmentCase_ = 0; + targetEnvironment_ = null; + onChanged(); + } + } else { + if (targetEnvironmentCase_ == 6) { + targetEnvironmentCase_ = 0; + targetEnvironment_ = null; + } + regionDiskTargetEnvironmentBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + public com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.Builder + getRegionDiskTargetEnvironmentBuilder() { + return internalGetRegionDiskTargetEnvironmentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironmentOrBuilder + getRegionDiskTargetEnvironmentOrBuilder() { + if ((targetEnvironmentCase_ == 6) && (regionDiskTargetEnvironmentBuilder_ != null)) { + return regionDiskTargetEnvironmentBuilder_.getMessageOrBuilder(); + } else { + if (targetEnvironmentCase_ == 6) { + return (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) targetEnvironment_; + } + return com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Region disk target environment to be used during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment, + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironmentOrBuilder> + internalGetRegionDiskTargetEnvironmentFieldBuilder() { + if (regionDiskTargetEnvironmentBuilder_ == null) { + if (!(targetEnvironmentCase_ == 6)) { + targetEnvironment_ = + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.getDefaultInstance(); + } + regionDiskTargetEnvironmentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment, + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment.Builder, + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironmentOrBuilder>( + (com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment) targetEnvironment_, + getParentForChildren(), + isClean()); + targetEnvironment_ = null; + } + targetEnvironmentCase_ = 6; + onChanged(); + return regionDiskTargetEnvironmentBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceRestorePropertiesOrBuilder> + computeInstanceRestorePropertiesBuilder_; + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + * + * @return Whether the computeInstanceRestoreProperties field is set. + */ + @java.lang.Override + public boolean hasComputeInstanceRestoreProperties() { + return instancePropertiesCase_ == 4; + } + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + * + * @return The computeInstanceRestoreProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + getComputeInstanceRestoreProperties() { + if (computeInstanceRestorePropertiesBuilder_ == null) { + if (instancePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + instanceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .getDefaultInstance(); + } else { + if (instancePropertiesCase_ == 4) { + return computeInstanceRestorePropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + public Builder setComputeInstanceRestoreProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties value) { + if (computeInstanceRestorePropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceProperties_ = value; + onChanged(); + } else { + computeInstanceRestorePropertiesBuilder_.setMessage(value); + } + instancePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + public Builder setComputeInstanceRestoreProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.Builder builderForValue) { + if (computeInstanceRestorePropertiesBuilder_ == null) { + instanceProperties_ = builderForValue.build(); + onChanged(); + } else { + computeInstanceRestorePropertiesBuilder_.setMessage(builderForValue.build()); + } + instancePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + public Builder mergeComputeInstanceRestoreProperties( + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties value) { + if (computeInstanceRestorePropertiesBuilder_ == null) { + if (instancePropertiesCase_ == 4 + && instanceProperties_ + != com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .getDefaultInstance()) { + instanceProperties_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + instanceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + instanceProperties_ = value; + } + onChanged(); + } else { + if (instancePropertiesCase_ == 4) { + computeInstanceRestorePropertiesBuilder_.mergeFrom(value); + } else { + computeInstanceRestorePropertiesBuilder_.setMessage(value); + } + } + instancePropertiesCase_ = 4; + return this; + } + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + public Builder clearComputeInstanceRestoreProperties() { + if (computeInstanceRestorePropertiesBuilder_ == null) { + if (instancePropertiesCase_ == 4) { + instancePropertiesCase_ = 0; + instanceProperties_ = null; + onChanged(); + } + } else { + if (instancePropertiesCase_ == 4) { + instancePropertiesCase_ = 0; + instanceProperties_ = null; + } + computeInstanceRestorePropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.Builder + getComputeInstanceRestorePropertiesBuilder() { + return internalGetComputeInstanceRestorePropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ComputeInstanceRestorePropertiesOrBuilder + getComputeInstanceRestorePropertiesOrBuilder() { + if ((instancePropertiesCase_ == 4) && (computeInstanceRestorePropertiesBuilder_ != null)) { + return computeInstanceRestorePropertiesBuilder_.getMessageOrBuilder(); + } else { + if (instancePropertiesCase_ == 4) { + return (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + instanceProperties_; + } + return com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Compute Engine instance properties to be overridden during restore.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceRestorePropertiesOrBuilder> + internalGetComputeInstanceRestorePropertiesFieldBuilder() { + if (computeInstanceRestorePropertiesBuilder_ == null) { + if (!(instancePropertiesCase_ == 4)) { + instanceProperties_ = + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + .getDefaultInstance(); + } + computeInstanceRestorePropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties, + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties.Builder, + com.google.cloud.backupdr.v1beta.ComputeInstanceRestorePropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties) + instanceProperties_, + getParentForChildren(), + isClean()); + instanceProperties_ = null; + } + instancePropertiesCase_ = 4; + onChanged(); + return computeInstanceRestorePropertiesBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskRestoreProperties, + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskRestorePropertiesOrBuilder> + diskRestorePropertiesBuilder_; + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + * + * @return Whether the diskRestoreProperties field is set. + */ + @java.lang.Override + public boolean hasDiskRestoreProperties() { + return instancePropertiesCase_ == 7; + } + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + * + * @return The diskRestoreProperties. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties getDiskRestoreProperties() { + if (diskRestorePropertiesBuilder_ == null) { + if (instancePropertiesCase_ == 7) { + return (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) instanceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance(); + } else { + if (instancePropertiesCase_ == 7) { + return diskRestorePropertiesBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + public Builder setDiskRestoreProperties( + com.google.cloud.backupdr.v1beta.DiskRestoreProperties value) { + if (diskRestorePropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instanceProperties_ = value; + onChanged(); + } else { + diskRestorePropertiesBuilder_.setMessage(value); + } + instancePropertiesCase_ = 7; + return this; + } + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + public Builder setDiskRestoreProperties( + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Builder builderForValue) { + if (diskRestorePropertiesBuilder_ == null) { + instanceProperties_ = builderForValue.build(); + onChanged(); + } else { + diskRestorePropertiesBuilder_.setMessage(builderForValue.build()); + } + instancePropertiesCase_ = 7; + return this; + } + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + public Builder mergeDiskRestoreProperties( + com.google.cloud.backupdr.v1beta.DiskRestoreProperties value) { + if (diskRestorePropertiesBuilder_ == null) { + if (instancePropertiesCase_ == 7 + && instanceProperties_ + != com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance()) { + instanceProperties_ = + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.newBuilder( + (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) instanceProperties_) + .mergeFrom(value) + .buildPartial(); + } else { + instanceProperties_ = value; + } + onChanged(); + } else { + if (instancePropertiesCase_ == 7) { + diskRestorePropertiesBuilder_.mergeFrom(value); + } else { + diskRestorePropertiesBuilder_.setMessage(value); + } + } + instancePropertiesCase_ = 7; + return this; + } + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + public Builder clearDiskRestoreProperties() { + if (diskRestorePropertiesBuilder_ == null) { + if (instancePropertiesCase_ == 7) { + instancePropertiesCase_ = 0; + instanceProperties_ = null; + onChanged(); + } + } else { + if (instancePropertiesCase_ == 7) { + instancePropertiesCase_ = 0; + instanceProperties_ = null; + } + diskRestorePropertiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + public com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Builder + getDiskRestorePropertiesBuilder() { + return internalGetDiskRestorePropertiesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DiskRestorePropertiesOrBuilder + getDiskRestorePropertiesOrBuilder() { + if ((instancePropertiesCase_ == 7) && (diskRestorePropertiesBuilder_ != null)) { + return diskRestorePropertiesBuilder_.getMessageOrBuilder(); + } else { + if (instancePropertiesCase_ == 7) { + return (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) instanceProperties_; + } + return com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Disk properties to be overridden during restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskRestoreProperties, + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskRestorePropertiesOrBuilder> + internalGetDiskRestorePropertiesFieldBuilder() { + if (diskRestorePropertiesBuilder_ == null) { + if (!(instancePropertiesCase_ == 7)) { + instanceProperties_ = + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.getDefaultInstance(); + } + diskRestorePropertiesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DiskRestoreProperties, + com.google.cloud.backupdr.v1beta.DiskRestoreProperties.Builder, + com.google.cloud.backupdr.v1beta.DiskRestorePropertiesOrBuilder>( + (com.google.cloud.backupdr.v1beta.DiskRestoreProperties) instanceProperties_, + getParentForChildren(), + isClean()); + instanceProperties_ = null; + } + instancePropertiesCase_ = 7; + onChanged(); + return diskRestorePropertiesBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource name of the Backup instance, in the format
+     * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+     * 
+ * + * + * 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 resource name of the Backup instance, in the format
+     * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+     * 
+ * + * + * 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 resource name of the Backup instance, in the format
+     * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+     * 
+ * + * + * 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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the Backup instance, in the format
+     * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+     * 
+ * + * + * 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_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the Backup instance, in the format
+     * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+     * 
+ * + * + * 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_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.FieldMask clearOverridesFieldMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + clearOverridesFieldMaskBuilder_; + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clearOverridesFieldMask field is set. + */ + public boolean hasClearOverridesFieldMask() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clearOverridesFieldMask. + */ + public com.google.protobuf.FieldMask getClearOverridesFieldMask() { + if (clearOverridesFieldMaskBuilder_ == null) { + return clearOverridesFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : clearOverridesFieldMask_; + } else { + return clearOverridesFieldMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setClearOverridesFieldMask(com.google.protobuf.FieldMask value) { + if (clearOverridesFieldMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clearOverridesFieldMask_ = value; + } else { + clearOverridesFieldMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setClearOverridesFieldMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (clearOverridesFieldMaskBuilder_ == null) { + clearOverridesFieldMask_ = builderForValue.build(); + } else { + clearOverridesFieldMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeClearOverridesFieldMask(com.google.protobuf.FieldMask value) { + if (clearOverridesFieldMaskBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && clearOverridesFieldMask_ != null + && clearOverridesFieldMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getClearOverridesFieldMaskBuilder().mergeFrom(value); + } else { + clearOverridesFieldMask_ = value; + } + } else { + clearOverridesFieldMaskBuilder_.mergeFrom(value); + } + if (clearOverridesFieldMask_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearClearOverridesFieldMask() { + bitField0_ = (bitField0_ & ~0x00000080); + clearOverridesFieldMask_ = null; + if (clearOverridesFieldMaskBuilder_ != null) { + clearOverridesFieldMaskBuilder_.dispose(); + clearOverridesFieldMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getClearOverridesFieldMaskBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetClearOverridesFieldMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getClearOverridesFieldMaskOrBuilder() { + if (clearOverridesFieldMaskBuilder_ != null) { + return clearOverridesFieldMaskBuilder_.getMessageOrBuilder(); + } else { + return clearOverridesFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : clearOverridesFieldMask_; + } + } + + /** + * + * + *
+     * Optional. A field mask used to clear server-side default values
+     * for fields within the `instance_properties` oneof.
+     *
+     * When a field in this mask is cleared, the server will not apply its
+     * default logic (like inheriting a value from the source) for that field.
+     *
+     * The most common current use case is clearing default encryption keys.
+     *
+     * Examples of field mask paths:
+     * - Compute Instance Disks:
+     * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+     * - Single Disk: `disk_restore_properties.disk_encryption_key`
+     * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetClearOverridesFieldMaskFieldBuilder() { + if (clearOverridesFieldMaskBuilder_ == null) { + clearOverridesFieldMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getClearOverridesFieldMask(), getParentForChildren(), isClean()); + clearOverridesFieldMask_ = null; + } + return clearOverridesFieldMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.RestoreBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.RestoreBackupRequest) + private static final com.google.cloud.backupdr.v1beta.RestoreBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.RestoreBackupRequest(); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreBackupRequest 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.backupdr.v1beta.RestoreBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupRequestOrBuilder.java new file mode 100644 index 000000000000..913816a4e898 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupRequestOrBuilder.java @@ -0,0 +1,406 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface RestoreBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.RestoreBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Compute Engine target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + * + * @return Whether the computeInstanceTargetEnvironment field is set. + */ + boolean hasComputeInstanceTargetEnvironment(); + + /** + * + * + *
+   * Compute Engine target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + * + * @return The computeInstanceTargetEnvironment. + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment + getComputeInstanceTargetEnvironment(); + + /** + * + * + *
+   * Compute Engine target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + * + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceTargetEnvironmentOrBuilder + getComputeInstanceTargetEnvironmentOrBuilder(); + + /** + * + * + *
+   * Disk target environment to be used during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + * + * @return Whether the diskTargetEnvironment field is set. + */ + boolean hasDiskTargetEnvironment(); + + /** + * + * + *
+   * Disk target environment to be used during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + * + * @return The diskTargetEnvironment. + */ + com.google.cloud.backupdr.v1beta.DiskTargetEnvironment getDiskTargetEnvironment(); + + /** + * + * + *
+   * Disk target environment to be used during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskTargetEnvironment disk_target_environment = 5; + */ + com.google.cloud.backupdr.v1beta.DiskTargetEnvironmentOrBuilder + getDiskTargetEnvironmentOrBuilder(); + + /** + * + * + *
+   * Region disk target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + * + * @return Whether the regionDiskTargetEnvironment field is set. + */ + boolean hasRegionDiskTargetEnvironment(); + + /** + * + * + *
+   * Region disk target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + * + * @return The regionDiskTargetEnvironment. + */ + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment getRegionDiskTargetEnvironment(); + + /** + * + * + *
+   * Region disk target environment to be used during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RegionDiskTargetEnvironment region_disk_target_environment = 6; + * + */ + com.google.cloud.backupdr.v1beta.RegionDiskTargetEnvironmentOrBuilder + getRegionDiskTargetEnvironmentOrBuilder(); + + /** + * + * + *
+   * Compute Engine instance properties to be overridden during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + * + * @return Whether the computeInstanceRestoreProperties field is set. + */ + boolean hasComputeInstanceRestoreProperties(); + + /** + * + * + *
+   * Compute Engine instance properties to be overridden during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + * + * @return The computeInstanceRestoreProperties. + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties + getComputeInstanceRestoreProperties(); + + /** + * + * + *
+   * Compute Engine instance properties to be overridden during restore.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + * + */ + com.google.cloud.backupdr.v1beta.ComputeInstanceRestorePropertiesOrBuilder + getComputeInstanceRestorePropertiesOrBuilder(); + + /** + * + * + *
+   * Disk properties to be overridden during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + * + * @return Whether the diskRestoreProperties field is set. + */ + boolean hasDiskRestoreProperties(); + + /** + * + * + *
+   * Disk properties to be overridden during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + * + * @return The diskRestoreProperties. + */ + com.google.cloud.backupdr.v1beta.DiskRestoreProperties getDiskRestoreProperties(); + + /** + * + * + *
+   * Disk properties to be overridden during restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.DiskRestoreProperties disk_restore_properties = 7; + */ + com.google.cloud.backupdr.v1beta.DiskRestorePropertiesOrBuilder + getDiskRestorePropertiesOrBuilder(); + + /** + * + * + *
+   * Required. The resource name of the Backup instance, in the format
+   * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource name of the Backup instance, in the format
+   * 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. A field mask used to clear server-side default values
+   * for fields within the `instance_properties` oneof.
+   *
+   * When a field in this mask is cleared, the server will not apply its
+   * default logic (like inheriting a value from the source) for that field.
+   *
+   * The most common current use case is clearing default encryption keys.
+   *
+   * Examples of field mask paths:
+   * - Compute Instance Disks:
+   * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+   * - Single Disk: `disk_restore_properties.disk_encryption_key`
+   * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clearOverridesFieldMask field is set. + */ + boolean hasClearOverridesFieldMask(); + + /** + * + * + *
+   * Optional. A field mask used to clear server-side default values
+   * for fields within the `instance_properties` oneof.
+   *
+   * When a field in this mask is cleared, the server will not apply its
+   * default logic (like inheriting a value from the source) for that field.
+   *
+   * The most common current use case is clearing default encryption keys.
+   *
+   * Examples of field mask paths:
+   * - Compute Instance Disks:
+   * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+   * - Single Disk: `disk_restore_properties.disk_encryption_key`
+   * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clearOverridesFieldMask. + */ + com.google.protobuf.FieldMask getClearOverridesFieldMask(); + + /** + * + * + *
+   * Optional. A field mask used to clear server-side default values
+   * for fields within the `instance_properties` oneof.
+   *
+   * When a field in this mask is cleared, the server will not apply its
+   * default logic (like inheriting a value from the source) for that field.
+   *
+   * The most common current use case is clearing default encryption keys.
+   *
+   * Examples of field mask paths:
+   * - Compute Instance Disks:
+   * `compute_instance_restore_properties.disks.*.disk_encryption_key`
+   * - Single Disk: `disk_restore_properties.disk_encryption_key`
+   * 
+ * + * + * optional .google.protobuf.FieldMask clear_overrides_field_mask = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getClearOverridesFieldMaskOrBuilder(); + + com.google.cloud.backupdr.v1beta.RestoreBackupRequest.TargetEnvironmentCase + getTargetEnvironmentCase(); + + com.google.cloud.backupdr.v1beta.RestoreBackupRequest.InstancePropertiesCase + getInstancePropertiesCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupResponse.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupResponse.java new file mode 100644 index 000000000000..540f2beaf757 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupResponse.java @@ -0,0 +1,702 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Response message for restoring from a Backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RestoreBackupResponse} + */ +@com.google.protobuf.Generated +public final class RestoreBackupResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.RestoreBackupResponse) + RestoreBackupResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "RestoreBackupResponse"); + } + + // Use RestoreBackupResponse.newBuilder() to construct. + private RestoreBackupResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RestoreBackupResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RestoreBackupResponse.class, + com.google.cloud.backupdr.v1beta.RestoreBackupResponse.Builder.class); + } + + private int bitField0_; + public static final int TARGET_RESOURCE_FIELD_NUMBER = 1; + private com.google.cloud.backupdr.v1beta.TargetResource targetResource_; + + /** + * + * + *
+   * Details of the target resource created/modified as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + * + * @return Whether the targetResource field is set. + */ + @java.lang.Override + public boolean hasTargetResource() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Details of the target resource created/modified as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + * + * @return The targetResource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TargetResource getTargetResource() { + return targetResource_ == null + ? com.google.cloud.backupdr.v1beta.TargetResource.getDefaultInstance() + : targetResource_; + } + + /** + * + * + *
+   * Details of the target resource created/modified as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TargetResourceOrBuilder getTargetResourceOrBuilder() { + return targetResource_ == null + ? com.google.cloud.backupdr.v1beta.TargetResource.getDefaultInstance() + : targetResource_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTargetResource()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTargetResource()); + } + 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.backupdr.v1beta.RestoreBackupResponse)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.RestoreBackupResponse other = + (com.google.cloud.backupdr.v1beta.RestoreBackupResponse) obj; + + if (hasTargetResource() != other.hasTargetResource()) return false; + if (hasTargetResource()) { + if (!getTargetResource().equals(other.getTargetResource())) 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 (hasTargetResource()) { + hash = (37 * hash) + TARGET_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getTargetResource().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse 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.backupdr.v1beta.RestoreBackupResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse 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.backupdr.v1beta.RestoreBackupResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.RestoreBackupResponse 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for restoring from a Backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RestoreBackupResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.RestoreBackupResponse) + com.google.cloud.backupdr.v1beta.RestoreBackupResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RestoreBackupResponse.class, + com.google.cloud.backupdr.v1beta.RestoreBackupResponse.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.RestoreBackupResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTargetResourceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetResource_ = null; + if (targetResourceBuilder_ != null) { + targetResourceBuilder_.dispose(); + targetResourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_RestoreBackupResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreBackupResponse getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.RestoreBackupResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreBackupResponse build() { + com.google.cloud.backupdr.v1beta.RestoreBackupResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreBackupResponse buildPartial() { + com.google.cloud.backupdr.v1beta.RestoreBackupResponse result = + new com.google.cloud.backupdr.v1beta.RestoreBackupResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.RestoreBackupResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.targetResource_ = + targetResourceBuilder_ == null ? targetResource_ : targetResourceBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.RestoreBackupResponse) { + return mergeFrom((com.google.cloud.backupdr.v1beta.RestoreBackupResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.RestoreBackupResponse other) { + if (other == com.google.cloud.backupdr.v1beta.RestoreBackupResponse.getDefaultInstance()) + return this; + if (other.hasTargetResource()) { + mergeTargetResource(other.getTargetResource()); + } + 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( + internalGetTargetResourceFieldBuilder().getBuilder(), extensionRegistry); + 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 com.google.cloud.backupdr.v1beta.TargetResource targetResource_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.TargetResource, + com.google.cloud.backupdr.v1beta.TargetResource.Builder, + com.google.cloud.backupdr.v1beta.TargetResourceOrBuilder> + targetResourceBuilder_; + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + * + * @return Whether the targetResource field is set. + */ + public boolean hasTargetResource() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + * + * @return The targetResource. + */ + public com.google.cloud.backupdr.v1beta.TargetResource getTargetResource() { + if (targetResourceBuilder_ == null) { + return targetResource_ == null + ? com.google.cloud.backupdr.v1beta.TargetResource.getDefaultInstance() + : targetResource_; + } else { + return targetResourceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + public Builder setTargetResource(com.google.cloud.backupdr.v1beta.TargetResource value) { + if (targetResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetResource_ = value; + } else { + targetResourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + public Builder setTargetResource( + com.google.cloud.backupdr.v1beta.TargetResource.Builder builderForValue) { + if (targetResourceBuilder_ == null) { + targetResource_ = builderForValue.build(); + } else { + targetResourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + public Builder mergeTargetResource(com.google.cloud.backupdr.v1beta.TargetResource value) { + if (targetResourceBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && targetResource_ != null + && targetResource_ + != com.google.cloud.backupdr.v1beta.TargetResource.getDefaultInstance()) { + getTargetResourceBuilder().mergeFrom(value); + } else { + targetResource_ = value; + } + } else { + targetResourceBuilder_.mergeFrom(value); + } + if (targetResource_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + public Builder clearTargetResource() { + bitField0_ = (bitField0_ & ~0x00000001); + targetResource_ = null; + if (targetResourceBuilder_ != null) { + targetResourceBuilder_.dispose(); + targetResourceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + public com.google.cloud.backupdr.v1beta.TargetResource.Builder getTargetResourceBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetTargetResourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + public com.google.cloud.backupdr.v1beta.TargetResourceOrBuilder getTargetResourceOrBuilder() { + if (targetResourceBuilder_ != null) { + return targetResourceBuilder_.getMessageOrBuilder(); + } else { + return targetResource_ == null + ? com.google.cloud.backupdr.v1beta.TargetResource.getDefaultInstance() + : targetResource_; + } + } + + /** + * + * + *
+     * Details of the target resource created/modified as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.TargetResource, + com.google.cloud.backupdr.v1beta.TargetResource.Builder, + com.google.cloud.backupdr.v1beta.TargetResourceOrBuilder> + internalGetTargetResourceFieldBuilder() { + if (targetResourceBuilder_ == null) { + targetResourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.TargetResource, + com.google.cloud.backupdr.v1beta.TargetResource.Builder, + com.google.cloud.backupdr.v1beta.TargetResourceOrBuilder>( + getTargetResource(), getParentForChildren(), isClean()); + targetResource_ = null; + } + return targetResourceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.RestoreBackupResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.RestoreBackupResponse) + private static final com.google.cloud.backupdr.v1beta.RestoreBackupResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.RestoreBackupResponse(); + } + + public static com.google.cloud.backupdr.v1beta.RestoreBackupResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreBackupResponse 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.backupdr.v1beta.RestoreBackupResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupResponseOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupResponseOrBuilder.java new file mode 100644 index 000000000000..3866cf96e6c9 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreBackupResponseOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface RestoreBackupResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.RestoreBackupResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Details of the target resource created/modified as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + * + * @return Whether the targetResource field is set. + */ + boolean hasTargetResource(); + + /** + * + * + *
+   * Details of the target resource created/modified as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + * + * @return The targetResource. + */ + com.google.cloud.backupdr.v1beta.TargetResource getTargetResource(); + + /** + * + * + *
+   * Details of the target resource created/modified as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.TargetResource target_resource = 1; + */ + com.google.cloud.backupdr.v1beta.TargetResourceOrBuilder getTargetResourceOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreDiskFromInstanceOptions.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreDiskFromInstanceOptions.java new file mode 100644 index 000000000000..fbc7a0558b12 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreDiskFromInstanceOptions.java @@ -0,0 +1,883 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Options for creating a disk from a source Compute Instance backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions} + */ +@com.google.protobuf.Generated +public final class RestoreDiskFromInstanceOptions extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) + RestoreDiskFromInstanceOptionsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "RestoreDiskFromInstanceOptions"); + } + + // Use RestoreDiskFromInstanceOptions.newBuilder() to construct. + private RestoreDiskFromInstanceOptions(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RestoreDiskFromInstanceOptions() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RestoreDiskFromInstanceOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RestoreDiskFromInstanceOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.class, + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.Builder.class); + } + + private int sourceDiskCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceDisk_; + + public enum SourceDiskCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SOURCE_DEVICE_NAME(1), + BOOT_DISK(2), + SOURCEDISK_NOT_SET(0); + private final int value; + + private SourceDiskCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceDiskCase valueOf(int value) { + return forNumber(value); + } + + public static SourceDiskCase forNumber(int value) { + switch (value) { + case 1: + return SOURCE_DEVICE_NAME; + case 2: + return BOOT_DISK; + case 0: + return SOURCEDISK_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceDiskCase getSourceDiskCase() { + return SourceDiskCase.forNumber(sourceDiskCase_); + } + + public static final int SOURCE_DEVICE_NAME_FIELD_NUMBER = 1; + + /** + * + * + *
+   * The device name of the disk to restore from the VM backup.
+   * 
+ * + * string source_device_name = 1; + * + * @return Whether the sourceDeviceName field is set. + */ + public boolean hasSourceDeviceName() { + return sourceDiskCase_ == 1; + } + + /** + * + * + *
+   * The device name of the disk to restore from the VM backup.
+   * 
+ * + * string source_device_name = 1; + * + * @return The sourceDeviceName. + */ + public java.lang.String getSourceDeviceName() { + java.lang.Object ref = ""; + if (sourceDiskCase_ == 1) { + ref = sourceDisk_; + } + 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 (sourceDiskCase_ == 1) { + sourceDisk_ = s; + } + return s; + } + } + + /** + * + * + *
+   * The device name of the disk to restore from the VM backup.
+   * 
+ * + * string source_device_name = 1; + * + * @return The bytes for sourceDeviceName. + */ + public com.google.protobuf.ByteString getSourceDeviceNameBytes() { + java.lang.Object ref = ""; + if (sourceDiskCase_ == 1) { + ref = sourceDisk_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceDiskCase_ == 1) { + sourceDisk_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOT_DISK_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Set to true to restore the boot disk from the instance backup.
+   * This field should only be set to true if selected.
+   * 
+ * + * bool boot_disk = 2; + * + * @return Whether the bootDisk field is set. + */ + @java.lang.Override + public boolean hasBootDisk() { + return sourceDiskCase_ == 2; + } + + /** + * + * + *
+   * Set to true to restore the boot disk from the instance backup.
+   * This field should only be set to true if selected.
+   * 
+ * + * bool boot_disk = 2; + * + * @return The bootDisk. + */ + @java.lang.Override + public boolean getBootDisk() { + if (sourceDiskCase_ == 2) { + return (java.lang.Boolean) sourceDisk_; + } + return false; + } + + 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 (sourceDiskCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sourceDisk_); + } + if (sourceDiskCase_ == 2) { + output.writeBool(2, (boolean) ((java.lang.Boolean) sourceDisk_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sourceDiskCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sourceDisk_); + } + if (sourceDiskCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 2, (boolean) ((java.lang.Boolean) sourceDisk_)); + } + 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.backupdr.v1beta.RestoreDiskFromInstanceOptions)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions other = + (com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) obj; + + if (!getSourceDiskCase().equals(other.getSourceDiskCase())) return false; + switch (sourceDiskCase_) { + case 1: + if (!getSourceDeviceName().equals(other.getSourceDeviceName())) return false; + break; + case 2: + if (getBootDisk() != other.getBootDisk()) return false; + break; + case 0: + default: + } + 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(); + switch (sourceDiskCase_) { + case 1: + hash = (37 * hash) + SOURCE_DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSourceDeviceName().hashCode(); + break; + case 2: + hash = (37 * hash) + BOOT_DISK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBootDisk()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions 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.backupdr.v1beta.RestoreDiskFromInstanceOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions 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.backupdr.v1beta.RestoreDiskFromInstanceOptions parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.RestoreDiskFromInstanceOptions 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Options for creating a disk from a source Compute Instance backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RestoreDiskFromInstanceOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RestoreDiskFromInstanceOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.class, + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sourceDiskCase_ = 0; + sourceDisk_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultDiskProto + .internal_static_google_cloud_backupdr_v1beta_RestoreDiskFromInstanceOptions_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions build() { + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions buildPartial() { + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions result = + new com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions result) { + result.sourceDiskCase_ = sourceDiskCase_; + result.sourceDisk_ = this.sourceDisk_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) { + return mergeFrom((com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions other) { + if (other + == com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.getDefaultInstance()) + return this; + switch (other.getSourceDiskCase()) { + case SOURCE_DEVICE_NAME: + { + sourceDiskCase_ = 1; + sourceDisk_ = other.sourceDisk_; + onChanged(); + break; + } + case BOOT_DISK: + { + setBootDisk(other.getBootDisk()); + break; + } + case SOURCEDISK_NOT_SET: + { + break; + } + } + 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(); + sourceDiskCase_ = 1; + sourceDisk_ = s; + break; + } // case 10 + case 16: + { + sourceDisk_ = input.readBool(); + sourceDiskCase_ = 2; + break; + } // case 16 + 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 sourceDiskCase_ = 0; + private java.lang.Object sourceDisk_; + + public SourceDiskCase getSourceDiskCase() { + return SourceDiskCase.forNumber(sourceDiskCase_); + } + + public Builder clearSourceDisk() { + sourceDiskCase_ = 0; + sourceDisk_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The device name of the disk to restore from the VM backup.
+     * 
+ * + * string source_device_name = 1; + * + * @return Whether the sourceDeviceName field is set. + */ + @java.lang.Override + public boolean hasSourceDeviceName() { + return sourceDiskCase_ == 1; + } + + /** + * + * + *
+     * The device name of the disk to restore from the VM backup.
+     * 
+ * + * string source_device_name = 1; + * + * @return The sourceDeviceName. + */ + @java.lang.Override + public java.lang.String getSourceDeviceName() { + java.lang.Object ref = ""; + if (sourceDiskCase_ == 1) { + ref = sourceDisk_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceDiskCase_ == 1) { + sourceDisk_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The device name of the disk to restore from the VM backup.
+     * 
+ * + * string source_device_name = 1; + * + * @return The bytes for sourceDeviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceDeviceNameBytes() { + java.lang.Object ref = ""; + if (sourceDiskCase_ == 1) { + ref = sourceDisk_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceDiskCase_ == 1) { + sourceDisk_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The device name of the disk to restore from the VM backup.
+     * 
+ * + * string source_device_name = 1; + * + * @param value The sourceDeviceName to set. + * @return This builder for chaining. + */ + public Builder setSourceDeviceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceDiskCase_ = 1; + sourceDisk_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * The device name of the disk to restore from the VM backup.
+     * 
+ * + * string source_device_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceDeviceName() { + if (sourceDiskCase_ == 1) { + sourceDiskCase_ = 0; + sourceDisk_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The device name of the disk to restore from the VM backup.
+     * 
+ * + * string source_device_name = 1; + * + * @param value The bytes for sourceDeviceName to set. + * @return This builder for chaining. + */ + public Builder setSourceDeviceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceDiskCase_ = 1; + sourceDisk_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Set to true to restore the boot disk from the instance backup.
+     * This field should only be set to true if selected.
+     * 
+ * + * bool boot_disk = 2; + * + * @return Whether the bootDisk field is set. + */ + public boolean hasBootDisk() { + return sourceDiskCase_ == 2; + } + + /** + * + * + *
+     * Set to true to restore the boot disk from the instance backup.
+     * This field should only be set to true if selected.
+     * 
+ * + * bool boot_disk = 2; + * + * @return The bootDisk. + */ + public boolean getBootDisk() { + if (sourceDiskCase_ == 2) { + return (java.lang.Boolean) sourceDisk_; + } + return false; + } + + /** + * + * + *
+     * Set to true to restore the boot disk from the instance backup.
+     * This field should only be set to true if selected.
+     * 
+ * + * bool boot_disk = 2; + * + * @param value The bootDisk to set. + * @return This builder for chaining. + */ + public Builder setBootDisk(boolean value) { + + sourceDiskCase_ = 2; + sourceDisk_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Set to true to restore the boot disk from the instance backup.
+     * This field should only be set to true if selected.
+     * 
+ * + * bool boot_disk = 2; + * + * @return This builder for chaining. + */ + public Builder clearBootDisk() { + if (sourceDiskCase_ == 2) { + sourceDiskCase_ = 0; + sourceDisk_ = null; + onChanged(); + } + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) + private static final com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions(); + } + + public static com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreDiskFromInstanceOptions 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.backupdr.v1beta.RestoreDiskFromInstanceOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreDiskFromInstanceOptionsOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreDiskFromInstanceOptionsOrBuilder.java new file mode 100644 index 000000000000..9ad8a3ddae3e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RestoreDiskFromInstanceOptionsOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_disk.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface RestoreDiskFromInstanceOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The device name of the disk to restore from the VM backup.
+   * 
+ * + * string source_device_name = 1; + * + * @return Whether the sourceDeviceName field is set. + */ + boolean hasSourceDeviceName(); + + /** + * + * + *
+   * The device name of the disk to restore from the VM backup.
+   * 
+ * + * string source_device_name = 1; + * + * @return The sourceDeviceName. + */ + java.lang.String getSourceDeviceName(); + + /** + * + * + *
+   * The device name of the disk to restore from the VM backup.
+   * 
+ * + * string source_device_name = 1; + * + * @return The bytes for sourceDeviceName. + */ + com.google.protobuf.ByteString getSourceDeviceNameBytes(); + + /** + * + * + *
+   * Set to true to restore the boot disk from the instance backup.
+   * This field should only be set to true if selected.
+   * 
+ * + * bool boot_disk = 2; + * + * @return Whether the bootDisk field is set. + */ + boolean hasBootDisk(); + + /** + * + * + *
+   * Set to true to restore the boot disk from the instance backup.
+   * This field should only be set to true if selected.
+   * 
+ * + * bool boot_disk = 2; + * + * @return The bootDisk. + */ + boolean getBootDisk(); + + com.google.cloud.backupdr.v1beta.RestoreDiskFromInstanceOptions.SourceDiskCase + getSourceDiskCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RuleConfigInfo.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RuleConfigInfo.java new file mode 100644 index 000000000000..dc4079017320 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RuleConfigInfo.java @@ -0,0 +1,1621 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Message for rules config info.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RuleConfigInfo} + */ +@com.google.protobuf.Generated +public final class RuleConfigInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.RuleConfigInfo) + RuleConfigInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "RuleConfigInfo"); + } + + // Use RuleConfigInfo.newBuilder() to construct. + private RuleConfigInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RuleConfigInfo() { + ruleId_ = ""; + lastBackupState_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_RuleConfigInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_RuleConfigInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RuleConfigInfo.class, + com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder.class); + } + + /** + * + * + *
+   * Enum for LastBackupState
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState} + */ + public enum LastBackupState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * State not set.
+     * 
+ * + * LAST_BACKUP_STATE_UNSPECIFIED = 0; + */ + LAST_BACKUP_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The first backup is pending.
+     * 
+ * + * FIRST_BACKUP_PENDING = 1; + */ + FIRST_BACKUP_PENDING(1), + /** + * + * + *
+     * The most recent backup could not be run/failed because of the lack of
+     * permissions.
+     * 
+ * + * PERMISSION_DENIED = 2; + */ + PERMISSION_DENIED(2), + /** + * + * + *
+     * The last backup operation succeeded.
+     * 
+ * + * SUCCEEDED = 3; + */ + SUCCEEDED(3), + /** + * + * + *
+     * The last backup operation failed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "LastBackupState"); + } + + /** + * + * + *
+     * State not set.
+     * 
+ * + * LAST_BACKUP_STATE_UNSPECIFIED = 0; + */ + public static final int LAST_BACKUP_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The first backup is pending.
+     * 
+ * + * FIRST_BACKUP_PENDING = 1; + */ + public static final int FIRST_BACKUP_PENDING_VALUE = 1; + + /** + * + * + *
+     * The most recent backup could not be run/failed because of the lack of
+     * permissions.
+     * 
+ * + * PERMISSION_DENIED = 2; + */ + public static final int PERMISSION_DENIED_VALUE = 2; + + /** + * + * + *
+     * The last backup operation succeeded.
+     * 
+ * + * SUCCEEDED = 3; + */ + public static final int SUCCEEDED_VALUE = 3; + + /** + * + * + *
+     * The last backup operation failed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + 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 LastBackupState 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 LastBackupState forNumber(int value) { + switch (value) { + case 0: + return LAST_BACKUP_STATE_UNSPECIFIED; + case 1: + return FIRST_BACKUP_PENDING; + case 2: + return PERMISSION_DENIED; + case 3: + return SUCCEEDED; + case 4: + return FAILED; + 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 LastBackupState findValueByNumber(int number) { + return LastBackupState.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.RuleConfigInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final LastBackupState[] VALUES = values(); + + public static LastBackupState 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 LastBackupState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState) + } + + private int bitField0_; + public static final int RULE_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleId_ = ""; + + /** + * + * + *
+   * Output only. Backup Rule id fetched from backup plan.
+   * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + @java.lang.Override + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + 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(); + ruleId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Backup Rule id fetched from backup plan.
+   * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_BACKUP_STATE_FIELD_NUMBER = 3; + private int lastBackupState_ = 0; + + /** + * + * + *
+   * Output only. The last backup state for rule.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + @java.lang.Override + public int getLastBackupStateValue() { + return lastBackupState_; + } + + /** + * + * + *
+   * Output only. The last backup state for rule.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState getLastBackupState() { + com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState result = + com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState.forNumber(lastBackupState_); + return result == null + ? com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState.UNRECOGNIZED + : result; + } + + public static final int LAST_BACKUP_ERROR_FIELD_NUMBER = 4; + private com.google.rpc.Status lastBackupError_; + + /** + * + * + *
+   * Output only. google.rpc.Status object to store the last backup error.
+   * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastBackupError field is set. + */ + @java.lang.Override + public boolean hasLastBackupError() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. google.rpc.Status object to store the last backup error.
+   * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupError. + */ + @java.lang.Override + public com.google.rpc.Status getLastBackupError() { + return lastBackupError_ == null ? com.google.rpc.Status.getDefaultInstance() : lastBackupError_; + } + + /** + * + * + *
+   * Output only. google.rpc.Status object to store the last backup error.
+   * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getLastBackupErrorOrBuilder() { + return lastBackupError_ == null ? com.google.rpc.Status.getDefaultInstance() : lastBackupError_; + } + + public static final int LAST_SUCCESSFUL_BACKUP_CONSISTENCY_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp lastSuccessfulBackupConsistencyTime_; + + /** + * + * + *
+   * Output only. The point in time when the last successful backup was captured
+   * from the source.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + @java.lang.Override + public boolean hasLastSuccessfulBackupConsistencyTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The point in time when the last successful backup was captured
+   * from the source.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime() { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + + /** + * + * + *
+   * Output only. The point in time when the last successful backup was captured
+   * from the source.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupConsistencyTimeOrBuilder() { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + + 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.GeneratedMessage.isStringEmpty(ruleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ruleId_); + } + if (lastBackupState_ + != com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState + .LAST_BACKUP_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, lastBackupState_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getLastBackupError()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getLastSuccessfulBackupConsistencyTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ruleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ruleId_); + } + if (lastBackupState_ + != com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState + .LAST_BACKUP_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, lastBackupState_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLastBackupError()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getLastSuccessfulBackupConsistencyTime()); + } + 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.backupdr.v1beta.RuleConfigInfo)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.RuleConfigInfo other = + (com.google.cloud.backupdr.v1beta.RuleConfigInfo) obj; + + if (!getRuleId().equals(other.getRuleId())) return false; + if (lastBackupState_ != other.lastBackupState_) return false; + if (hasLastBackupError() != other.hasLastBackupError()) return false; + if (hasLastBackupError()) { + if (!getLastBackupError().equals(other.getLastBackupError())) return false; + } + if (hasLastSuccessfulBackupConsistencyTime() != other.hasLastSuccessfulBackupConsistencyTime()) + return false; + if (hasLastSuccessfulBackupConsistencyTime()) { + if (!getLastSuccessfulBackupConsistencyTime() + .equals(other.getLastSuccessfulBackupConsistencyTime())) 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) + RULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getRuleId().hashCode(); + hash = (37 * hash) + LAST_BACKUP_STATE_FIELD_NUMBER; + hash = (53 * hash) + lastBackupState_; + if (hasLastBackupError()) { + hash = (37 * hash) + LAST_BACKUP_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getLastBackupError().hashCode(); + } + if (hasLastSuccessfulBackupConsistencyTime()) { + hash = (37 * hash) + LAST_SUCCESSFUL_BACKUP_CONSISTENCY_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastSuccessfulBackupConsistencyTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo 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.backupdr.v1beta.RuleConfigInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo 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.backupdr.v1beta.RuleConfigInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.RuleConfigInfo 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for rules config info.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.RuleConfigInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.RuleConfigInfo) + com.google.cloud.backupdr.v1beta.RuleConfigInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_RuleConfigInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_RuleConfigInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.RuleConfigInfo.class, + com.google.cloud.backupdr.v1beta.RuleConfigInfo.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.RuleConfigInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLastBackupErrorFieldBuilder(); + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ruleId_ = ""; + lastBackupState_ = 0; + lastBackupError_ = null; + if (lastBackupErrorBuilder_ != null) { + lastBackupErrorBuilder_.dispose(); + lastBackupErrorBuilder_ = null; + } + lastSuccessfulBackupConsistencyTime_ = null; + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + lastSuccessfulBackupConsistencyTimeBuilder_.dispose(); + lastSuccessfulBackupConsistencyTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_RuleConfigInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RuleConfigInfo getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.RuleConfigInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RuleConfigInfo build() { + com.google.cloud.backupdr.v1beta.RuleConfigInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RuleConfigInfo buildPartial() { + com.google.cloud.backupdr.v1beta.RuleConfigInfo result = + new com.google.cloud.backupdr.v1beta.RuleConfigInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.RuleConfigInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ruleId_ = ruleId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.lastBackupState_ = lastBackupState_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lastBackupError_ = + lastBackupErrorBuilder_ == null ? lastBackupError_ : lastBackupErrorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastSuccessfulBackupConsistencyTime_ = + lastSuccessfulBackupConsistencyTimeBuilder_ == null + ? lastSuccessfulBackupConsistencyTime_ + : lastSuccessfulBackupConsistencyTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.RuleConfigInfo) { + return mergeFrom((com.google.cloud.backupdr.v1beta.RuleConfigInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.RuleConfigInfo other) { + if (other == com.google.cloud.backupdr.v1beta.RuleConfigInfo.getDefaultInstance()) + return this; + if (!other.getRuleId().isEmpty()) { + ruleId_ = other.ruleId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.lastBackupState_ != 0) { + setLastBackupStateValue(other.getLastBackupStateValue()); + } + if (other.hasLastBackupError()) { + mergeLastBackupError(other.getLastBackupError()); + } + if (other.hasLastSuccessfulBackupConsistencyTime()) { + mergeLastSuccessfulBackupConsistencyTime(other.getLastSuccessfulBackupConsistencyTime()); + } + 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: + { + ruleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + lastBackupState_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + input.readMessage( + internalGetLastBackupErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + 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 ruleId_ = ""; + + /** + * + * + *
+     * Output only. Backup Rule id fetched from backup plan.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Backup Rule id fetched from backup plan.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Backup Rule id fetched from backup plan.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Backup Rule id fetched from backup plan.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRuleId() { + ruleId_ = getDefaultInstance().getRuleId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Backup Rule id fetched from backup plan.
+     * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int lastBackupState_ = 0; + + /** + * + * + *
+     * Output only. The last backup state for rule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + @java.lang.Override + public int getLastBackupStateValue() { + return lastBackupState_; + } + + /** + * + * + *
+     * Output only. The last backup state for rule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lastBackupState to set. + * @return This builder for chaining. + */ + public Builder setLastBackupStateValue(int value) { + lastBackupState_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last backup state for rule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState getLastBackupState() { + com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState result = + com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState.forNumber( + lastBackupState_); + return result == null + ? com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The last backup state for rule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lastBackupState to set. + * @return This builder for chaining. + */ + public Builder setLastBackupState( + com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + lastBackupState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The last backup state for rule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLastBackupState() { + bitField0_ = (bitField0_ & ~0x00000002); + lastBackupState_ = 0; + onChanged(); + return this; + } + + private com.google.rpc.Status lastBackupError_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + lastBackupErrorBuilder_; + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastBackupError field is set. + */ + public boolean hasLastBackupError() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupError. + */ + public com.google.rpc.Status getLastBackupError() { + if (lastBackupErrorBuilder_ == null) { + return lastBackupError_ == null + ? com.google.rpc.Status.getDefaultInstance() + : lastBackupError_; + } else { + return lastBackupErrorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastBackupError(com.google.rpc.Status value) { + if (lastBackupErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastBackupError_ = value; + } else { + lastBackupErrorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastBackupError(com.google.rpc.Status.Builder builderForValue) { + if (lastBackupErrorBuilder_ == null) { + lastBackupError_ = builderForValue.build(); + } else { + lastBackupErrorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastBackupError(com.google.rpc.Status value) { + if (lastBackupErrorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && lastBackupError_ != null + && lastBackupError_ != com.google.rpc.Status.getDefaultInstance()) { + getLastBackupErrorBuilder().mergeFrom(value); + } else { + lastBackupError_ = value; + } + } else { + lastBackupErrorBuilder_.mergeFrom(value); + } + if (lastBackupError_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastBackupError() { + bitField0_ = (bitField0_ & ~0x00000004); + lastBackupError_ = null; + if (lastBackupErrorBuilder_ != null) { + lastBackupErrorBuilder_.dispose(); + lastBackupErrorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder getLastBackupErrorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetLastBackupErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.StatusOrBuilder getLastBackupErrorOrBuilder() { + if (lastBackupErrorBuilder_ != null) { + return lastBackupErrorBuilder_.getMessageOrBuilder(); + } else { + return lastBackupError_ == null + ? com.google.rpc.Status.getDefaultInstance() + : lastBackupError_; + } + } + + /** + * + * + *
+     * Output only. google.rpc.Status object to store the last backup error.
+     * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetLastBackupErrorFieldBuilder() { + if (lastBackupErrorBuilder_ == null) { + lastBackupErrorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + getLastBackupError(), getParentForChildren(), isClean()); + lastBackupError_ = null; + } + return lastBackupErrorBuilder_; + } + + private com.google.protobuf.Timestamp lastSuccessfulBackupConsistencyTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastSuccessfulBackupConsistencyTimeBuilder_; + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + public boolean hasLastSuccessfulBackupConsistencyTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + public com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } else { + return lastSuccessfulBackupConsistencyTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastSuccessfulBackupConsistencyTime(com.google.protobuf.Timestamp value) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastSuccessfulBackupConsistencyTime_ = value; + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastSuccessfulBackupConsistencyTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + lastSuccessfulBackupConsistencyTime_ = builderForValue.build(); + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastSuccessfulBackupConsistencyTime(com.google.protobuf.Timestamp value) { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && lastSuccessfulBackupConsistencyTime_ != null + && lastSuccessfulBackupConsistencyTime_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastSuccessfulBackupConsistencyTimeBuilder().mergeFrom(value); + } else { + lastSuccessfulBackupConsistencyTime_ = value; + } + } else { + lastSuccessfulBackupConsistencyTimeBuilder_.mergeFrom(value); + } + if (lastSuccessfulBackupConsistencyTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastSuccessfulBackupConsistencyTime() { + bitField0_ = (bitField0_ & ~0x00000008); + lastSuccessfulBackupConsistencyTime_ = null; + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + lastSuccessfulBackupConsistencyTimeBuilder_.dispose(); + lastSuccessfulBackupConsistencyTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastSuccessfulBackupConsistencyTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder + getLastSuccessfulBackupConsistencyTimeOrBuilder() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) { + return lastSuccessfulBackupConsistencyTimeBuilder_.getMessageOrBuilder(); + } else { + return lastSuccessfulBackupConsistencyTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastSuccessfulBackupConsistencyTime_; + } + } + + /** + * + * + *
+     * Output only. The point in time when the last successful backup was captured
+     * from the source.
+     * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLastSuccessfulBackupConsistencyTimeFieldBuilder() { + if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) { + lastSuccessfulBackupConsistencyTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastSuccessfulBackupConsistencyTime(), getParentForChildren(), isClean()); + lastSuccessfulBackupConsistencyTime_ = null; + } + return lastSuccessfulBackupConsistencyTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.RuleConfigInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.RuleConfigInfo) + private static final com.google.cloud.backupdr.v1beta.RuleConfigInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.RuleConfigInfo(); + } + + public static com.google.cloud.backupdr.v1beta.RuleConfigInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuleConfigInfo 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.backupdr.v1beta.RuleConfigInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RuleConfigInfoOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RuleConfigInfoOrBuilder.java new file mode 100644 index 000000000000..09a773b27637 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/RuleConfigInfoOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface RuleConfigInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.RuleConfigInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Backup Rule id fetched from backup plan.
+   * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + java.lang.String getRuleId(); + + /** + * + * + *
+   * Output only. Backup Rule id fetched from backup plan.
+   * 
+ * + * string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + com.google.protobuf.ByteString getRuleIdBytes(); + + /** + * + * + *
+   * Output only. The last backup state for rule.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lastBackupState. + */ + int getLastBackupStateValue(); + + /** + * + * + *
+   * Output only. The last backup state for rule.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupState. + */ + com.google.cloud.backupdr.v1beta.RuleConfigInfo.LastBackupState getLastBackupState(); + + /** + * + * + *
+   * Output only. google.rpc.Status object to store the last backup error.
+   * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastBackupError field is set. + */ + boolean hasLastBackupError(); + + /** + * + * + *
+   * Output only. google.rpc.Status object to store the last backup error.
+   * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastBackupError. + */ + com.google.rpc.Status getLastBackupError(); + + /** + * + * + *
+   * Output only. google.rpc.Status object to store the last backup error.
+   * 
+ * + * .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.StatusOrBuilder getLastBackupErrorOrBuilder(); + + /** + * + * + *
+   * Output only. The point in time when the last successful backup was captured
+   * from the source.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastSuccessfulBackupConsistencyTime field is set. + */ + boolean hasLastSuccessfulBackupConsistencyTime(); + + /** + * + * + *
+   * Output only. The point in time when the last successful backup was captured
+   * from the source.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastSuccessfulBackupConsistencyTime. + */ + com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime(); + + /** + * + * + *
+   * Output only. The point in time when the last successful backup was captured
+   * from the source.
+   * 
+ * + * + * .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupConsistencyTimeOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Scheduling.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Scheduling.java new file mode 100644 index 000000000000..02c40ccbb6df --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Scheduling.java @@ -0,0 +1,4408 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Sets the scheduling options for an Instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Scheduling} + */ +@com.google.protobuf.Generated +public final class Scheduling extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.Scheduling) + SchedulingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Scheduling"); + } + + // Use Scheduling.newBuilder() to construct. + private Scheduling(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Scheduling() { + onHostMaintenance_ = 0; + nodeAffinities_ = java.util.Collections.emptyList(); + provisioningModel_ = 0; + instanceTerminationAction_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Scheduling.class, + com.google.cloud.backupdr.v1beta.Scheduling.Builder.class); + } + + /** + * + * + *
+   * Defines the maintenance behavior for this instance=
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance} + */ + public enum OnHostMaintenance implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + */ + ON_HOST_MAINTENANCE_UNSPECIFIED(0), + /** + * + * + *
+     * Tells Compute Engine to terminate and (optionally) restart the instance
+     * away from the maintenance activity.
+     * 
+ * + * TERMINATE = 1; + */ + TERMINATE(1), + /** + * + * + *
+     * Default, Allows Compute Engine to automatically migrate instances
+     * out of the way of maintenance events.
+     * 
+ * + * MIGRATE = 1000; + */ + MIGRATE(1000), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "OnHostMaintenance"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + */ + public static final int ON_HOST_MAINTENANCE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Tells Compute Engine to terminate and (optionally) restart the instance
+     * away from the maintenance activity.
+     * 
+ * + * TERMINATE = 1; + */ + public static final int TERMINATE_VALUE = 1; + + /** + * + * + *
+     * Default, Allows Compute Engine to automatically migrate instances
+     * out of the way of maintenance events.
+     * 
+ * + * MIGRATE = 1000; + */ + public static final int MIGRATE_VALUE = 1000; + + 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 OnHostMaintenance 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 OnHostMaintenance forNumber(int value) { + switch (value) { + case 0: + return ON_HOST_MAINTENANCE_UNSPECIFIED; + case 1: + return TERMINATE; + case 1000: + return MIGRATE; + 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 OnHostMaintenance findValueByNumber(int number) { + return OnHostMaintenance.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.Scheduling.getDescriptor().getEnumTypes().get(0); + } + + private static final OnHostMaintenance[] VALUES = values(); + + public static OnHostMaintenance 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 OnHostMaintenance(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance) + } + + /** + * + * + *
+   * Defines the provisioning model for an instance.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel} + */ + public enum ProvisioningModel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is not used.
+     * 
+ * + * PROVISIONING_MODEL_UNSPECIFIED = 0; + */ + PROVISIONING_MODEL_UNSPECIFIED(0), + /** + * + * + *
+     * Standard provisioning with user controlled runtime, no discounts.
+     * 
+ * + * STANDARD = 1; + */ + STANDARD(1), + /** + * + * + *
+     * Heavily discounted, no guaranteed runtime.
+     * 
+ * + * SPOT = 2; + */ + SPOT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProvisioningModel"); + } + + /** + * + * + *
+     * Default value. This value is not used.
+     * 
+ * + * PROVISIONING_MODEL_UNSPECIFIED = 0; + */ + public static final int PROVISIONING_MODEL_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Standard provisioning with user controlled runtime, no discounts.
+     * 
+ * + * STANDARD = 1; + */ + public static final int STANDARD_VALUE = 1; + + /** + * + * + *
+     * Heavily discounted, no guaranteed runtime.
+     * 
+ * + * SPOT = 2; + */ + public static final int SPOT_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 ProvisioningModel 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 ProvisioningModel forNumber(int value) { + switch (value) { + case 0: + return PROVISIONING_MODEL_UNSPECIFIED; + case 1: + return STANDARD; + case 2: + return SPOT; + 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 ProvisioningModel findValueByNumber(int number) { + return ProvisioningModel.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.Scheduling.getDescriptor().getEnumTypes().get(1); + } + + private static final ProvisioningModel[] VALUES = values(); + + public static ProvisioningModel 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 ProvisioningModel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel) + } + + /** + * + * + *
+   * Defines the supported termination actions for an instance.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction} + */ + public enum InstanceTerminationAction implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0; + */ + INSTANCE_TERMINATION_ACTION_UNSPECIFIED(0), + /** + * + * + *
+     * Delete the VM.
+     * 
+ * + * DELETE = 1; + */ + DELETE(1), + /** + * + * + *
+     * Stop the VM without storing in-memory content. default action.
+     * 
+ * + * STOP = 2; + */ + STOP(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InstanceTerminationAction"); + } + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0; + */ + public static final int INSTANCE_TERMINATION_ACTION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Delete the VM.
+     * 
+ * + * DELETE = 1; + */ + public static final int DELETE_VALUE = 1; + + /** + * + * + *
+     * Stop the VM without storing in-memory content. default action.
+     * 
+ * + * STOP = 2; + */ + public static final int STOP_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 InstanceTerminationAction 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 InstanceTerminationAction forNumber(int value) { + switch (value) { + case 0: + return INSTANCE_TERMINATION_ACTION_UNSPECIFIED; + case 1: + return DELETE; + case 2: + return STOP; + 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 InstanceTerminationAction findValueByNumber(int number) { + return InstanceTerminationAction.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.Scheduling.getDescriptor().getEnumTypes().get(2); + } + + private static final InstanceTerminationAction[] VALUES = values(); + + public static InstanceTerminationAction 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 InstanceTerminationAction(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction) + } + + public interface NodeAffinityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.Scheduling.NodeAffinity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Corresponds to the label key of Node resource.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + boolean hasKey(); + + /** + * + * + *
+     * Optional. Corresponds to the label key of Node resource.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + java.lang.String getKey(); + + /** + * + * + *
+     * Optional. Corresponds to the label key of Node resource.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + com.google.protobuf.ByteString getKeyBytes(); + + /** + * + * + *
+     * Optional. Defines the operation of node selection.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the operator field is set. + */ + boolean hasOperator(); + + /** + * + * + *
+     * Optional. Defines the operation of node selection.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for operator. + */ + int getOperatorValue(); + + /** + * + * + *
+     * Optional. Defines the operation of node selection.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The operator. + */ + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator getOperator(); + + /** + * + * + *
+     * Optional. Corresponds to the label values of Node resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + + /** + * + * + *
+     * Optional. Corresponds to the label values of Node resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + int getValuesCount(); + + /** + * + * + *
+     * Optional. Corresponds to the label values of Node resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + + /** + * + * + *
+     * Optional. Corresponds to the label values of Node resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + } + + /** + * + * + *
+   * Node Affinity: the configuration of desired nodes onto which this Instance
+   * could be scheduled.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Scheduling.NodeAffinity} + */ + public static final class NodeAffinity extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.Scheduling.NodeAffinity) + NodeAffinityOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "NodeAffinity"); + } + + // Use NodeAffinity.newBuilder() to construct. + private NodeAffinity(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NodeAffinity() { + key_ = ""; + operator_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_NodeAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_NodeAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.class, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder.class); + } + + /** + * + * + *
+     * Defines the type of node selections.
+     * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator} + */ + public enum Operator implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value. This value is unused.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + OPERATOR_UNSPECIFIED(0), + /** + * + * + *
+       * Requires Compute Engine to seek for matched nodes.
+       * 
+ * + * IN = 1; + */ + IN(1), + /** + * + * + *
+       * Requires Compute Engine to avoid certain nodes.
+       * 
+ * + * NOT_IN = 2; + */ + NOT_IN(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Operator"); + } + + /** + * + * + *
+       * Default value. This value is unused.
+       * 
+ * + * OPERATOR_UNSPECIFIED = 0; + */ + public static final int OPERATOR_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Requires Compute Engine to seek for matched nodes.
+       * 
+ * + * IN = 1; + */ + public static final int IN_VALUE = 1; + + /** + * + * + *
+       * Requires Compute Engine to avoid certain nodes.
+       * 
+ * + * NOT_IN = 2; + */ + public static final int NOT_IN_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 Operator 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 Operator forNumber(int value) { + switch (value) { + case 0: + return OPERATOR_UNSPECIFIED; + case 1: + return IN; + case 2: + return NOT_IN; + 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 Operator findValueByNumber(int number) { + return Operator.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Operator[] VALUES = values(); + + public static Operator 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 Operator(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator) + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + + /** + * + * + *
+     * Optional. Corresponds to the label key of Node resource.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + @java.lang.Override + public boolean hasKey() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Corresponds to the label key of Node resource.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. Corresponds to the label key of Node resource.
+     * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPERATOR_FIELD_NUMBER = 2; + private int operator_ = 0; + + /** + * + * + *
+     * Optional. Defines the operation of node selection.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the operator field is set. + */ + @java.lang.Override + public boolean hasOperator() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Defines the operation of node selection.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override + public int getOperatorValue() { + return operator_; + } + + /** + * + * + *
+     * Optional. Defines the operation of node selection.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The operator. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator getOperator() { + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator result = + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator.forNumber(operator_); + return result == null + ? com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator.UNRECOGNIZED + : result; + } + + public static final int VALUES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Optional. Corresponds to the label values of Node resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of Node resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of Node resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
+     * Optional. Corresponds to the label values of Node resource.
+     * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.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 { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, key_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeEnum(2, operator_); + } + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, values_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, key_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, operator_); + } + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().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.backupdr.v1beta.Scheduling.NodeAffinity)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity other = + (com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity) obj; + + if (hasKey() != other.hasKey()) return false; + if (hasKey()) { + if (!getKey().equals(other.getKey())) return false; + } + if (hasOperator() != other.hasOperator()) return false; + if (hasOperator()) { + if (operator_ != other.operator_) return false; + } + if (!getValuesList().equals(other.getValuesList())) 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 (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + if (hasOperator()) { + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + operator_; + } + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity 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.backupdr.v1beta.Scheduling.NodeAffinity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity 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.backupdr.v1beta.Scheduling.NodeAffinity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.Scheduling.NodeAffinity 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Node Affinity: the configuration of desired nodes onto which this Instance
+     * could be scheduled.
+     * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Scheduling.NodeAffinity} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.Scheduling.NodeAffinity) + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_NodeAffinity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_NodeAffinity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.class, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + operator_ = 0; + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_NodeAffinity_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity build() { + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity buildPartial() { + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity result = + new com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operator_ = operator_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity) { + return mergeFrom((com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity other) { + if (other == com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.getDefaultInstance()) + return this; + if (other.hasKey()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasOperator()) { + setOperatorValue(other.getOperatorValue()); + } + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ |= 0x00000004; + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + 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: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + operator_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.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.lang.Object key_ = ""; + + /** + * + * + *
+       * Optional. Corresponds to the label key of Node resource.
+       * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the key field is set. + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Optional. Corresponds to the label key of Node resource.
+       * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. Corresponds to the label key of Node resource.
+       * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for key. + */ + public com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. Corresponds to the label key of Node resource.
+       * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Corresponds to the label key of Node resource.
+       * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Corresponds to the label key of Node resource.
+       * 
+ * + * optional string key = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int operator_ = 0; + + /** + * + * + *
+       * Optional. Defines the operation of node selection.
+       * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the operator field is set. + */ + @java.lang.Override + public boolean hasOperator() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Optional. Defines the operation of node selection.
+       * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for operator. + */ + @java.lang.Override + public int getOperatorValue() { + return operator_; + } + + /** + * + * + *
+       * Optional. Defines the operation of node selection.
+       * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for operator to set. + * @return This builder for chaining. + */ + public Builder setOperatorValue(int value) { + operator_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Defines the operation of node selection.
+       * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The operator. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator getOperator() { + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator result = + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator.forNumber(operator_); + return result == null + ? com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Optional. Defines the operation of node selection.
+       * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The operator to set. + * @return This builder for chaining. + */ + public Builder setOperator( + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + operator_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Defines the operation of node selection.
+       * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Operator operator = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000002); + operator_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList values_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureValuesIsMutable() { + if (!values_.isModifiable()) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + values_.makeImmutable(); + return values_; + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Corresponds to the label values of Node resource.
+       * 
+ * + * repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.Scheduling.NodeAffinity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.Scheduling.NodeAffinity) + private static final com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity(); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeAffinity 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.backupdr.v1beta.Scheduling.NodeAffinity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ON_HOST_MAINTENANCE_FIELD_NUMBER = 1; + private int onHostMaintenance_ = 0; + + /** + * + * + *
+   * Optional. Defines the maintenance behavior for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the onHostMaintenance field is set. + */ + @java.lang.Override + public boolean hasOnHostMaintenance() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Defines the maintenance behavior for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for onHostMaintenance. + */ + @java.lang.Override + public int getOnHostMaintenanceValue() { + return onHostMaintenance_; + } + + /** + * + * + *
+   * Optional. Defines the maintenance behavior for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The onHostMaintenance. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance getOnHostMaintenance() { + com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance result = + com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance.forNumber(onHostMaintenance_); + return result == null + ? com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance.UNRECOGNIZED + : result; + } + + public static final int AUTOMATIC_RESTART_FIELD_NUMBER = 2; + private boolean automaticRestart_ = false; + + /** + * + * + *
+   * Optional. Specifies whether the instance should be automatically restarted
+   * if it is terminated by Compute Engine (not terminated by a user).
+   * 
+ * + * optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the automaticRestart field is set. + */ + @java.lang.Override + public boolean hasAutomaticRestart() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Specifies whether the instance should be automatically restarted
+   * if it is terminated by Compute Engine (not terminated by a user).
+   * 
+ * + * optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The automaticRestart. + */ + @java.lang.Override + public boolean getAutomaticRestart() { + return automaticRestart_; + } + + public static final int PREEMPTIBLE_FIELD_NUMBER = 3; + private boolean preemptible_ = false; + + /** + * + * + *
+   * Optional. Defines whether the instance is preemptible.
+   * 
+ * + * optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the preemptible field is set. + */ + @java.lang.Override + public boolean hasPreemptible() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Defines whether the instance is preemptible.
+   * 
+ * + * optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preemptible. + */ + @java.lang.Override + public boolean getPreemptible() { + return preemptible_; + } + + public static final int NODE_AFFINITIES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List nodeAffinities_; + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getNodeAffinitiesList() { + return nodeAffinities_; + } + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getNodeAffinitiesOrBuilderList() { + return nodeAffinities_; + } + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getNodeAffinitiesCount() { + return nodeAffinities_.size(); + } + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity getNodeAffinities(int index) { + return nodeAffinities_.get(index); + } + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityOrBuilder + getNodeAffinitiesOrBuilder(int index) { + return nodeAffinities_.get(index); + } + + public static final int MIN_NODE_CPUS_FIELD_NUMBER = 5; + private int minNodeCpus_ = 0; + + /** + * + * + *
+   * Optional. The minimum number of virtual CPUs this instance will consume
+   * when running on a sole-tenant node.
+   * 
+ * + * optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minNodeCpus field is set. + */ + @java.lang.Override + public boolean hasMinNodeCpus() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. The minimum number of virtual CPUs this instance will consume
+   * when running on a sole-tenant node.
+   * 
+ * + * optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minNodeCpus. + */ + @java.lang.Override + public int getMinNodeCpus() { + return minNodeCpus_; + } + + public static final int PROVISIONING_MODEL_FIELD_NUMBER = 6; + private int provisioningModel_ = 0; + + /** + * + * + *
+   * Optional. Specifies the provisioning model of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provisioningModel field is set. + */ + @java.lang.Override + public boolean hasProvisioningModel() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the provisioning model of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for provisioningModel. + */ + @java.lang.Override + public int getProvisioningModelValue() { + return provisioningModel_; + } + + /** + * + * + *
+   * Optional. Specifies the provisioning model of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisioningModel. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel getProvisioningModel() { + com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel result = + com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel.forNumber(provisioningModel_); + return result == null + ? com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel.UNRECOGNIZED + : result; + } + + public static final int INSTANCE_TERMINATION_ACTION_FIELD_NUMBER = 7; + private int instanceTerminationAction_ = 0; + + /** + * + * + *
+   * Optional. Specifies the termination action for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instanceTerminationAction field is set. + */ + @java.lang.Override + public boolean hasInstanceTerminationAction() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the termination action for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for instanceTerminationAction. + */ + @java.lang.Override + public int getInstanceTerminationActionValue() { + return instanceTerminationAction_; + } + + /** + * + * + *
+   * Optional. Specifies the termination action for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instanceTerminationAction. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction + getInstanceTerminationAction() { + com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction result = + com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction.forNumber( + instanceTerminationAction_); + return result == null + ? com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction.UNRECOGNIZED + : result; + } + + public static final int LOCAL_SSD_RECOVERY_TIMEOUT_FIELD_NUMBER = 10; + private com.google.cloud.backupdr.v1beta.SchedulingDuration localSsdRecoveryTimeout_; + + /** + * + * + *
+   * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+   * while recovery of the Local Ssd state is attempted. Its value should be in
+   * between 0 and 168 hours with hour granularity and the default value being 1
+   * hour.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the localSsdRecoveryTimeout field is set. + */ + @java.lang.Override + public boolean hasLocalSsdRecoveryTimeout() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+   * while recovery of the Local Ssd state is attempted. Its value should be in
+   * between 0 and 168 hours with hour granularity and the default value being 1
+   * hour.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The localSsdRecoveryTimeout. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.SchedulingDuration getLocalSsdRecoveryTimeout() { + return localSsdRecoveryTimeout_ == null + ? com.google.cloud.backupdr.v1beta.SchedulingDuration.getDefaultInstance() + : localSsdRecoveryTimeout_; + } + + /** + * + * + *
+   * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+   * while recovery of the Local Ssd state is attempted. Its value should be in
+   * between 0 and 168 hours with hour granularity and the default value being 1
+   * hour.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.SchedulingDurationOrBuilder + getLocalSsdRecoveryTimeoutOrBuilder() { + return localSsdRecoveryTimeout_ == null + ? com.google.cloud.backupdr.v1beta.SchedulingDuration.getDefaultInstance() + : localSsdRecoveryTimeout_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeEnum(1, onHostMaintenance_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(2, automaticRestart_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(3, preemptible_); + } + for (int i = 0; i < nodeAffinities_.size(); i++) { + output.writeMessage(4, nodeAffinities_.get(i)); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeInt32(5, minNodeCpus_); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeEnum(6, provisioningModel_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeEnum(7, instanceTerminationAction_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(10, getLocalSsdRecoveryTimeout()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, onHostMaintenance_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, automaticRestart_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, preemptible_); + } + for (int i = 0; i < nodeAffinities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, nodeAffinities_.get(i)); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, minNodeCpus_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, provisioningModel_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, instanceTerminationAction_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getLocalSsdRecoveryTimeout()); + } + 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.backupdr.v1beta.Scheduling)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.Scheduling other = + (com.google.cloud.backupdr.v1beta.Scheduling) obj; + + if (hasOnHostMaintenance() != other.hasOnHostMaintenance()) return false; + if (hasOnHostMaintenance()) { + if (onHostMaintenance_ != other.onHostMaintenance_) return false; + } + if (hasAutomaticRestart() != other.hasAutomaticRestart()) return false; + if (hasAutomaticRestart()) { + if (getAutomaticRestart() != other.getAutomaticRestart()) return false; + } + if (hasPreemptible() != other.hasPreemptible()) return false; + if (hasPreemptible()) { + if (getPreemptible() != other.getPreemptible()) return false; + } + if (!getNodeAffinitiesList().equals(other.getNodeAffinitiesList())) return false; + if (hasMinNodeCpus() != other.hasMinNodeCpus()) return false; + if (hasMinNodeCpus()) { + if (getMinNodeCpus() != other.getMinNodeCpus()) return false; + } + if (hasProvisioningModel() != other.hasProvisioningModel()) return false; + if (hasProvisioningModel()) { + if (provisioningModel_ != other.provisioningModel_) return false; + } + if (hasInstanceTerminationAction() != other.hasInstanceTerminationAction()) return false; + if (hasInstanceTerminationAction()) { + if (instanceTerminationAction_ != other.instanceTerminationAction_) return false; + } + if (hasLocalSsdRecoveryTimeout() != other.hasLocalSsdRecoveryTimeout()) return false; + if (hasLocalSsdRecoveryTimeout()) { + if (!getLocalSsdRecoveryTimeout().equals(other.getLocalSsdRecoveryTimeout())) 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 (hasOnHostMaintenance()) { + hash = (37 * hash) + ON_HOST_MAINTENANCE_FIELD_NUMBER; + hash = (53 * hash) + onHostMaintenance_; + } + if (hasAutomaticRestart()) { + hash = (37 * hash) + AUTOMATIC_RESTART_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutomaticRestart()); + } + if (hasPreemptible()) { + hash = (37 * hash) + PREEMPTIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPreemptible()); + } + if (getNodeAffinitiesCount() > 0) { + hash = (37 * hash) + NODE_AFFINITIES_FIELD_NUMBER; + hash = (53 * hash) + getNodeAffinitiesList().hashCode(); + } + if (hasMinNodeCpus()) { + hash = (37 * hash) + MIN_NODE_CPUS_FIELD_NUMBER; + hash = (53 * hash) + getMinNodeCpus(); + } + if (hasProvisioningModel()) { + hash = (37 * hash) + PROVISIONING_MODEL_FIELD_NUMBER; + hash = (53 * hash) + provisioningModel_; + } + if (hasInstanceTerminationAction()) { + hash = (37 * hash) + INSTANCE_TERMINATION_ACTION_FIELD_NUMBER; + hash = (53 * hash) + instanceTerminationAction_; + } + if (hasLocalSsdRecoveryTimeout()) { + hash = (37 * hash) + LOCAL_SSD_RECOVERY_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getLocalSsdRecoveryTimeout().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.Scheduling parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling 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.backupdr.v1beta.Scheduling parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling 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.backupdr.v1beta.Scheduling parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.Scheduling 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Sets the scheduling options for an Instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Scheduling} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.Scheduling) + com.google.cloud.backupdr.v1beta.SchedulingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Scheduling.class, + com.google.cloud.backupdr.v1beta.Scheduling.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.Scheduling.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetNodeAffinitiesFieldBuilder(); + internalGetLocalSsdRecoveryTimeoutFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + onHostMaintenance_ = 0; + automaticRestart_ = false; + preemptible_ = false; + if (nodeAffinitiesBuilder_ == null) { + nodeAffinities_ = java.util.Collections.emptyList(); + } else { + nodeAffinities_ = null; + nodeAffinitiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + minNodeCpus_ = 0; + provisioningModel_ = 0; + instanceTerminationAction_ = 0; + localSsdRecoveryTimeout_ = null; + if (localSsdRecoveryTimeoutBuilder_ != null) { + localSsdRecoveryTimeoutBuilder_.dispose(); + localSsdRecoveryTimeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Scheduling_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling build() { + com.google.cloud.backupdr.v1beta.Scheduling result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling buildPartial() { + com.google.cloud.backupdr.v1beta.Scheduling result = + new com.google.cloud.backupdr.v1beta.Scheduling(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.backupdr.v1beta.Scheduling result) { + if (nodeAffinitiesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + nodeAffinities_ = java.util.Collections.unmodifiableList(nodeAffinities_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.nodeAffinities_ = nodeAffinities_; + } else { + result.nodeAffinities_ = nodeAffinitiesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.Scheduling result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.onHostMaintenance_ = onHostMaintenance_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.automaticRestart_ = automaticRestart_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.preemptible_ = preemptible_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.minNodeCpus_ = minNodeCpus_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.provisioningModel_ = provisioningModel_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.instanceTerminationAction_ = instanceTerminationAction_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.localSsdRecoveryTimeout_ = + localSsdRecoveryTimeoutBuilder_ == null + ? localSsdRecoveryTimeout_ + : localSsdRecoveryTimeoutBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.Scheduling) { + return mergeFrom((com.google.cloud.backupdr.v1beta.Scheduling) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.Scheduling other) { + if (other == com.google.cloud.backupdr.v1beta.Scheduling.getDefaultInstance()) return this; + if (other.hasOnHostMaintenance()) { + setOnHostMaintenanceValue(other.getOnHostMaintenanceValue()); + } + if (other.hasAutomaticRestart()) { + setAutomaticRestart(other.getAutomaticRestart()); + } + if (other.hasPreemptible()) { + setPreemptible(other.getPreemptible()); + } + if (nodeAffinitiesBuilder_ == null) { + if (!other.nodeAffinities_.isEmpty()) { + if (nodeAffinities_.isEmpty()) { + nodeAffinities_ = other.nodeAffinities_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.addAll(other.nodeAffinities_); + } + onChanged(); + } + } else { + if (!other.nodeAffinities_.isEmpty()) { + if (nodeAffinitiesBuilder_.isEmpty()) { + nodeAffinitiesBuilder_.dispose(); + nodeAffinitiesBuilder_ = null; + nodeAffinities_ = other.nodeAffinities_; + bitField0_ = (bitField0_ & ~0x00000008); + nodeAffinitiesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetNodeAffinitiesFieldBuilder() + : null; + } else { + nodeAffinitiesBuilder_.addAllMessages(other.nodeAffinities_); + } + } + } + if (other.hasMinNodeCpus()) { + setMinNodeCpus(other.getMinNodeCpus()); + } + if (other.hasProvisioningModel()) { + setProvisioningModelValue(other.getProvisioningModelValue()); + } + if (other.hasInstanceTerminationAction()) { + setInstanceTerminationActionValue(other.getInstanceTerminationActionValue()); + } + if (other.hasLocalSsdRecoveryTimeout()) { + mergeLocalSsdRecoveryTimeout(other.getLocalSsdRecoveryTimeout()); + } + 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 8: + { + onHostMaintenance_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + automaticRestart_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + preemptible_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity m = + input.readMessage( + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.parser(), + extensionRegistry); + if (nodeAffinitiesBuilder_ == null) { + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.add(m); + } else { + nodeAffinitiesBuilder_.addMessage(m); + } + break; + } // case 34 + case 40: + { + minNodeCpus_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + provisioningModel_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + instanceTerminationAction_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 82: + { + input.readMessage( + internalGetLocalSsdRecoveryTimeoutFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + 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 int onHostMaintenance_ = 0; + + /** + * + * + *
+     * Optional. Defines the maintenance behavior for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the onHostMaintenance field is set. + */ + @java.lang.Override + public boolean hasOnHostMaintenance() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Defines the maintenance behavior for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for onHostMaintenance. + */ + @java.lang.Override + public int getOnHostMaintenanceValue() { + return onHostMaintenance_; + } + + /** + * + * + *
+     * Optional. Defines the maintenance behavior for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for onHostMaintenance to set. + * @return This builder for chaining. + */ + public Builder setOnHostMaintenanceValue(int value) { + onHostMaintenance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Defines the maintenance behavior for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The onHostMaintenance. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance getOnHostMaintenance() { + com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance result = + com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance.forNumber( + onHostMaintenance_); + return result == null + ? com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Defines the maintenance behavior for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The onHostMaintenance to set. + * @return This builder for chaining. + */ + public Builder setOnHostMaintenance( + com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + onHostMaintenance_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Defines the maintenance behavior for this instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearOnHostMaintenance() { + bitField0_ = (bitField0_ & ~0x00000001); + onHostMaintenance_ = 0; + onChanged(); + return this; + } + + private boolean automaticRestart_; + + /** + * + * + *
+     * Optional. Specifies whether the instance should be automatically restarted
+     * if it is terminated by Compute Engine (not terminated by a user).
+     * 
+ * + * optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the automaticRestart field is set. + */ + @java.lang.Override + public boolean hasAutomaticRestart() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Specifies whether the instance should be automatically restarted
+     * if it is terminated by Compute Engine (not terminated by a user).
+     * 
+ * + * optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The automaticRestart. + */ + @java.lang.Override + public boolean getAutomaticRestart() { + return automaticRestart_; + } + + /** + * + * + *
+     * Optional. Specifies whether the instance should be automatically restarted
+     * if it is terminated by Compute Engine (not terminated by a user).
+     * 
+ * + * optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The automaticRestart to set. + * @return This builder for chaining. + */ + public Builder setAutomaticRestart(boolean value) { + + automaticRestart_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies whether the instance should be automatically restarted
+     * if it is terminated by Compute Engine (not terminated by a user).
+     * 
+ * + * optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAutomaticRestart() { + bitField0_ = (bitField0_ & ~0x00000002); + automaticRestart_ = false; + onChanged(); + return this; + } + + private boolean preemptible_; + + /** + * + * + *
+     * Optional. Defines whether the instance is preemptible.
+     * 
+ * + * optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the preemptible field is set. + */ + @java.lang.Override + public boolean hasPreemptible() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. Defines whether the instance is preemptible.
+     * 
+ * + * optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preemptible. + */ + @java.lang.Override + public boolean getPreemptible() { + return preemptible_; + } + + /** + * + * + *
+     * Optional. Defines whether the instance is preemptible.
+     * 
+ * + * optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The preemptible to set. + * @return This builder for chaining. + */ + public Builder setPreemptible(boolean value) { + + preemptible_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Defines whether the instance is preemptible.
+     * 
+ * + * optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPreemptible() { + bitField0_ = (bitField0_ & ~0x00000004); + preemptible_ = false; + onChanged(); + return this; + } + + private java.util.List + nodeAffinities_ = java.util.Collections.emptyList(); + + private void ensureNodeAffinitiesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + nodeAffinities_ = + new java.util.ArrayList( + nodeAffinities_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityOrBuilder> + nodeAffinitiesBuilder_; + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getNodeAffinitiesList() { + if (nodeAffinitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(nodeAffinities_); + } else { + return nodeAffinitiesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getNodeAffinitiesCount() { + if (nodeAffinitiesBuilder_ == null) { + return nodeAffinities_.size(); + } else { + return nodeAffinitiesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity getNodeAffinities(int index) { + if (nodeAffinitiesBuilder_ == null) { + return nodeAffinities_.get(index); + } else { + return nodeAffinitiesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNodeAffinities( + int index, com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity value) { + if (nodeAffinitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.set(index, value); + onChanged(); + } else { + nodeAffinitiesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNodeAffinities( + int index, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder builderForValue) { + if (nodeAffinitiesBuilder_ == null) { + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.set(index, builderForValue.build()); + onChanged(); + } else { + nodeAffinitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNodeAffinities( + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity value) { + if (nodeAffinitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.add(value); + onChanged(); + } else { + nodeAffinitiesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNodeAffinities( + int index, com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity value) { + if (nodeAffinitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.add(index, value); + onChanged(); + } else { + nodeAffinitiesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNodeAffinities( + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder builderForValue) { + if (nodeAffinitiesBuilder_ == null) { + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.add(builderForValue.build()); + onChanged(); + } else { + nodeAffinitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addNodeAffinities( + int index, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder builderForValue) { + if (nodeAffinitiesBuilder_ == null) { + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.add(index, builderForValue.build()); + onChanged(); + } else { + nodeAffinitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllNodeAffinities( + java.lang.Iterable + values) { + if (nodeAffinitiesBuilder_ == null) { + ensureNodeAffinitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodeAffinities_); + onChanged(); + } else { + nodeAffinitiesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNodeAffinities() { + if (nodeAffinitiesBuilder_ == null) { + nodeAffinities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + nodeAffinitiesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeNodeAffinities(int index) { + if (nodeAffinitiesBuilder_ == null) { + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.remove(index); + onChanged(); + } else { + nodeAffinitiesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder + getNodeAffinitiesBuilder(int index) { + return internalGetNodeAffinitiesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityOrBuilder + getNodeAffinitiesOrBuilder(int index) { + if (nodeAffinitiesBuilder_ == null) { + return nodeAffinities_.get(index); + } else { + return nodeAffinitiesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityOrBuilder> + getNodeAffinitiesOrBuilderList() { + if (nodeAffinitiesBuilder_ != null) { + return nodeAffinitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nodeAffinities_); + } + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder + addNodeAffinitiesBuilder() { + return internalGetNodeAffinitiesFieldBuilder() + .addBuilder( + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder + addNodeAffinitiesBuilder(int index) { + return internalGetNodeAffinitiesFieldBuilder() + .addBuilder( + index, com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A set of node affinity and anti-affinity configurations.
+     * Overrides reservationAffinity.
+     * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getNodeAffinitiesBuilderList() { + return internalGetNodeAffinitiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityOrBuilder> + internalGetNodeAffinitiesFieldBuilder() { + if (nodeAffinitiesBuilder_ == null) { + nodeAffinitiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity.Builder, + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityOrBuilder>( + nodeAffinities_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + nodeAffinities_ = null; + } + return nodeAffinitiesBuilder_; + } + + private int minNodeCpus_; + + /** + * + * + *
+     * Optional. The minimum number of virtual CPUs this instance will consume
+     * when running on a sole-tenant node.
+     * 
+ * + * optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minNodeCpus field is set. + */ + @java.lang.Override + public boolean hasMinNodeCpus() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The minimum number of virtual CPUs this instance will consume
+     * when running on a sole-tenant node.
+     * 
+ * + * optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minNodeCpus. + */ + @java.lang.Override + public int getMinNodeCpus() { + return minNodeCpus_; + } + + /** + * + * + *
+     * Optional. The minimum number of virtual CPUs this instance will consume
+     * when running on a sole-tenant node.
+     * 
+ * + * optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minNodeCpus to set. + * @return This builder for chaining. + */ + public Builder setMinNodeCpus(int value) { + + minNodeCpus_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The minimum number of virtual CPUs this instance will consume
+     * when running on a sole-tenant node.
+     * 
+ * + * optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinNodeCpus() { + bitField0_ = (bitField0_ & ~0x00000010); + minNodeCpus_ = 0; + onChanged(); + return this; + } + + private int provisioningModel_ = 0; + + /** + * + * + *
+     * Optional. Specifies the provisioning model of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provisioningModel field is set. + */ + @java.lang.Override + public boolean hasProvisioningModel() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the provisioning model of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for provisioningModel. + */ + @java.lang.Override + public int getProvisioningModelValue() { + return provisioningModel_; + } + + /** + * + * + *
+     * Optional. Specifies the provisioning model of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for provisioningModel to set. + * @return This builder for chaining. + */ + public Builder setProvisioningModelValue(int value) { + provisioningModel_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the provisioning model of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisioningModel. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel getProvisioningModel() { + com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel result = + com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel.forNumber( + provisioningModel_); + return result == null + ? com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies the provisioning model of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The provisioningModel to set. + * @return This builder for chaining. + */ + public Builder setProvisioningModel( + com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + provisioningModel_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the provisioning model of the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearProvisioningModel() { + bitField0_ = (bitField0_ & ~0x00000020); + provisioningModel_ = 0; + onChanged(); + return this; + } + + private int instanceTerminationAction_ = 0; + + /** + * + * + *
+     * Optional. Specifies the termination action for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instanceTerminationAction field is set. + */ + @java.lang.Override + public boolean hasInstanceTerminationAction() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the termination action for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for instanceTerminationAction. + */ + @java.lang.Override + public int getInstanceTerminationActionValue() { + return instanceTerminationAction_; + } + + /** + * + * + *
+     * Optional. Specifies the termination action for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for instanceTerminationAction to set. + * @return This builder for chaining. + */ + public Builder setInstanceTerminationActionValue(int value) { + instanceTerminationAction_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the termination action for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instanceTerminationAction. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction + getInstanceTerminationAction() { + com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction result = + com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction.forNumber( + instanceTerminationAction_); + return result == null + ? com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Specifies the termination action for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The instanceTerminationAction to set. + * @return This builder for chaining. + */ + public Builder setInstanceTerminationAction( + com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + instanceTerminationAction_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the termination action for the instance.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearInstanceTerminationAction() { + bitField0_ = (bitField0_ & ~0x00000040); + instanceTerminationAction_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.SchedulingDuration localSsdRecoveryTimeout_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.SchedulingDuration, + com.google.cloud.backupdr.v1beta.SchedulingDuration.Builder, + com.google.cloud.backupdr.v1beta.SchedulingDurationOrBuilder> + localSsdRecoveryTimeoutBuilder_; + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the localSsdRecoveryTimeout field is set. + */ + public boolean hasLocalSsdRecoveryTimeout() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The localSsdRecoveryTimeout. + */ + public com.google.cloud.backupdr.v1beta.SchedulingDuration getLocalSsdRecoveryTimeout() { + if (localSsdRecoveryTimeoutBuilder_ == null) { + return localSsdRecoveryTimeout_ == null + ? com.google.cloud.backupdr.v1beta.SchedulingDuration.getDefaultInstance() + : localSsdRecoveryTimeout_; + } else { + return localSsdRecoveryTimeoutBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLocalSsdRecoveryTimeout( + com.google.cloud.backupdr.v1beta.SchedulingDuration value) { + if (localSsdRecoveryTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + localSsdRecoveryTimeout_ = value; + } else { + localSsdRecoveryTimeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLocalSsdRecoveryTimeout( + com.google.cloud.backupdr.v1beta.SchedulingDuration.Builder builderForValue) { + if (localSsdRecoveryTimeoutBuilder_ == null) { + localSsdRecoveryTimeout_ = builderForValue.build(); + } else { + localSsdRecoveryTimeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLocalSsdRecoveryTimeout( + com.google.cloud.backupdr.v1beta.SchedulingDuration value) { + if (localSsdRecoveryTimeoutBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && localSsdRecoveryTimeout_ != null + && localSsdRecoveryTimeout_ + != com.google.cloud.backupdr.v1beta.SchedulingDuration.getDefaultInstance()) { + getLocalSsdRecoveryTimeoutBuilder().mergeFrom(value); + } else { + localSsdRecoveryTimeout_ = value; + } + } else { + localSsdRecoveryTimeoutBuilder_.mergeFrom(value); + } + if (localSsdRecoveryTimeout_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLocalSsdRecoveryTimeout() { + bitField0_ = (bitField0_ & ~0x00000080); + localSsdRecoveryTimeout_ = null; + if (localSsdRecoveryTimeoutBuilder_ != null) { + localSsdRecoveryTimeoutBuilder_.dispose(); + localSsdRecoveryTimeoutBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.SchedulingDuration.Builder + getLocalSsdRecoveryTimeoutBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetLocalSsdRecoveryTimeoutFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.SchedulingDurationOrBuilder + getLocalSsdRecoveryTimeoutOrBuilder() { + if (localSsdRecoveryTimeoutBuilder_ != null) { + return localSsdRecoveryTimeoutBuilder_.getMessageOrBuilder(); + } else { + return localSsdRecoveryTimeout_ == null + ? com.google.cloud.backupdr.v1beta.SchedulingDuration.getDefaultInstance() + : localSsdRecoveryTimeout_; + } + } + + /** + * + * + *
+     * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+     * while recovery of the Local Ssd state is attempted. Its value should be in
+     * between 0 and 168 hours with hour granularity and the default value being 1
+     * hour.
+     * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.SchedulingDuration, + com.google.cloud.backupdr.v1beta.SchedulingDuration.Builder, + com.google.cloud.backupdr.v1beta.SchedulingDurationOrBuilder> + internalGetLocalSsdRecoveryTimeoutFieldBuilder() { + if (localSsdRecoveryTimeoutBuilder_ == null) { + localSsdRecoveryTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.SchedulingDuration, + com.google.cloud.backupdr.v1beta.SchedulingDuration.Builder, + com.google.cloud.backupdr.v1beta.SchedulingDurationOrBuilder>( + getLocalSsdRecoveryTimeout(), getParentForChildren(), isClean()); + localSsdRecoveryTimeout_ = null; + } + return localSsdRecoveryTimeoutBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.Scheduling) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.Scheduling) + private static final com.google.cloud.backupdr.v1beta.Scheduling DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.Scheduling(); + } + + public static com.google.cloud.backupdr.v1beta.Scheduling getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Scheduling 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.backupdr.v1beta.Scheduling getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingDuration.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingDuration.java new file mode 100644 index 000000000000..33decd4998ff --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingDuration.java @@ -0,0 +1,691 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A SchedulingDuration represents a fixed-length span of time represented
+ * as a count of seconds and fractions of seconds at nanosecond
+ * resolution. It is independent of any calendar and concepts like "day"
+ * or "month". Range is approximately 10,000 years.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.SchedulingDuration} + */ +@com.google.protobuf.Generated +public final class SchedulingDuration extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.SchedulingDuration) + SchedulingDurationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "SchedulingDuration"); + } + + // Use SchedulingDuration.newBuilder() to construct. + private SchedulingDuration(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SchedulingDuration() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_SchedulingDuration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_SchedulingDuration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.SchedulingDuration.class, + com.google.cloud.backupdr.v1beta.SchedulingDuration.Builder.class); + } + + private int bitField0_; + public static final int SECONDS_FIELD_NUMBER = 1; + private long seconds_ = 0L; + + /** + * + * + *
+   * Optional. Span of time at a resolution of a second.
+   * 
+ * + * optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the seconds field is set. + */ + @java.lang.Override + public boolean hasSeconds() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Span of time at a resolution of a second.
+   * 
+ * + * optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The seconds. + */ + @java.lang.Override + public long getSeconds() { + return seconds_; + } + + public static final int NANOS_FIELD_NUMBER = 2; + private int nanos_ = 0; + + /** + * + * + *
+   * Optional. Span of time that's a fraction of a second at nanosecond
+   * resolution.
+   * 
+ * + * optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the nanos field is set. + */ + @java.lang.Override + public boolean hasNanos() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Span of time that's a fraction of a second at nanosecond
+   * resolution.
+   * 
+ * + * optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nanos. + */ + @java.lang.Override + public int getNanos() { + return nanos_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeInt64(1, seconds_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeInt32(2, nanos_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, seconds_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, nanos_); + } + 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.backupdr.v1beta.SchedulingDuration)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.SchedulingDuration other = + (com.google.cloud.backupdr.v1beta.SchedulingDuration) obj; + + if (hasSeconds() != other.hasSeconds()) return false; + if (hasSeconds()) { + if (getSeconds() != other.getSeconds()) return false; + } + if (hasNanos() != other.hasNanos()) return false; + if (hasNanos()) { + if (getNanos() != other.getNanos()) 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 (hasSeconds()) { + hash = (37 * hash) + SECONDS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSeconds()); + } + if (hasNanos()) { + hash = (37 * hash) + NANOS_FIELD_NUMBER; + hash = (53 * hash) + getNanos(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration 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.backupdr.v1beta.SchedulingDuration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration 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.backupdr.v1beta.SchedulingDuration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.SchedulingDuration 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A SchedulingDuration represents a fixed-length span of time represented
+   * as a count of seconds and fractions of seconds at nanosecond
+   * resolution. It is independent of any calendar and concepts like "day"
+   * or "month". Range is approximately 10,000 years.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.SchedulingDuration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.SchedulingDuration) + com.google.cloud.backupdr.v1beta.SchedulingDurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_SchedulingDuration_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_SchedulingDuration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.SchedulingDuration.class, + com.google.cloud.backupdr.v1beta.SchedulingDuration.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.SchedulingDuration.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + seconds_ = 0L; + nanos_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_SchedulingDuration_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.SchedulingDuration getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.SchedulingDuration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.SchedulingDuration build() { + com.google.cloud.backupdr.v1beta.SchedulingDuration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.SchedulingDuration buildPartial() { + com.google.cloud.backupdr.v1beta.SchedulingDuration result = + new com.google.cloud.backupdr.v1beta.SchedulingDuration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.SchedulingDuration result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.seconds_ = seconds_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nanos_ = nanos_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.SchedulingDuration) { + return mergeFrom((com.google.cloud.backupdr.v1beta.SchedulingDuration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.SchedulingDuration other) { + if (other == com.google.cloud.backupdr.v1beta.SchedulingDuration.getDefaultInstance()) + return this; + if (other.hasSeconds()) { + setSeconds(other.getSeconds()); + } + if (other.hasNanos()) { + setNanos(other.getNanos()); + } + 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 8: + { + seconds_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + nanos_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 long seconds_; + + /** + * + * + *
+     * Optional. Span of time at a resolution of a second.
+     * 
+ * + * optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the seconds field is set. + */ + @java.lang.Override + public boolean hasSeconds() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Span of time at a resolution of a second.
+     * 
+ * + * optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The seconds. + */ + @java.lang.Override + public long getSeconds() { + return seconds_; + } + + /** + * + * + *
+     * Optional. Span of time at a resolution of a second.
+     * 
+ * + * optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The seconds to set. + * @return This builder for chaining. + */ + public Builder setSeconds(long value) { + + seconds_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Span of time at a resolution of a second.
+     * 
+ * + * optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSeconds() { + bitField0_ = (bitField0_ & ~0x00000001); + seconds_ = 0L; + onChanged(); + return this; + } + + private int nanos_; + + /** + * + * + *
+     * Optional. Span of time that's a fraction of a second at nanosecond
+     * resolution.
+     * 
+ * + * optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the nanos field is set. + */ + @java.lang.Override + public boolean hasNanos() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Span of time that's a fraction of a second at nanosecond
+     * resolution.
+     * 
+ * + * optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nanos. + */ + @java.lang.Override + public int getNanos() { + return nanos_; + } + + /** + * + * + *
+     * Optional. Span of time that's a fraction of a second at nanosecond
+     * resolution.
+     * 
+ * + * optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nanos to set. + * @return This builder for chaining. + */ + public Builder setNanos(int value) { + + nanos_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Span of time that's a fraction of a second at nanosecond
+     * resolution.
+     * 
+ * + * optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNanos() { + bitField0_ = (bitField0_ & ~0x00000002); + nanos_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.SchedulingDuration) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.SchedulingDuration) + private static final com.google.cloud.backupdr.v1beta.SchedulingDuration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.SchedulingDuration(); + } + + public static com.google.cloud.backupdr.v1beta.SchedulingDuration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchedulingDuration 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.backupdr.v1beta.SchedulingDuration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingDurationOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingDurationOrBuilder.java new file mode 100644 index 000000000000..a3b7d629109e --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingDurationOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface SchedulingDurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.SchedulingDuration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Span of time at a resolution of a second.
+   * 
+ * + * optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the seconds field is set. + */ + boolean hasSeconds(); + + /** + * + * + *
+   * Optional. Span of time at a resolution of a second.
+   * 
+ * + * optional int64 seconds = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The seconds. + */ + long getSeconds(); + + /** + * + * + *
+   * Optional. Span of time that's a fraction of a second at nanosecond
+   * resolution.
+   * 
+ * + * optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the nanos field is set. + */ + boolean hasNanos(); + + /** + * + * + *
+   * Optional. Span of time that's a fraction of a second at nanosecond
+   * resolution.
+   * 
+ * + * optional int32 nanos = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nanos. + */ + int getNanos(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingOrBuilder.java new file mode 100644 index 000000000000..65c49eb083cc --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/SchedulingOrBuilder.java @@ -0,0 +1,371 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface SchedulingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.Scheduling) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Defines the maintenance behavior for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the onHostMaintenance field is set. + */ + boolean hasOnHostMaintenance(); + + /** + * + * + *
+   * Optional. Defines the maintenance behavior for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for onHostMaintenance. + */ + int getOnHostMaintenanceValue(); + + /** + * + * + *
+   * Optional. Defines the maintenance behavior for this instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance on_host_maintenance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The onHostMaintenance. + */ + com.google.cloud.backupdr.v1beta.Scheduling.OnHostMaintenance getOnHostMaintenance(); + + /** + * + * + *
+   * Optional. Specifies whether the instance should be automatically restarted
+   * if it is terminated by Compute Engine (not terminated by a user).
+   * 
+ * + * optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the automaticRestart field is set. + */ + boolean hasAutomaticRestart(); + + /** + * + * + *
+   * Optional. Specifies whether the instance should be automatically restarted
+   * if it is terminated by Compute Engine (not terminated by a user).
+   * 
+ * + * optional bool automatic_restart = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The automaticRestart. + */ + boolean getAutomaticRestart(); + + /** + * + * + *
+   * Optional. Defines whether the instance is preemptible.
+   * 
+ * + * optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the preemptible field is set. + */ + boolean hasPreemptible(); + + /** + * + * + *
+   * Optional. Defines whether the instance is preemptible.
+   * 
+ * + * optional bool preemptible = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preemptible. + */ + boolean getPreemptible(); + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getNodeAffinitiesList(); + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinity getNodeAffinities(int index); + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getNodeAffinitiesCount(); + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getNodeAffinitiesOrBuilderList(); + + /** + * + * + *
+   * Optional. A set of node affinity and anti-affinity configurations.
+   * Overrides reservationAffinity.
+   * 
+ * + * + * repeated .google.cloud.backupdr.v1beta.Scheduling.NodeAffinity node_affinities = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.Scheduling.NodeAffinityOrBuilder getNodeAffinitiesOrBuilder( + int index); + + /** + * + * + *
+   * Optional. The minimum number of virtual CPUs this instance will consume
+   * when running on a sole-tenant node.
+   * 
+ * + * optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minNodeCpus field is set. + */ + boolean hasMinNodeCpus(); + + /** + * + * + *
+   * Optional. The minimum number of virtual CPUs this instance will consume
+   * when running on a sole-tenant node.
+   * 
+ * + * optional int32 min_node_cpus = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minNodeCpus. + */ + int getMinNodeCpus(); + + /** + * + * + *
+   * Optional. Specifies the provisioning model of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the provisioningModel field is set. + */ + boolean hasProvisioningModel(); + + /** + * + * + *
+   * Optional. Specifies the provisioning model of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for provisioningModel. + */ + int getProvisioningModelValue(); + + /** + * + * + *
+   * Optional. Specifies the provisioning model of the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel provisioning_model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisioningModel. + */ + com.google.cloud.backupdr.v1beta.Scheduling.ProvisioningModel getProvisioningModel(); + + /** + * + * + *
+   * Optional. Specifies the termination action for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the instanceTerminationAction field is set. + */ + boolean hasInstanceTerminationAction(); + + /** + * + * + *
+   * Optional. Specifies the termination action for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for instanceTerminationAction. + */ + int getInstanceTerminationActionValue(); + + /** + * + * + *
+   * Optional. Specifies the termination action for the instance.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction instance_termination_action = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The instanceTerminationAction. + */ + com.google.cloud.backupdr.v1beta.Scheduling.InstanceTerminationAction + getInstanceTerminationAction(); + + /** + * + * + *
+   * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+   * while recovery of the Local Ssd state is attempted. Its value should be in
+   * between 0 and 168 hours with hour granularity and the default value being 1
+   * hour.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the localSsdRecoveryTimeout field is set. + */ + boolean hasLocalSsdRecoveryTimeout(); + + /** + * + * + *
+   * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+   * while recovery of the Local Ssd state is attempted. Its value should be in
+   * between 0 and 168 hours with hour granularity and the default value being 1
+   * hour.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The localSsdRecoveryTimeout. + */ + com.google.cloud.backupdr.v1beta.SchedulingDuration getLocalSsdRecoveryTimeout(); + + /** + * + * + *
+   * Optional. Specifies the maximum amount of time a Local Ssd Vm should wait
+   * while recovery of the Local Ssd state is attempted. Its value should be in
+   * between 0 and 168 hours with hour granularity and the default value being 1
+   * hour.
+   * 
+ * + * + * optional .google.cloud.backupdr.v1beta.SchedulingDuration local_ssd_recovery_timeout = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.SchedulingDurationOrBuilder + getLocalSsdRecoveryTimeoutOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceAccount.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceAccount.java new file mode 100644 index 000000000000..24dc11422b10 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceAccount.java @@ -0,0 +1,926 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A service account.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ServiceAccount} + */ +@com.google.protobuf.Generated +public final class ServiceAccount extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ServiceAccount) + ServiceAccountOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ServiceAccount"); + } + + // Use ServiceAccount.newBuilder() to construct. + private ServiceAccount(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ServiceAccount() { + email_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ServiceAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ServiceAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ServiceAccount.class, + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder.class); + } + + private int bitField0_; + public static final int EMAIL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object email_ = ""; + + /** + * + * + *
+   * Optional. Email address of the service account.
+   * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the email field is set. + */ + @java.lang.Override + public boolean hasEmail() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Email address of the service account.
+   * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + 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(); + email_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Email address of the service account.
+   * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The list of scopes to be made available for this service account.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + + /** + * + * + *
+   * Optional. The list of scopes to be made available for this service account.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+   * Optional. The list of scopes to be made available for this service account.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+   * Optional. The list of scopes to be made available for this service account.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.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 { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, email_); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, scopes_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, email_); + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().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.backupdr.v1beta.ServiceAccount)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ServiceAccount other = + (com.google.cloud.backupdr.v1beta.ServiceAccount) obj; + + if (hasEmail() != other.hasEmail()) return false; + if (hasEmail()) { + if (!getEmail().equals(other.getEmail())) return false; + } + if (!getScopesList().equals(other.getScopesList())) 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 (hasEmail()) { + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + } + if (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount 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.backupdr.v1beta.ServiceAccount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount 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.backupdr.v1beta.ServiceAccount parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ServiceAccount 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A service account.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ServiceAccount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ServiceAccount) + com.google.cloud.backupdr.v1beta.ServiceAccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ServiceAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ServiceAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ServiceAccount.class, + com.google.cloud.backupdr.v1beta.ServiceAccount.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ServiceAccount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + email_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_ServiceAccount_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceAccount getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ServiceAccount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceAccount build() { + com.google.cloud.backupdr.v1beta.ServiceAccount result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceAccount buildPartial() { + com.google.cloud.backupdr.v1beta.ServiceAccount result = + new com.google.cloud.backupdr.v1beta.ServiceAccount(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ServiceAccount result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.email_ = email_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + scopes_.makeImmutable(); + result.scopes_ = scopes_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ServiceAccount) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ServiceAccount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ServiceAccount other) { + if (other == com.google.cloud.backupdr.v1beta.ServiceAccount.getDefaultInstance()) + return this; + if (other.hasEmail()) { + email_ = other.email_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ |= 0x00000002; + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + 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: + { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + 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 java.lang.Object email_ = ""; + + /** + * + * + *
+     * Optional. Email address of the service account.
+     * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the email field is set. + */ + public boolean hasEmail() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Email address of the service account.
+     * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Email address of the service account.
+     * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for email. + */ + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Email address of the service account.
+     * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + email_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Email address of the service account.
+     * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEmail() { + email_ = getDefaultInstance().getEmail(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Email address of the service account.
+     * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + email_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureScopesIsMutable() { + if (!scopes_.isModifiable()) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + scopes_.makeImmutable(); + return scopes_; + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of scopes to be made available for this service account.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ServiceAccount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ServiceAccount) + private static final com.google.cloud.backupdr.v1beta.ServiceAccount DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ServiceAccount(); + } + + public static com.google.cloud.backupdr.v1beta.ServiceAccount getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceAccount 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.backupdr.v1beta.ServiceAccount getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceAccountOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceAccountOrBuilder.java new file mode 100644 index 000000000000..f7ff8dec1248 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceAccountOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ServiceAccountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ServiceAccount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Email address of the service account.
+   * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the email field is set. + */ + boolean hasEmail(); + + /** + * + * + *
+   * Optional. Email address of the service account.
+   * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The email. + */ + java.lang.String getEmail(); + + /** + * + * + *
+   * Optional. Email address of the service account.
+   * 
+ * + * optional string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for email. + */ + com.google.protobuf.ByteString getEmailBytes(); + + /** + * + * + *
+   * Optional. The list of scopes to be made available for this service account.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + + /** + * + * + *
+   * Optional. The list of scopes to be made available for this service account.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of scopes. + */ + int getScopesCount(); + + /** + * + * + *
+   * Optional. The list of scopes to be made available for this service account.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + + /** + * + * + *
+   * Optional. The list of scopes to be made available for this service account.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceLockInfo.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceLockInfo.java new file mode 100644 index 000000000000..668ba1579f10 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceLockInfo.java @@ -0,0 +1,605 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ServiceLockInfo represents the details of a lock taken by the service on a
+ * Backup resource.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ServiceLockInfo} + */ +@com.google.protobuf.Generated +public final class ServiceLockInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.ServiceLockInfo) + ServiceLockInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ServiceLockInfo"); + } + + // Use ServiceLockInfo.newBuilder() to construct. + private ServiceLockInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ServiceLockInfo() { + operation_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ServiceLockInfo.class, + com.google.cloud.backupdr.v1beta.ServiceLockInfo.Builder.class); + } + + public static final int OPERATION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object operation_ = ""; + + /** + * + * + *
+   * Output only. The name of the operation that created this lock.
+   * The lock will automatically be released when the operation completes.
+   * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The operation. + */ + @java.lang.Override + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + 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(); + operation_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The name of the operation that created this lock.
+   * The lock will automatically be released when the operation completes.
+   * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for operation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = 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.GeneratedMessage.isStringEmpty(operation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, operation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(operation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, operation_); + } + 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.backupdr.v1beta.ServiceLockInfo)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.ServiceLockInfo other = + (com.google.cloud.backupdr.v1beta.ServiceLockInfo) obj; + + if (!getOperation().equals(other.getOperation())) 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) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getOperation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo 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.backupdr.v1beta.ServiceLockInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo 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.backupdr.v1beta.ServiceLockInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.ServiceLockInfo 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ServiceLockInfo represents the details of a lock taken by the service on a
+   * Backup resource.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.ServiceLockInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.ServiceLockInfo) + com.google.cloud.backupdr.v1beta.ServiceLockInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.ServiceLockInfo.class, + com.google.cloud.backupdr.v1beta.ServiceLockInfo.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.ServiceLockInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + operation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_ServiceLockInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceLockInfo getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceLockInfo build() { + com.google.cloud.backupdr.v1beta.ServiceLockInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.ServiceLockInfo buildPartial() { + com.google.cloud.backupdr.v1beta.ServiceLockInfo result = + new com.google.cloud.backupdr.v1beta.ServiceLockInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.ServiceLockInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.operation_ = operation_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.ServiceLockInfo) { + return mergeFrom((com.google.cloud.backupdr.v1beta.ServiceLockInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.ServiceLockInfo other) { + if (other == com.google.cloud.backupdr.v1beta.ServiceLockInfo.getDefaultInstance()) + return this; + if (!other.getOperation().isEmpty()) { + operation_ = other.operation_; + 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: + { + operation_ = 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 operation_ = ""; + + /** + * + * + *
+     * Output only. The name of the operation that created this lock.
+     * The lock will automatically be released when the operation completes.
+     * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The operation. + */ + public java.lang.String getOperation() { + java.lang.Object ref = operation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + operation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The name of the operation that created this lock.
+     * The lock will automatically be released when the operation completes.
+     * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for operation. + */ + public com.google.protobuf.ByteString getOperationBytes() { + java.lang.Object ref = operation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + operation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The name of the operation that created this lock.
+     * The lock will automatically be released when the operation completes.
+     * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The name of the operation that created this lock.
+     * The lock will automatically be released when the operation completes.
+     * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearOperation() { + operation_ = getDefaultInstance().getOperation(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The name of the operation that created this lock.
+     * The lock will automatically be released when the operation completes.
+     * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for operation to set. + * @return This builder for chaining. + */ + public Builder setOperationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + operation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.ServiceLockInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.ServiceLockInfo) + private static final com.google.cloud.backupdr.v1beta.ServiceLockInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.ServiceLockInfo(); + } + + public static com.google.cloud.backupdr.v1beta.ServiceLockInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceLockInfo 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.backupdr.v1beta.ServiceLockInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceLockInfoOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceLockInfoOrBuilder.java new file mode 100644 index 000000000000..83e7701a7f51 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/ServiceLockInfoOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface ServiceLockInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.ServiceLockInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the operation that created this lock.
+   * The lock will automatically be released when the operation completes.
+   * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The operation. + */ + java.lang.String getOperation(); + + /** + * + * + *
+   * Output only. The name of the operation that created this lock.
+   * The lock will automatically be released when the operation completes.
+   * 
+ * + * string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for operation. + */ + com.google.protobuf.ByteString getOperationBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/StandardSchedule.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/StandardSchedule.java new file mode 100644 index 000000000000..4eff439f4dc2 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/StandardSchedule.java @@ -0,0 +1,3230 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * `StandardSchedule` defines a schedule that run within the confines of a
+ * defined window of days. We can define recurrence type for schedule as
+ * HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.StandardSchedule} + */ +@com.google.protobuf.Generated +public final class StandardSchedule extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.StandardSchedule) + StandardScheduleOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "StandardSchedule"); + } + + // Use StandardSchedule.newBuilder() to construct. + private StandardSchedule(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StandardSchedule() { + recurrenceType_ = 0; + daysOfWeek_ = emptyIntList(); + daysOfMonth_ = emptyIntList(); + months_ = emptyIntList(); + timeZone_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_StandardSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_StandardSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.StandardSchedule.class, + com.google.cloud.backupdr.v1beta.StandardSchedule.Builder.class); + } + + /** + * + * + *
+   * `RecurrenceTypes` enumerates the applicable periodicity for the schedule.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType} + */ + public enum RecurrenceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * recurrence type not set
+     * 
+ * + * RECURRENCE_TYPE_UNSPECIFIED = 0; + */ + RECURRENCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The `BackupRule` is to be applied hourly.
+     * 
+ * + * HOURLY = 1; + */ + HOURLY(1), + /** + * + * + *
+     * The `BackupRule` is to be applied daily.
+     * 
+ * + * DAILY = 2; + */ + DAILY(2), + /** + * + * + *
+     * The `BackupRule` is to be applied weekly.
+     * 
+ * + * WEEKLY = 3; + */ + WEEKLY(3), + /** + * + * + *
+     * The `BackupRule` is to be applied monthly.
+     * 
+ * + * MONTHLY = 4; + */ + MONTHLY(4), + /** + * + * + *
+     * The `BackupRule` is to be applied yearly.
+     * 
+ * + * YEARLY = 5; + */ + YEARLY(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "RecurrenceType"); + } + + /** + * + * + *
+     * recurrence type not set
+     * 
+ * + * RECURRENCE_TYPE_UNSPECIFIED = 0; + */ + public static final int RECURRENCE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The `BackupRule` is to be applied hourly.
+     * 
+ * + * HOURLY = 1; + */ + public static final int HOURLY_VALUE = 1; + + /** + * + * + *
+     * The `BackupRule` is to be applied daily.
+     * 
+ * + * DAILY = 2; + */ + public static final int DAILY_VALUE = 2; + + /** + * + * + *
+     * The `BackupRule` is to be applied weekly.
+     * 
+ * + * WEEKLY = 3; + */ + public static final int WEEKLY_VALUE = 3; + + /** + * + * + *
+     * The `BackupRule` is to be applied monthly.
+     * 
+ * + * MONTHLY = 4; + */ + public static final int MONTHLY_VALUE = 4; + + /** + * + * + *
+     * The `BackupRule` is to be applied yearly.
+     * 
+ * + * YEARLY = 5; + */ + public static final int YEARLY_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 RecurrenceType 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 RecurrenceType forNumber(int value) { + switch (value) { + case 0: + return RECURRENCE_TYPE_UNSPECIFIED; + case 1: + return HOURLY; + case 2: + return DAILY; + case 3: + return WEEKLY; + case 4: + return MONTHLY; + case 5: + return YEARLY; + 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 RecurrenceType findValueByNumber(int number) { + return RecurrenceType.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.StandardSchedule.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RecurrenceType[] VALUES = values(); + + public static RecurrenceType 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 RecurrenceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType) + } + + private int bitField0_; + public static final int RECURRENCE_TYPE_FIELD_NUMBER = 1; + private int recurrenceType_ = 0; + + /** + * + * + *
+   * Required. Specifies the `RecurrenceType` for the schedule.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for recurrenceType. + */ + @java.lang.Override + public int getRecurrenceTypeValue() { + return recurrenceType_; + } + + /** + * + * + *
+   * Required. Specifies the `RecurrenceType` for the schedule.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurrenceType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType getRecurrenceType() { + com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType result = + com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType.forNumber(recurrenceType_); + return result == null + ? com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType.UNRECOGNIZED + : result; + } + + public static final int HOURLY_FREQUENCY_FIELD_NUMBER = 2; + private int hourlyFrequency_ = 0; + + /** + * + * + *
+   * Optional. Specifies frequency for hourly backups. A hourly frequency of 2
+   * means jobs will run every 2 hours from start time till end time defined.
+   *
+   * This is required for `recurrence_type`, `HOURLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `HOURLY`.
+   *
+   * The supported values for each resource type are as follows:
+   *
+   * * `compute.googleapis.com/Instance`: 1-23
+   * * `compute.googleapis.com/Disk`: 1-23
+   * * `sqladmin.googleapis.com/Instance`: 6-23
+   * * `alloydb.googleapis.com/Cluster`: 1-23
+   * * `file.googleapis.com/Instance`: 1-23
+   *
+   * Refer to link
+   * https://cloud.google.com/backup-disaster-recovery/docs/concepts/cloud_best_practices
+   * for more details.
+   * 
+ * + * int32 hourly_frequency = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hourlyFrequency. + */ + @java.lang.Override + public int getHourlyFrequency() { + return hourlyFrequency_; + } + + public static final int DAYS_OF_WEEK_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList daysOfWeek_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.type.DayOfWeek> + daysOfWeek_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.type.DayOfWeek>() { + public com.google.type.DayOfWeek convert(int from) { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(from); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + }; + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the daysOfWeek. + */ + @java.lang.Override + public java.util.List getDaysOfWeekList() { + return new com.google.protobuf.Internal.IntListAdapter( + daysOfWeek_, daysOfWeek_converter_); + } + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of daysOfWeek. + */ + @java.lang.Override + public int getDaysOfWeekCount() { + return daysOfWeek_.size(); + } + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The daysOfWeek at the given index. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDaysOfWeek(int index) { + return daysOfWeek_converter_.convert(daysOfWeek_.getInt(index)); + } + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for daysOfWeek. + */ + @java.lang.Override + public java.util.List getDaysOfWeekValueList() { + return daysOfWeek_; + } + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of daysOfWeek at the given index. + */ + @java.lang.Override + public int getDaysOfWeekValue(int index) { + return daysOfWeek_.getInt(index); + } + + private int daysOfWeekMemoizedSerializedSize; + + public static final int DAYS_OF_MONTH_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList daysOfMonth_ = emptyIntList(); + + /** + * + * + *
+   * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+   *
+   * Values for `days_of_month` are only applicable for `recurrence_type`,
+   * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+   * supplied.
+   * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the daysOfMonth. + */ + @java.lang.Override + public java.util.List getDaysOfMonthList() { + return daysOfMonth_; + } + + /** + * + * + *
+   * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+   *
+   * Values for `days_of_month` are only applicable for `recurrence_type`,
+   * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+   * supplied.
+   * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of daysOfMonth. + */ + public int getDaysOfMonthCount() { + return daysOfMonth_.size(); + } + + /** + * + * + *
+   * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+   *
+   * Values for `days_of_month` are only applicable for `recurrence_type`,
+   * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+   * supplied.
+   * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The daysOfMonth at the given index. + */ + public int getDaysOfMonth(int index) { + return daysOfMonth_.getInt(index); + } + + private int daysOfMonthMemoizedSerializedSize = -1; + + public static final int WEEK_DAY_OF_MONTH_FIELD_NUMBER = 5; + private com.google.cloud.backupdr.v1beta.WeekDayOfMonth weekDayOfMonth_; + + /** + * + * + *
+   * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+   * MONDAY, on which jobs will run. This will be specified by two fields in
+   * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+   * e.g. `LAST`.
+   *
+   * This field is only applicable for `recurrence_type`, `MONTHLY` and
+   * `YEARLY`. A validation error will occur if other values are supplied.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the weekDayOfMonth field is set. + */ + @java.lang.Override + public boolean hasWeekDayOfMonth() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+   * MONDAY, on which jobs will run. This will be specified by two fields in
+   * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+   * e.g. `LAST`.
+   *
+   * This field is only applicable for `recurrence_type`, `MONTHLY` and
+   * `YEARLY`. A validation error will occur if other values are supplied.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weekDayOfMonth. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WeekDayOfMonth getWeekDayOfMonth() { + return weekDayOfMonth_ == null + ? com.google.cloud.backupdr.v1beta.WeekDayOfMonth.getDefaultInstance() + : weekDayOfMonth_; + } + + /** + * + * + *
+   * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+   * MONDAY, on which jobs will run. This will be specified by two fields in
+   * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+   * e.g. `LAST`.
+   *
+   * This field is only applicable for `recurrence_type`, `MONTHLY` and
+   * `YEARLY`. A validation error will occur if other values are supplied.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WeekDayOfMonthOrBuilder getWeekDayOfMonthOrBuilder() { + return weekDayOfMonth_ == null + ? com.google.cloud.backupdr.v1beta.WeekDayOfMonth.getDefaultInstance() + : weekDayOfMonth_; + } + + public static final int MONTHS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList months_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.type.Month> + months_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter() { + public com.google.type.Month convert(int from) { + com.google.type.Month result = com.google.type.Month.forNumber(from); + return result == null ? com.google.type.Month.UNRECOGNIZED : result; + } + }; + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the months. + */ + @java.lang.Override + public java.util.List getMonthsList() { + return new com.google.protobuf.Internal.IntListAdapter( + months_, months_converter_); + } + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of months. + */ + @java.lang.Override + public int getMonthsCount() { + return months_.size(); + } + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The months at the given index. + */ + @java.lang.Override + public com.google.type.Month getMonths(int index) { + return months_converter_.convert(months_.getInt(index)); + } + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the enum numeric values on the wire for months. + */ + @java.lang.Override + public java.util.List getMonthsValueList() { + return months_; + } + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of months at the given index. + */ + @java.lang.Override + public int getMonthsValue(int index) { + return months_.getInt(index); + } + + private int monthsMemoizedSerializedSize; + + public static final int BACKUP_WINDOW_FIELD_NUMBER = 7; + private com.google.cloud.backupdr.v1beta.BackupWindow backupWindow_; + + /** + * + * + *
+   * Required. A BackupWindow defines the window of day during which backup jobs
+   * will run. Jobs are queued at the beginning of the window and will be marked
+   * as `NOT_RUN` if they do not start by the end of the window.
+   *
+   * Note: running jobs will not be cancelled at the end of the window.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupWindow field is set. + */ + @java.lang.Override + public boolean hasBackupWindow() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. A BackupWindow defines the window of day during which backup jobs
+   * will run. Jobs are queued at the beginning of the window and will be marked
+   * as `NOT_RUN` if they do not start by the end of the window.
+   *
+   * Note: running jobs will not be cancelled at the end of the window.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupWindow. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupWindow getBackupWindow() { + return backupWindow_ == null + ? com.google.cloud.backupdr.v1beta.BackupWindow.getDefaultInstance() + : backupWindow_; + } + + /** + * + * + *
+   * Required. A BackupWindow defines the window of day during which backup jobs
+   * will run. Jobs are queued at the beginning of the window and will be marked
+   * as `NOT_RUN` if they do not start by the end of the window.
+   *
+   * Note: running jobs will not be cancelled at the end of the window.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupWindowOrBuilder getBackupWindowOrBuilder() { + return backupWindow_ == null + ? com.google.cloud.backupdr.v1beta.BackupWindow.getDefaultInstance() + : backupWindow_; + } + + public static final int TIME_ZONE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object timeZone_ = ""; + + /** + * + * + *
+   * Required. The time zone to be used when interpreting the schedule.
+   * The value of this field must be a time zone name from the IANA tz database.
+   * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+   * list of valid timezone names. For e.g., Europe/Paris.
+   * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + @java.lang.Override + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + 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(); + timeZone_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The time zone to be used when interpreting the schedule.
+   * The value of this field must be a time zone name from the IANA tz database.
+   * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+   * list of valid timezone names. For e.g., Europe/Paris.
+   * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = 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 { + getSerializedSize(); + if (recurrenceType_ + != com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType + .RECURRENCE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, recurrenceType_); + } + if (hourlyFrequency_ != 0) { + output.writeInt32(2, hourlyFrequency_); + } + if (getDaysOfWeekList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(daysOfWeekMemoizedSerializedSize); + } + for (int i = 0; i < daysOfWeek_.size(); i++) { + output.writeEnumNoTag(daysOfWeek_.getInt(i)); + } + if (getDaysOfMonthList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(daysOfMonthMemoizedSerializedSize); + } + for (int i = 0; i < daysOfMonth_.size(); i++) { + output.writeInt32NoTag(daysOfMonth_.getInt(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getWeekDayOfMonth()); + } + if (getMonthsList().size() > 0) { + output.writeUInt32NoTag(50); + output.writeUInt32NoTag(monthsMemoizedSerializedSize); + } + for (int i = 0; i < months_.size(); i++) { + output.writeEnumNoTag(months_.getInt(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getBackupWindow()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, timeZone_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (recurrenceType_ + != com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType + .RECURRENCE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, recurrenceType_); + } + if (hourlyFrequency_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, hourlyFrequency_); + } + { + int dataSize = 0; + for (int i = 0; i < daysOfWeek_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(daysOfWeek_.getInt(i)); + } + size += dataSize; + if (!getDaysOfWeekList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + daysOfWeekMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < daysOfMonth_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(daysOfMonth_.getInt(i)); + } + size += dataSize; + if (!getDaysOfMonthList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + daysOfMonthMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getWeekDayOfMonth()); + } + { + int dataSize = 0; + for (int i = 0; i < months_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(months_.getInt(i)); + } + size += dataSize; + if (!getMonthsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + monthsMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getBackupWindow()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, timeZone_); + } + 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.backupdr.v1beta.StandardSchedule)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.StandardSchedule other = + (com.google.cloud.backupdr.v1beta.StandardSchedule) obj; + + if (recurrenceType_ != other.recurrenceType_) return false; + if (getHourlyFrequency() != other.getHourlyFrequency()) return false; + if (!daysOfWeek_.equals(other.daysOfWeek_)) return false; + if (!getDaysOfMonthList().equals(other.getDaysOfMonthList())) return false; + if (hasWeekDayOfMonth() != other.hasWeekDayOfMonth()) return false; + if (hasWeekDayOfMonth()) { + if (!getWeekDayOfMonth().equals(other.getWeekDayOfMonth())) return false; + } + if (!months_.equals(other.months_)) return false; + if (hasBackupWindow() != other.hasBackupWindow()) return false; + if (hasBackupWindow()) { + if (!getBackupWindow().equals(other.getBackupWindow())) return false; + } + if (!getTimeZone().equals(other.getTimeZone())) 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) + RECURRENCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + recurrenceType_; + hash = (37 * hash) + HOURLY_FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + getHourlyFrequency(); + if (getDaysOfWeekCount() > 0) { + hash = (37 * hash) + DAYS_OF_WEEK_FIELD_NUMBER; + hash = (53 * hash) + daysOfWeek_.hashCode(); + } + if (getDaysOfMonthCount() > 0) { + hash = (37 * hash) + DAYS_OF_MONTH_FIELD_NUMBER; + hash = (53 * hash) + getDaysOfMonthList().hashCode(); + } + if (hasWeekDayOfMonth()) { + hash = (37 * hash) + WEEK_DAY_OF_MONTH_FIELD_NUMBER; + hash = (53 * hash) + getWeekDayOfMonth().hashCode(); + } + if (getMonthsCount() > 0) { + hash = (37 * hash) + MONTHS_FIELD_NUMBER; + hash = (53 * hash) + months_.hashCode(); + } + if (hasBackupWindow()) { + hash = (37 * hash) + BACKUP_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getBackupWindow().hashCode(); + } + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule 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.backupdr.v1beta.StandardSchedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule 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.backupdr.v1beta.StandardSchedule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.StandardSchedule 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * `StandardSchedule` defines a schedule that run within the confines of a
+   * defined window of days. We can define recurrence type for schedule as
+   * HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.StandardSchedule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.StandardSchedule) + com.google.cloud.backupdr.v1beta.StandardScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_StandardSchedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_StandardSchedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.StandardSchedule.class, + com.google.cloud.backupdr.v1beta.StandardSchedule.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.StandardSchedule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetWeekDayOfMonthFieldBuilder(); + internalGetBackupWindowFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + recurrenceType_ = 0; + hourlyFrequency_ = 0; + daysOfWeek_ = emptyIntList(); + daysOfMonth_ = emptyIntList(); + weekDayOfMonth_ = null; + if (weekDayOfMonthBuilder_ != null) { + weekDayOfMonthBuilder_.dispose(); + weekDayOfMonthBuilder_ = null; + } + months_ = emptyIntList(); + backupWindow_ = null; + if (backupWindowBuilder_ != null) { + backupWindowBuilder_.dispose(); + backupWindowBuilder_ = null; + } + timeZone_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_StandardSchedule_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardSchedule getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardSchedule build() { + com.google.cloud.backupdr.v1beta.StandardSchedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardSchedule buildPartial() { + com.google.cloud.backupdr.v1beta.StandardSchedule result = + new com.google.cloud.backupdr.v1beta.StandardSchedule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.StandardSchedule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.recurrenceType_ = recurrenceType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hourlyFrequency_ = hourlyFrequency_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + daysOfWeek_.makeImmutable(); + result.daysOfWeek_ = daysOfWeek_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + daysOfMonth_.makeImmutable(); + result.daysOfMonth_ = daysOfMonth_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.weekDayOfMonth_ = + weekDayOfMonthBuilder_ == null ? weekDayOfMonth_ : weekDayOfMonthBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + months_.makeImmutable(); + result.months_ = months_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.backupWindow_ = + backupWindowBuilder_ == null ? backupWindow_ : backupWindowBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.timeZone_ = timeZone_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.StandardSchedule) { + return mergeFrom((com.google.cloud.backupdr.v1beta.StandardSchedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.StandardSchedule other) { + if (other == com.google.cloud.backupdr.v1beta.StandardSchedule.getDefaultInstance()) + return this; + if (other.recurrenceType_ != 0) { + setRecurrenceTypeValue(other.getRecurrenceTypeValue()); + } + if (other.getHourlyFrequency() != 0) { + setHourlyFrequency(other.getHourlyFrequency()); + } + if (!other.daysOfWeek_.isEmpty()) { + if (daysOfWeek_.isEmpty()) { + daysOfWeek_ = other.daysOfWeek_; + daysOfWeek_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureDaysOfWeekIsMutable(); + daysOfWeek_.addAll(other.daysOfWeek_); + } + onChanged(); + } + if (!other.daysOfMonth_.isEmpty()) { + if (daysOfMonth_.isEmpty()) { + daysOfMonth_ = other.daysOfMonth_; + daysOfMonth_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureDaysOfMonthIsMutable(); + daysOfMonth_.addAll(other.daysOfMonth_); + } + onChanged(); + } + if (other.hasWeekDayOfMonth()) { + mergeWeekDayOfMonth(other.getWeekDayOfMonth()); + } + if (!other.months_.isEmpty()) { + if (months_.isEmpty()) { + months_ = other.months_; + months_.makeImmutable(); + bitField0_ |= 0x00000020; + } else { + ensureMonthsIsMutable(); + months_.addAll(other.months_); + } + onChanged(); + } + if (other.hasBackupWindow()) { + mergeBackupWindow(other.getBackupWindow()); + } + if (!other.getTimeZone().isEmpty()) { + timeZone_ = other.timeZone_; + bitField0_ |= 0x00000080; + 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 8: + { + recurrenceType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + hourlyFrequency_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + int tmpRaw = input.readEnum(); + ensureDaysOfWeekIsMutable(); + daysOfWeek_.addInt(tmpRaw); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureDaysOfWeekIsMutable(); + while (input.getBytesUntilLimit() > 0) { + daysOfWeek_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 26 + case 32: + { + int v = input.readInt32(); + ensureDaysOfMonthIsMutable(); + daysOfMonth_.addInt(v); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureDaysOfMonthIsMutable(); + while (input.getBytesUntilLimit() > 0) { + daysOfMonth_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetWeekDayOfMonthFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + int tmpRaw = input.readEnum(); + ensureMonthsIsMutable(); + months_.addInt(tmpRaw); + break; + } // case 48 + case 50: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureMonthsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + months_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetBackupWindowFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + timeZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + 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 int recurrenceType_ = 0; + + /** + * + * + *
+     * Required. Specifies the `RecurrenceType` for the schedule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for recurrenceType. + */ + @java.lang.Override + public int getRecurrenceTypeValue() { + return recurrenceType_; + } + + /** + * + * + *
+     * Required. Specifies the `RecurrenceType` for the schedule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for recurrenceType to set. + * @return This builder for chaining. + */ + public Builder setRecurrenceTypeValue(int value) { + recurrenceType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the `RecurrenceType` for the schedule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurrenceType. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType getRecurrenceType() { + com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType result = + com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType.forNumber( + recurrenceType_); + return result == null + ? com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Specifies the `RecurrenceType` for the schedule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The recurrenceType to set. + * @return This builder for chaining. + */ + public Builder setRecurrenceType( + com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + recurrenceType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the `RecurrenceType` for the schedule.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearRecurrenceType() { + bitField0_ = (bitField0_ & ~0x00000001); + recurrenceType_ = 0; + onChanged(); + return this; + } + + private int hourlyFrequency_; + + /** + * + * + *
+     * Optional. Specifies frequency for hourly backups. A hourly frequency of 2
+     * means jobs will run every 2 hours from start time till end time defined.
+     *
+     * This is required for `recurrence_type`, `HOURLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `HOURLY`.
+     *
+     * The supported values for each resource type are as follows:
+     *
+     * * `compute.googleapis.com/Instance`: 1-23
+     * * `compute.googleapis.com/Disk`: 1-23
+     * * `sqladmin.googleapis.com/Instance`: 6-23
+     * * `alloydb.googleapis.com/Cluster`: 1-23
+     * * `file.googleapis.com/Instance`: 1-23
+     *
+     * Refer to link
+     * https://cloud.google.com/backup-disaster-recovery/docs/concepts/cloud_best_practices
+     * for more details.
+     * 
+ * + * int32 hourly_frequency = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hourlyFrequency. + */ + @java.lang.Override + public int getHourlyFrequency() { + return hourlyFrequency_; + } + + /** + * + * + *
+     * Optional. Specifies frequency for hourly backups. A hourly frequency of 2
+     * means jobs will run every 2 hours from start time till end time defined.
+     *
+     * This is required for `recurrence_type`, `HOURLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `HOURLY`.
+     *
+     * The supported values for each resource type are as follows:
+     *
+     * * `compute.googleapis.com/Instance`: 1-23
+     * * `compute.googleapis.com/Disk`: 1-23
+     * * `sqladmin.googleapis.com/Instance`: 6-23
+     * * `alloydb.googleapis.com/Cluster`: 1-23
+     * * `file.googleapis.com/Instance`: 1-23
+     *
+     * Refer to link
+     * https://cloud.google.com/backup-disaster-recovery/docs/concepts/cloud_best_practices
+     * for more details.
+     * 
+ * + * int32 hourly_frequency = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The hourlyFrequency to set. + * @return This builder for chaining. + */ + public Builder setHourlyFrequency(int value) { + + hourlyFrequency_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies frequency for hourly backups. A hourly frequency of 2
+     * means jobs will run every 2 hours from start time till end time defined.
+     *
+     * This is required for `recurrence_type`, `HOURLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `HOURLY`.
+     *
+     * The supported values for each resource type are as follows:
+     *
+     * * `compute.googleapis.com/Instance`: 1-23
+     * * `compute.googleapis.com/Disk`: 1-23
+     * * `sqladmin.googleapis.com/Instance`: 6-23
+     * * `alloydb.googleapis.com/Cluster`: 1-23
+     * * `file.googleapis.com/Instance`: 1-23
+     *
+     * Refer to link
+     * https://cloud.google.com/backup-disaster-recovery/docs/concepts/cloud_best_practices
+     * for more details.
+     * 
+ * + * int32 hourly_frequency = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearHourlyFrequency() { + bitField0_ = (bitField0_ & ~0x00000002); + hourlyFrequency_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList daysOfWeek_ = emptyIntList(); + + private void ensureDaysOfWeekIsMutable() { + if (!daysOfWeek_.isModifiable()) { + daysOfWeek_ = makeMutableCopy(daysOfWeek_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the daysOfWeek. + */ + public java.util.List getDaysOfWeekList() { + return new com.google.protobuf.Internal.IntListAdapter( + daysOfWeek_, daysOfWeek_converter_); + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of daysOfWeek. + */ + public int getDaysOfWeekCount() { + return daysOfWeek_.size(); + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The daysOfWeek at the given index. + */ + public com.google.type.DayOfWeek getDaysOfWeek(int index) { + return daysOfWeek_converter_.convert(daysOfWeek_.getInt(index)); + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The daysOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDaysOfWeek(int index, com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDaysOfWeekIsMutable(); + daysOfWeek_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The daysOfWeek to add. + * @return This builder for chaining. + */ + public Builder addDaysOfWeek(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDaysOfWeekIsMutable(); + daysOfWeek_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The daysOfWeek to add. + * @return This builder for chaining. + */ + public Builder addAllDaysOfWeek( + java.lang.Iterable values) { + ensureDaysOfWeekIsMutable(); + for (com.google.type.DayOfWeek value : values) { + daysOfWeek_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDaysOfWeek() { + daysOfWeek_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for daysOfWeek. + */ + public java.util.List getDaysOfWeekValueList() { + daysOfWeek_.makeImmutable(); + return daysOfWeek_; + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of daysOfWeek at the given index. + */ + public int getDaysOfWeekValue(int index) { + return daysOfWeek_.getInt(index); + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for daysOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDaysOfWeekValue(int index, int value) { + ensureDaysOfWeekIsMutable(); + daysOfWeek_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for daysOfWeek to add. + * @return This builder for chaining. + */ + public Builder addDaysOfWeekValue(int value) { + ensureDaysOfWeekIsMutable(); + daysOfWeek_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+     * will run.
+     *
+     * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+     * otherwise. A validation error will occur if a value is supplied and
+     * `recurrence_type` is not `WEEKLY`.
+     * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for daysOfWeek to add. + * @return This builder for chaining. + */ + public Builder addAllDaysOfWeekValue(java.lang.Iterable values) { + ensureDaysOfWeekIsMutable(); + for (int value : values) { + daysOfWeek_.addInt(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList daysOfMonth_ = emptyIntList(); + + private void ensureDaysOfMonthIsMutable() { + if (!daysOfMonth_.isModifiable()) { + daysOfMonth_ = makeMutableCopy(daysOfMonth_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+     *
+     * Values for `days_of_month` are only applicable for `recurrence_type`,
+     * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+     * supplied.
+     * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the daysOfMonth. + */ + public java.util.List getDaysOfMonthList() { + daysOfMonth_.makeImmutable(); + return daysOfMonth_; + } + + /** + * + * + *
+     * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+     *
+     * Values for `days_of_month` are only applicable for `recurrence_type`,
+     * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+     * supplied.
+     * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of daysOfMonth. + */ + public int getDaysOfMonthCount() { + return daysOfMonth_.size(); + } + + /** + * + * + *
+     * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+     *
+     * Values for `days_of_month` are only applicable for `recurrence_type`,
+     * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+     * supplied.
+     * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The daysOfMonth at the given index. + */ + public int getDaysOfMonth(int index) { + return daysOfMonth_.getInt(index); + } + + /** + * + * + *
+     * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+     *
+     * Values for `days_of_month` are only applicable for `recurrence_type`,
+     * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+     * supplied.
+     * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The daysOfMonth to set. + * @return This builder for chaining. + */ + public Builder setDaysOfMonth(int index, int value) { + + ensureDaysOfMonthIsMutable(); + daysOfMonth_.setInt(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+     *
+     * Values for `days_of_month` are only applicable for `recurrence_type`,
+     * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+     * supplied.
+     * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The daysOfMonth to add. + * @return This builder for chaining. + */ + public Builder addDaysOfMonth(int value) { + + ensureDaysOfMonthIsMutable(); + daysOfMonth_.addInt(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+     *
+     * Values for `days_of_month` are only applicable for `recurrence_type`,
+     * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+     * supplied.
+     * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The daysOfMonth to add. + * @return This builder for chaining. + */ + public Builder addAllDaysOfMonth(java.lang.Iterable values) { + ensureDaysOfMonthIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, daysOfMonth_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+     *
+     * Values for `days_of_month` are only applicable for `recurrence_type`,
+     * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+     * supplied.
+     * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDaysOfMonth() { + daysOfMonth_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.WeekDayOfMonth weekDayOfMonth_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WeekDayOfMonth, + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.Builder, + com.google.cloud.backupdr.v1beta.WeekDayOfMonthOrBuilder> + weekDayOfMonthBuilder_; + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the weekDayOfMonth field is set. + */ + public boolean hasWeekDayOfMonth() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weekDayOfMonth. + */ + public com.google.cloud.backupdr.v1beta.WeekDayOfMonth getWeekDayOfMonth() { + if (weekDayOfMonthBuilder_ == null) { + return weekDayOfMonth_ == null + ? com.google.cloud.backupdr.v1beta.WeekDayOfMonth.getDefaultInstance() + : weekDayOfMonth_; + } else { + return weekDayOfMonthBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWeekDayOfMonth(com.google.cloud.backupdr.v1beta.WeekDayOfMonth value) { + if (weekDayOfMonthBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + weekDayOfMonth_ = value; + } else { + weekDayOfMonthBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWeekDayOfMonth( + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.Builder builderForValue) { + if (weekDayOfMonthBuilder_ == null) { + weekDayOfMonth_ = builderForValue.build(); + } else { + weekDayOfMonthBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWeekDayOfMonth(com.google.cloud.backupdr.v1beta.WeekDayOfMonth value) { + if (weekDayOfMonthBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && weekDayOfMonth_ != null + && weekDayOfMonth_ + != com.google.cloud.backupdr.v1beta.WeekDayOfMonth.getDefaultInstance()) { + getWeekDayOfMonthBuilder().mergeFrom(value); + } else { + weekDayOfMonth_ = value; + } + } else { + weekDayOfMonthBuilder_.mergeFrom(value); + } + if (weekDayOfMonth_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWeekDayOfMonth() { + bitField0_ = (bitField0_ & ~0x00000010); + weekDayOfMonth_ = null; + if (weekDayOfMonthBuilder_ != null) { + weekDayOfMonthBuilder_.dispose(); + weekDayOfMonthBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.WeekDayOfMonth.Builder getWeekDayOfMonthBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetWeekDayOfMonthFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.backupdr.v1beta.WeekDayOfMonthOrBuilder getWeekDayOfMonthOrBuilder() { + if (weekDayOfMonthBuilder_ != null) { + return weekDayOfMonthBuilder_.getMessageOrBuilder(); + } else { + return weekDayOfMonth_ == null + ? com.google.cloud.backupdr.v1beta.WeekDayOfMonth.getDefaultInstance() + : weekDayOfMonth_; + } + } + + /** + * + * + *
+     * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+     * MONDAY, on which jobs will run. This will be specified by two fields in
+     * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+     * e.g. `LAST`.
+     *
+     * This field is only applicable for `recurrence_type`, `MONTHLY` and
+     * `YEARLY`. A validation error will occur if other values are supplied.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WeekDayOfMonth, + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.Builder, + com.google.cloud.backupdr.v1beta.WeekDayOfMonthOrBuilder> + internalGetWeekDayOfMonthFieldBuilder() { + if (weekDayOfMonthBuilder_ == null) { + weekDayOfMonthBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.WeekDayOfMonth, + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.Builder, + com.google.cloud.backupdr.v1beta.WeekDayOfMonthOrBuilder>( + getWeekDayOfMonth(), getParentForChildren(), isClean()); + weekDayOfMonth_ = null; + } + return weekDayOfMonthBuilder_; + } + + private com.google.protobuf.Internal.IntList months_ = emptyIntList(); + + private void ensureMonthsIsMutable() { + if (!months_.isModifiable()) { + months_ = makeMutableCopy(months_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the months. + */ + public java.util.List getMonthsList() { + return new com.google.protobuf.Internal.IntListAdapter( + months_, months_converter_); + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of months. + */ + public int getMonthsCount() { + return months_.size(); + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The months at the given index. + */ + public com.google.type.Month getMonths(int index) { + return months_converter_.convert(months_.getInt(index)); + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The months to set. + * @return This builder for chaining. + */ + public Builder setMonths(int index, com.google.type.Month value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMonthsIsMutable(); + months_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The months to add. + * @return This builder for chaining. + */ + public Builder addMonths(com.google.type.Month value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMonthsIsMutable(); + months_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The months to add. + * @return This builder for chaining. + */ + public Builder addAllMonths(java.lang.Iterable values) { + ensureMonthsIsMutable(); + for (com.google.type.Month value : values) { + months_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMonths() { + months_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for months. + */ + public java.util.List getMonthsValueList() { + months_.makeImmutable(); + return months_; + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of months at the given index. + */ + public int getMonthsValue(int index) { + return months_.getInt(index); + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for months to set. + * @return This builder for chaining. + */ + public Builder setMonthsValue(int index, int value) { + ensureMonthsIsMutable(); + months_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for months to add. + * @return This builder for chaining. + */ + public Builder addMonthsValue(int value) { + ensureMonthsIsMutable(); + months_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+     * which jobs will run.
+     *
+     * This field is only applicable when `recurrence_type` is `YEARLY`. A
+     * validation error will occur if other values are supplied.
+     * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for months to add. + * @return This builder for chaining. + */ + public Builder addAllMonthsValue(java.lang.Iterable values) { + ensureMonthsIsMutable(); + for (int value : values) { + months_.addInt(value); + } + onChanged(); + return this; + } + + private com.google.cloud.backupdr.v1beta.BackupWindow backupWindow_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupWindow, + com.google.cloud.backupdr.v1beta.BackupWindow.Builder, + com.google.cloud.backupdr.v1beta.BackupWindowOrBuilder> + backupWindowBuilder_; + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupWindow field is set. + */ + public boolean hasBackupWindow() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupWindow. + */ + public com.google.cloud.backupdr.v1beta.BackupWindow getBackupWindow() { + if (backupWindowBuilder_ == null) { + return backupWindow_ == null + ? com.google.cloud.backupdr.v1beta.BackupWindow.getDefaultInstance() + : backupWindow_; + } else { + return backupWindowBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupWindow(com.google.cloud.backupdr.v1beta.BackupWindow value) { + if (backupWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupWindow_ = value; + } else { + backupWindowBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupWindow( + com.google.cloud.backupdr.v1beta.BackupWindow.Builder builderForValue) { + if (backupWindowBuilder_ == null) { + backupWindow_ = builderForValue.build(); + } else { + backupWindowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupWindow(com.google.cloud.backupdr.v1beta.BackupWindow value) { + if (backupWindowBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && backupWindow_ != null + && backupWindow_ + != com.google.cloud.backupdr.v1beta.BackupWindow.getDefaultInstance()) { + getBackupWindowBuilder().mergeFrom(value); + } else { + backupWindow_ = value; + } + } else { + backupWindowBuilder_.mergeFrom(value); + } + if (backupWindow_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupWindow() { + bitField0_ = (bitField0_ & ~0x00000040); + backupWindow_ = null; + if (backupWindowBuilder_ != null) { + backupWindowBuilder_.dispose(); + backupWindowBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupWindow.Builder getBackupWindowBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetBackupWindowFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupWindowOrBuilder getBackupWindowOrBuilder() { + if (backupWindowBuilder_ != null) { + return backupWindowBuilder_.getMessageOrBuilder(); + } else { + return backupWindow_ == null + ? com.google.cloud.backupdr.v1beta.BackupWindow.getDefaultInstance() + : backupWindow_; + } + } + + /** + * + * + *
+     * Required. A BackupWindow defines the window of day during which backup jobs
+     * will run. Jobs are queued at the beginning of the window and will be marked
+     * as `NOT_RUN` if they do not start by the end of the window.
+     *
+     * Note: running jobs will not be cancelled at the end of the window.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupWindow, + com.google.cloud.backupdr.v1beta.BackupWindow.Builder, + com.google.cloud.backupdr.v1beta.BackupWindowOrBuilder> + internalGetBackupWindowFieldBuilder() { + if (backupWindowBuilder_ == null) { + backupWindowBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupWindow, + com.google.cloud.backupdr.v1beta.BackupWindow.Builder, + com.google.cloud.backupdr.v1beta.BackupWindowOrBuilder>( + getBackupWindow(), getParentForChildren(), isClean()); + backupWindow_ = null; + } + return backupWindowBuilder_; + } + + private java.lang.Object timeZone_ = ""; + + /** + * + * + *
+     * Required. The time zone to be used when interpreting the schedule.
+     * The value of this field must be a time zone name from the IANA tz database.
+     * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+     * list of valid timezone names. For e.g., Europe/Paris.
+     * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The time zone to be used when interpreting the schedule.
+     * The value of this field must be a time zone name from the IANA tz database.
+     * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+     * list of valid timezone names. For e.g., Europe/Paris.
+     * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The time zone to be used when interpreting the schedule.
+     * The value of this field must be a time zone name from the IANA tz database.
+     * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+     * list of valid timezone names. For e.g., Europe/Paris.
+     * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time zone to be used when interpreting the schedule.
+     * The value of this field must be a time zone name from the IANA tz database.
+     * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+     * list of valid timezone names. For e.g., Europe/Paris.
+     * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + timeZone_ = getDefaultInstance().getTimeZone(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time zone to be used when interpreting the schedule.
+     * The value of this field must be a time zone name from the IANA tz database.
+     * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+     * list of valid timezone names. For e.g., Europe/Paris.
+     * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + timeZone_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.StandardSchedule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.StandardSchedule) + private static final com.google.cloud.backupdr.v1beta.StandardSchedule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.StandardSchedule(); + } + + public static com.google.cloud.backupdr.v1beta.StandardSchedule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StandardSchedule 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.backupdr.v1beta.StandardSchedule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/StandardScheduleOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/StandardScheduleOrBuilder.java new file mode 100644 index 000000000000..93b4f93ab0f0 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/StandardScheduleOrBuilder.java @@ -0,0 +1,477 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface StandardScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.StandardSchedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Specifies the `RecurrenceType` for the schedule.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for recurrenceType. + */ + int getRecurrenceTypeValue(); + + /** + * + * + *
+   * Required. Specifies the `RecurrenceType` for the schedule.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType recurrence_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The recurrenceType. + */ + com.google.cloud.backupdr.v1beta.StandardSchedule.RecurrenceType getRecurrenceType(); + + /** + * + * + *
+   * Optional. Specifies frequency for hourly backups. A hourly frequency of 2
+   * means jobs will run every 2 hours from start time till end time defined.
+   *
+   * This is required for `recurrence_type`, `HOURLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `HOURLY`.
+   *
+   * The supported values for each resource type are as follows:
+   *
+   * * `compute.googleapis.com/Instance`: 1-23
+   * * `compute.googleapis.com/Disk`: 1-23
+   * * `sqladmin.googleapis.com/Instance`: 6-23
+   * * `alloydb.googleapis.com/Cluster`: 1-23
+   * * `file.googleapis.com/Instance`: 1-23
+   *
+   * Refer to link
+   * https://cloud.google.com/backup-disaster-recovery/docs/concepts/cloud_best_practices
+   * for more details.
+   * 
+ * + * int32 hourly_frequency = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The hourlyFrequency. + */ + int getHourlyFrequency(); + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the daysOfWeek. + */ + java.util.List getDaysOfWeekList(); + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of daysOfWeek. + */ + int getDaysOfWeekCount(); + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The daysOfWeek at the given index. + */ + com.google.type.DayOfWeek getDaysOfWeek(int index); + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for daysOfWeek. + */ + java.util.List getDaysOfWeekValueList(); + + /** + * + * + *
+   * Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs
+   * will run.
+   *
+   * This is required for `recurrence_type`, `WEEKLY` and is not applicable
+   * otherwise. A validation error will occur if a value is supplied and
+   * `recurrence_type` is not `WEEKLY`.
+   * 
+ * + * + * repeated .google.type.DayOfWeek days_of_week = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of daysOfWeek at the given index. + */ + int getDaysOfWeekValue(int index); + + /** + * + * + *
+   * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+   *
+   * Values for `days_of_month` are only applicable for `recurrence_type`,
+   * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+   * supplied.
+   * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the daysOfMonth. + */ + java.util.List getDaysOfMonthList(); + + /** + * + * + *
+   * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+   *
+   * Values for `days_of_month` are only applicable for `recurrence_type`,
+   * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+   * supplied.
+   * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of daysOfMonth. + */ + int getDaysOfMonthCount(); + + /** + * + * + *
+   * Optional. Specifies days of months like 1, 5, or 14 on which jobs will run.
+   *
+   * Values for `days_of_month` are only applicable for `recurrence_type`,
+   * `MONTHLY` and `YEARLY`. A validation error will occur if other values are
+   * supplied.
+   * 
+ * + * repeated int32 days_of_month = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The daysOfMonth at the given index. + */ + int getDaysOfMonth(int index); + + /** + * + * + *
+   * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+   * MONDAY, on which jobs will run. This will be specified by two fields in
+   * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+   * e.g. `LAST`.
+   *
+   * This field is only applicable for `recurrence_type`, `MONTHLY` and
+   * `YEARLY`. A validation error will occur if other values are supplied.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the weekDayOfMonth field is set. + */ + boolean hasWeekDayOfMonth(); + + /** + * + * + *
+   * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+   * MONDAY, on which jobs will run. This will be specified by two fields in
+   * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+   * e.g. `LAST`.
+   *
+   * This field is only applicable for `recurrence_type`, `MONTHLY` and
+   * `YEARLY`. A validation error will occur if other values are supplied.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The weekDayOfMonth. + */ + com.google.cloud.backupdr.v1beta.WeekDayOfMonth getWeekDayOfMonth(); + + /** + * + * + *
+   * Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST
+   * MONDAY, on which jobs will run. This will be specified by two fields in
+   * `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week,
+   * e.g. `LAST`.
+   *
+   * This field is only applicable for `recurrence_type`, `MONTHLY` and
+   * `YEARLY`. A validation error will occur if other values are supplied.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth week_day_of_month = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.backupdr.v1beta.WeekDayOfMonthOrBuilder getWeekDayOfMonthOrBuilder(); + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the months. + */ + java.util.List getMonthsList(); + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of months. + */ + int getMonthsCount(); + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The months at the given index. + */ + com.google.type.Month getMonths(int index); + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the enum numeric values on the wire for months. + */ + java.util.List getMonthsValueList(); + + /** + * + * + *
+   * Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on
+   * which jobs will run.
+   *
+   * This field is only applicable when `recurrence_type` is `YEARLY`. A
+   * validation error will occur if other values are supplied.
+   * 
+ * + * repeated .google.type.Month months = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of months at the given index. + */ + int getMonthsValue(int index); + + /** + * + * + *
+   * Required. A BackupWindow defines the window of day during which backup jobs
+   * will run. Jobs are queued at the beginning of the window and will be marked
+   * as `NOT_RUN` if they do not start by the end of the window.
+   *
+   * Note: running jobs will not be cancelled at the end of the window.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupWindow field is set. + */ + boolean hasBackupWindow(); + + /** + * + * + *
+   * Required. A BackupWindow defines the window of day during which backup jobs
+   * will run. Jobs are queued at the beginning of the window and will be marked
+   * as `NOT_RUN` if they do not start by the end of the window.
+   *
+   * Note: running jobs will not be cancelled at the end of the window.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupWindow. + */ + com.google.cloud.backupdr.v1beta.BackupWindow getBackupWindow(); + + /** + * + * + *
+   * Required. A BackupWindow defines the window of day during which backup jobs
+   * will run. Jobs are queued at the beginning of the window and will be marked
+   * as `NOT_RUN` if they do not start by the end of the window.
+   *
+   * Note: running jobs will not be cancelled at the end of the window.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupWindow backup_window = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupWindowOrBuilder getBackupWindowOrBuilder(); + + /** + * + * + *
+   * Required. The time zone to be used when interpreting the schedule.
+   * The value of this field must be a time zone name from the IANA tz database.
+   * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+   * list of valid timezone names. For e.g., Europe/Paris.
+   * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + java.lang.String getTimeZone(); + + /** + * + * + *
+   * Required. The time zone to be used when interpreting the schedule.
+   * The value of this field must be a time zone name from the IANA tz database.
+   * See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the
+   * list of valid timezone names. For e.g., Europe/Paris.
+   * 
+ * + * string time_zone = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + com.google.protobuf.ByteString getTimeZoneBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Tags.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Tags.java new file mode 100644 index 000000000000..4c7f69a94039 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/Tags.java @@ -0,0 +1,707 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * A set of instance tags.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Tags} + */ +@com.google.protobuf.Generated +public final class Tags extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.Tags) + TagsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Tags"); + } + + // Use Tags.newBuilder() to construct. + private Tags(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Tags() { + items_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Tags_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Tags_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Tags.class, + com.google.cloud.backupdr.v1beta.Tags.Builder.class); + } + + public static final int ITEMS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList items_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. An array of tags. Each tag must be 1-63 characters long, and
+   * comply with RFC1035.
+   * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the items. + */ + public com.google.protobuf.ProtocolStringList getItemsList() { + return items_; + } + + /** + * + * + *
+   * Optional. An array of tags. Each tag must be 1-63 characters long, and
+   * comply with RFC1035.
+   * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of items. + */ + public int getItemsCount() { + return items_.size(); + } + + /** + * + * + *
+   * Optional. An array of tags. Each tag must be 1-63 characters long, and
+   * comply with RFC1035.
+   * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The items at the given index. + */ + public java.lang.String getItems(int index) { + return items_.get(index); + } + + /** + * + * + *
+   * Optional. An array of tags. Each tag must be 1-63 characters long, and
+   * comply with RFC1035.
+   * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the items at the given index. + */ + public com.google.protobuf.ByteString getItemsBytes(int index) { + return items_.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 < items_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, items_.getRaw(i)); + } + 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 < items_.size(); i++) { + dataSize += computeStringSizeNoTag(items_.getRaw(i)); + } + size += dataSize; + size += 1 * getItemsList().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.backupdr.v1beta.Tags)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.Tags other = (com.google.cloud.backupdr.v1beta.Tags) obj; + + if (!getItemsList().equals(other.getItemsList())) 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 (getItemsCount() > 0) { + hash = (37 * hash) + ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getItemsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.Tags parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Tags 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.backupdr.v1beta.Tags parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Tags 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.backupdr.v1beta.Tags parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.Tags parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Tags parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Tags parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Tags parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Tags parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.Tags parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.Tags parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.Tags 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A set of instance tags.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.Tags} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.Tags) + com.google.cloud.backupdr.v1beta.TagsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Tags_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Tags_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.Tags.class, + com.google.cloud.backupdr.v1beta.Tags.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.Tags.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + items_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupvaultGceProto + .internal_static_google_cloud_backupdr_v1beta_Tags_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Tags getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Tags build() { + com.google.cloud.backupdr.v1beta.Tags result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Tags buildPartial() { + com.google.cloud.backupdr.v1beta.Tags result = + new com.google.cloud.backupdr.v1beta.Tags(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.Tags result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + items_.makeImmutable(); + result.items_ = items_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.Tags) { + return mergeFrom((com.google.cloud.backupdr.v1beta.Tags) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.Tags other) { + if (other == com.google.cloud.backupdr.v1beta.Tags.getDefaultInstance()) return this; + if (!other.items_.isEmpty()) { + if (items_.isEmpty()) { + items_ = other.items_; + bitField0_ |= 0x00000001; + } else { + ensureItemsIsMutable(); + items_.addAll(other.items_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureItemsIsMutable(); + items_.add(s); + 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 com.google.protobuf.LazyStringArrayList items_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureItemsIsMutable() { + if (!items_.isModifiable()) { + items_ = new com.google.protobuf.LazyStringArrayList(items_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the items. + */ + public com.google.protobuf.ProtocolStringList getItemsList() { + items_.makeImmutable(); + return items_; + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of items. + */ + public int getItemsCount() { + return items_.size(); + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The items at the given index. + */ + public java.lang.String getItems(int index) { + return items_.get(index); + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the items at the given index. + */ + public com.google.protobuf.ByteString getItemsBytes(int index) { + return items_.getByteString(index); + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The items to set. + * @return This builder for chaining. + */ + public Builder setItems(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The items to add. + * @return This builder for chaining. + */ + public Builder addItems(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemsIsMutable(); + items_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The items to add. + * @return This builder for chaining. + */ + public Builder addAllItems(java.lang.Iterable values) { + ensureItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearItems() { + items_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An array of tags. Each tag must be 1-63 characters long, and
+     * comply with RFC1035.
+     * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the items to add. + * @return This builder for chaining. + */ + public Builder addItemsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureItemsIsMutable(); + items_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.Tags) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.Tags) + private static final com.google.cloud.backupdr.v1beta.Tags DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.Tags(); + } + + public static com.google.cloud.backupdr.v1beta.Tags getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tags 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.backupdr.v1beta.Tags getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TagsOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TagsOrBuilder.java new file mode 100644 index 000000000000..7c127bde4bd8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TagsOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault_gce.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface TagsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.Tags) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. An array of tags. Each tag must be 1-63 characters long, and
+   * comply with RFC1035.
+   * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the items. + */ + java.util.List getItemsList(); + + /** + * + * + *
+   * Optional. An array of tags. Each tag must be 1-63 characters long, and
+   * comply with RFC1035.
+   * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of items. + */ + int getItemsCount(); + + /** + * + * + *
+   * Optional. An array of tags. Each tag must be 1-63 characters long, and
+   * comply with RFC1035.
+   * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The items at the given index. + */ + java.lang.String getItems(int index); + + /** + * + * + *
+   * Optional. An array of tags. Each tag must be 1-63 characters long, and
+   * comply with RFC1035.
+   * 
+ * + * repeated string items = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the items at the given index. + */ + com.google.protobuf.ByteString getItemsBytes(int index); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TargetResource.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TargetResource.java new file mode 100644 index 000000000000..aacd4f8499ac --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TargetResource.java @@ -0,0 +1,796 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Details of the target resource created/modified as part of restore.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.TargetResource} + */ +@com.google.protobuf.Generated +public final class TargetResource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.TargetResource) + TargetResourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "TargetResource"); + } + + // Use TargetResource.newBuilder() to construct. + private TargetResource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TargetResource() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_TargetResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_TargetResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.TargetResource.class, + com.google.cloud.backupdr.v1beta.TargetResource.Builder.class); + } + + private int targetResourceInfoCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object targetResourceInfo_; + + public enum TargetResourceInfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCP_RESOURCE(1), + TARGETRESOURCEINFO_NOT_SET(0); + private final int value; + + private TargetResourceInfoCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetResourceInfoCase valueOf(int value) { + return forNumber(value); + } + + public static TargetResourceInfoCase forNumber(int value) { + switch (value) { + case 1: + return GCP_RESOURCE; + case 0: + return TARGETRESOURCEINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetResourceInfoCase getTargetResourceInfoCase() { + return TargetResourceInfoCase.forNumber(targetResourceInfoCase_); + } + + public static final int GCP_RESOURCE_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Details of the native Google Cloud resource created as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + * + * @return Whether the gcpResource field is set. + */ + @java.lang.Override + public boolean hasGcpResource() { + return targetResourceInfoCase_ == 1; + } + + /** + * + * + *
+   * Details of the native Google Cloud resource created as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + * + * @return The gcpResource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpResource getGcpResource() { + if (targetResourceInfoCase_ == 1) { + return (com.google.cloud.backupdr.v1beta.GcpResource) targetResourceInfo_; + } + return com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance(); + } + + /** + * + * + *
+   * Details of the native Google Cloud resource created as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpResourceOrBuilder getGcpResourceOrBuilder() { + if (targetResourceInfoCase_ == 1) { + return (com.google.cloud.backupdr.v1beta.GcpResource) targetResourceInfo_; + } + return com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance(); + } + + 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 (targetResourceInfoCase_ == 1) { + output.writeMessage(1, (com.google.cloud.backupdr.v1beta.GcpResource) targetResourceInfo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetResourceInfoCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.backupdr.v1beta.GcpResource) targetResourceInfo_); + } + 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.backupdr.v1beta.TargetResource)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.TargetResource other = + (com.google.cloud.backupdr.v1beta.TargetResource) obj; + + if (!getTargetResourceInfoCase().equals(other.getTargetResourceInfoCase())) return false; + switch (targetResourceInfoCase_) { + case 1: + if (!getGcpResource().equals(other.getGcpResource())) return false; + break; + case 0: + default: + } + 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(); + switch (targetResourceInfoCase_) { + case 1: + hash = (37 * hash) + GCP_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcpResource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.TargetResource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource 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.backupdr.v1beta.TargetResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource 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.backupdr.v1beta.TargetResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.TargetResource 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Details of the target resource created/modified as part of restore.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.TargetResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.TargetResource) + com.google.cloud.backupdr.v1beta.TargetResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_TargetResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_TargetResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.TargetResource.class, + com.google.cloud.backupdr.v1beta.TargetResource.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.TargetResource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gcpResourceBuilder_ != null) { + gcpResourceBuilder_.clear(); + } + targetResourceInfoCase_ = 0; + targetResourceInfo_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_TargetResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TargetResource getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.TargetResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TargetResource build() { + com.google.cloud.backupdr.v1beta.TargetResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TargetResource buildPartial() { + com.google.cloud.backupdr.v1beta.TargetResource result = + new com.google.cloud.backupdr.v1beta.TargetResource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.TargetResource result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.backupdr.v1beta.TargetResource result) { + result.targetResourceInfoCase_ = targetResourceInfoCase_; + result.targetResourceInfo_ = this.targetResourceInfo_; + if (targetResourceInfoCase_ == 1 && gcpResourceBuilder_ != null) { + result.targetResourceInfo_ = gcpResourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.TargetResource) { + return mergeFrom((com.google.cloud.backupdr.v1beta.TargetResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.TargetResource other) { + if (other == com.google.cloud.backupdr.v1beta.TargetResource.getDefaultInstance()) + return this; + switch (other.getTargetResourceInfoCase()) { + case GCP_RESOURCE: + { + mergeGcpResource(other.getGcpResource()); + break; + } + case TARGETRESOURCEINFO_NOT_SET: + { + break; + } + } + 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( + internalGetGcpResourceFieldBuilder().getBuilder(), extensionRegistry); + targetResourceInfoCase_ = 1; + 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 targetResourceInfoCase_ = 0; + private java.lang.Object targetResourceInfo_; + + public TargetResourceInfoCase getTargetResourceInfoCase() { + return TargetResourceInfoCase.forNumber(targetResourceInfoCase_); + } + + public Builder clearTargetResourceInfo() { + targetResourceInfoCase_ = 0; + targetResourceInfo_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.GcpResource, + com.google.cloud.backupdr.v1beta.GcpResource.Builder, + com.google.cloud.backupdr.v1beta.GcpResourceOrBuilder> + gcpResourceBuilder_; + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + * + * @return Whether the gcpResource field is set. + */ + @java.lang.Override + public boolean hasGcpResource() { + return targetResourceInfoCase_ == 1; + } + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + * + * @return The gcpResource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpResource getGcpResource() { + if (gcpResourceBuilder_ == null) { + if (targetResourceInfoCase_ == 1) { + return (com.google.cloud.backupdr.v1beta.GcpResource) targetResourceInfo_; + } + return com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance(); + } else { + if (targetResourceInfoCase_ == 1) { + return gcpResourceBuilder_.getMessage(); + } + return com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + public Builder setGcpResource(com.google.cloud.backupdr.v1beta.GcpResource value) { + if (gcpResourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetResourceInfo_ = value; + onChanged(); + } else { + gcpResourceBuilder_.setMessage(value); + } + targetResourceInfoCase_ = 1; + return this; + } + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + public Builder setGcpResource( + com.google.cloud.backupdr.v1beta.GcpResource.Builder builderForValue) { + if (gcpResourceBuilder_ == null) { + targetResourceInfo_ = builderForValue.build(); + onChanged(); + } else { + gcpResourceBuilder_.setMessage(builderForValue.build()); + } + targetResourceInfoCase_ = 1; + return this; + } + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + public Builder mergeGcpResource(com.google.cloud.backupdr.v1beta.GcpResource value) { + if (gcpResourceBuilder_ == null) { + if (targetResourceInfoCase_ == 1 + && targetResourceInfo_ + != com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance()) { + targetResourceInfo_ = + com.google.cloud.backupdr.v1beta.GcpResource.newBuilder( + (com.google.cloud.backupdr.v1beta.GcpResource) targetResourceInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + targetResourceInfo_ = value; + } + onChanged(); + } else { + if (targetResourceInfoCase_ == 1) { + gcpResourceBuilder_.mergeFrom(value); + } else { + gcpResourceBuilder_.setMessage(value); + } + } + targetResourceInfoCase_ = 1; + return this; + } + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + public Builder clearGcpResource() { + if (gcpResourceBuilder_ == null) { + if (targetResourceInfoCase_ == 1) { + targetResourceInfoCase_ = 0; + targetResourceInfo_ = null; + onChanged(); + } + } else { + if (targetResourceInfoCase_ == 1) { + targetResourceInfoCase_ = 0; + targetResourceInfo_ = null; + } + gcpResourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + public com.google.cloud.backupdr.v1beta.GcpResource.Builder getGcpResourceBuilder() { + return internalGetGcpResourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.GcpResourceOrBuilder getGcpResourceOrBuilder() { + if ((targetResourceInfoCase_ == 1) && (gcpResourceBuilder_ != null)) { + return gcpResourceBuilder_.getMessageOrBuilder(); + } else { + if (targetResourceInfoCase_ == 1) { + return (com.google.cloud.backupdr.v1beta.GcpResource) targetResourceInfo_; + } + return com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Details of the native Google Cloud resource created as part of restore.
+     * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.GcpResource, + com.google.cloud.backupdr.v1beta.GcpResource.Builder, + com.google.cloud.backupdr.v1beta.GcpResourceOrBuilder> + internalGetGcpResourceFieldBuilder() { + if (gcpResourceBuilder_ == null) { + if (!(targetResourceInfoCase_ == 1)) { + targetResourceInfo_ = com.google.cloud.backupdr.v1beta.GcpResource.getDefaultInstance(); + } + gcpResourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.GcpResource, + com.google.cloud.backupdr.v1beta.GcpResource.Builder, + com.google.cloud.backupdr.v1beta.GcpResourceOrBuilder>( + (com.google.cloud.backupdr.v1beta.GcpResource) targetResourceInfo_, + getParentForChildren(), + isClean()); + targetResourceInfo_ = null; + } + targetResourceInfoCase_ = 1; + onChanged(); + return gcpResourceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.TargetResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.TargetResource) + private static final com.google.cloud.backupdr.v1beta.TargetResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.TargetResource(); + } + + public static com.google.cloud.backupdr.v1beta.TargetResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TargetResource 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.backupdr.v1beta.TargetResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TargetResourceOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TargetResourceOrBuilder.java new file mode 100644 index 000000000000..259921112795 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TargetResourceOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface TargetResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.TargetResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Details of the native Google Cloud resource created as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + * + * @return Whether the gcpResource field is set. + */ + boolean hasGcpResource(); + + /** + * + * + *
+   * Details of the native Google Cloud resource created as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + * + * @return The gcpResource. + */ + com.google.cloud.backupdr.v1beta.GcpResource getGcpResource(); + + /** + * + * + *
+   * Details of the native Google Cloud resource created as part of restore.
+   * 
+ * + * .google.cloud.backupdr.v1beta.GcpResource gcp_resource = 1; + */ + com.google.cloud.backupdr.v1beta.GcpResourceOrBuilder getGcpResourceOrBuilder(); + + com.google.cloud.backupdr.v1beta.TargetResource.TargetResourceInfoCase + getTargetResourceInfoCase(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TriggerBackupRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TriggerBackupRequest.java new file mode 100644 index 000000000000..e0168491fc1a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TriggerBackupRequest.java @@ -0,0 +1,1559 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for triggering a backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.TriggerBackupRequest} + */ +@com.google.protobuf.Generated +public final class TriggerBackupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.TriggerBackupRequest) + TriggerBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "TriggerBackupRequest"); + } + + // Use TriggerBackupRequest.newBuilder() to construct. + private TriggerBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TriggerBackupRequest() { + name_ = ""; + ruleId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.TriggerBackupRequest.class, + com.google.cloud.backupdr.v1beta.TriggerBackupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * 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; + } + } + + public static final int RULE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleId_ = ""; + + /** + * + * + *
+   * Optional. backup rule_id for which a backup needs to be triggered.
+   * If not specified, on-demand backup with custom retention will be triggered.
+   * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ruleId. + */ + @java.lang.Override + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + 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(); + ruleId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. backup rule_id for which a backup needs to be triggered.
+   * If not specified, on-demand backup with custom retention will be triggered.
+   * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ruleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_RETENTION_DAYS_FIELD_NUMBER = 6; + private int customRetentionDays_ = 0; + + /** + * + * + *
+   * Optional. The duration for which backup data will be kept, while taking an
+   * on-demand backup with custom retention. It is defined in "days".
+   * It is mutually exclusive with rule_id. This field is required if
+   * rule_id is not provided.
+   * 
+ * + * int32 custom_retention_days = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRetentionDays. + */ + @java.lang.Override + public int getCustomRetentionDays() { + return customRetentionDays_; + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_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(); + } + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ruleId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ruleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + if (customRetentionDays_ != 0) { + output.writeInt32(6, customRetentionDays_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ruleId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ruleId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + if (customRetentionDays_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, customRetentionDays_); + } + 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(7, 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.backupdr.v1beta.TriggerBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.TriggerBackupRequest other = + (com.google.cloud.backupdr.v1beta.TriggerBackupRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRuleId().equals(other.getRuleId())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getCustomRetentionDays() != other.getCustomRetentionDays()) 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) + RULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getRuleId().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + CUSTOM_RETENTION_DAYS_FIELD_NUMBER; + hash = (53 * hash) + getCustomRetentionDays(); + 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.backupdr.v1beta.TriggerBackupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest 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.backupdr.v1beta.TriggerBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest 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.backupdr.v1beta.TriggerBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.TriggerBackupRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for triggering a backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.TriggerBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.TriggerBackupRequest) + com.google.cloud.backupdr.v1beta.TriggerBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.TriggerBackupRequest.class, + com.google.cloud.backupdr.v1beta.TriggerBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.TriggerBackupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + ruleId_ = ""; + requestId_ = ""; + customRetentionDays_ = 0; + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_TriggerBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TriggerBackupRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.TriggerBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TriggerBackupRequest build() { + com.google.cloud.backupdr.v1beta.TriggerBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.TriggerBackupRequest buildPartial() { + com.google.cloud.backupdr.v1beta.TriggerBackupRequest result = + new com.google.cloud.backupdr.v1beta.TriggerBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.TriggerBackupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ruleId_ = ruleId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.customRetentionDays_ = customRetentionDays_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.TriggerBackupRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.TriggerBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.TriggerBackupRequest other) { + if (other == com.google.cloud.backupdr.v1beta.TriggerBackupRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRuleId().isEmpty()) { + ruleId_ = other.ruleId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getCustomRetentionDays() != 0) { + setCustomRetentionDays(other.getCustomRetentionDays()); + } + 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 18: + { + ruleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 48: + { + customRetentionDays_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 48 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 58 + 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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. Name of the backup plan association resource, in the format
+     * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+     * 
+ * + * + * 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; + } + + private java.lang.Object ruleId_ = ""; + + /** + * + * + *
+     * Optional. backup rule_id for which a backup needs to be triggered.
+     * If not specified, on-demand backup with custom retention will be triggered.
+     * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ruleId. + */ + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. backup rule_id for which a backup needs to be triggered.
+     * If not specified, on-demand backup with custom retention will be triggered.
+     * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ruleId. + */ + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. backup rule_id for which a backup needs to be triggered.
+     * If not specified, on-demand backup with custom retention will be triggered.
+     * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. backup rule_id for which a backup needs to be triggered.
+     * If not specified, on-demand backup with custom retention will be triggered.
+     * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRuleId() { + ruleId_ = getDefaultInstance().getRuleId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. backup rule_id for which a backup needs to be triggered.
+     * If not specified, on-demand backup with custom retention will be triggered.
+     * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int customRetentionDays_; + + /** + * + * + *
+     * Optional. The duration for which backup data will be kept, while taking an
+     * on-demand backup with custom retention. It is defined in "days".
+     * It is mutually exclusive with rule_id. This field is required if
+     * rule_id is not provided.
+     * 
+ * + * int32 custom_retention_days = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRetentionDays. + */ + @java.lang.Override + public int getCustomRetentionDays() { + return customRetentionDays_; + } + + /** + * + * + *
+     * Optional. The duration for which backup data will be kept, while taking an
+     * on-demand backup with custom retention. It is defined in "days".
+     * It is mutually exclusive with rule_id. This field is required if
+     * rule_id is not provided.
+     * 
+ * + * int32 custom_retention_days = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The customRetentionDays to set. + * @return This builder for chaining. + */ + public Builder setCustomRetentionDays(int value) { + + customRetentionDays_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The duration for which backup data will be kept, while taking an
+     * on-demand backup with custom retention. It is defined in "days".
+     * It is mutually exclusive with rule_id. This field is required if
+     * rule_id is not provided.
+     * 
+ * + * int32 custom_retention_days = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCustomRetentionDays() { + bitField0_ = (bitField0_ & ~0x00000008); + customRetentionDays_ = 0; + 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(); + } + + /** + * + * + *
+     * Optional. Labels to be applied on the backup.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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(); + } + + /** + * + * + *
+     * Optional. Labels to be applied on the backup.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels to be applied on the backup.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Labels to be applied on the backup.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @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; + } + + /** + * + * + *
+     * Optional. Labels to be applied on the backup.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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(); + } + + /** + * + * + *
+     * Optional. Labels to be applied on the backup.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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; + } + + /** + * + * + *
+     * Optional. Labels to be applied on the backup.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.TriggerBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.TriggerBackupRequest) + private static final com.google.cloud.backupdr.v1beta.TriggerBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.TriggerBackupRequest(); + } + + public static com.google.cloud.backupdr.v1beta.TriggerBackupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TriggerBackupRequest 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.backupdr.v1beta.TriggerBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TriggerBackupRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TriggerBackupRequestOrBuilder.java new file mode 100644 index 000000000000..016a2a4594b8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/TriggerBackupRequestOrBuilder.java @@ -0,0 +1,221 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface TriggerBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.TriggerBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the backup plan association resource, in the format
+   * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. backup rule_id for which a backup needs to be triggered.
+   * If not specified, on-demand backup with custom retention will be triggered.
+   * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ruleId. + */ + java.lang.String getRuleId(); + + /** + * + * + *
+   * Optional. backup rule_id for which a backup needs to be triggered.
+   * If not specified, on-demand backup with custom retention will be triggered.
+   * 
+ * + * string rule_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ruleId. + */ + com.google.protobuf.ByteString getRuleIdBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. The duration for which backup data will be kept, while taking an
+   * on-demand backup with custom retention. It is defined in "days".
+   * It is mutually exclusive with rule_id. This field is required if
+   * rule_id is not provided.
+   * 
+ * + * int32 custom_retention_days = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customRetentionDays. + */ + int getCustomRetentionDays(); + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels to be applied on the backup.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateAutoProtectionPolicyRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateAutoProtectionPolicyRequest.java new file mode 100644 index 000000000000..4bb1e577d223 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateAutoProtectionPolicyRequest.java @@ -0,0 +1,1083 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for updating an AutoProtectionPolicy.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest} + */ +@com.google.protobuf.Generated +public final class UpdateAutoProtectionPolicyRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) + UpdateAutoProtectionPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateAutoProtectionPolicyRequest"); + } + + // Use UpdateAutoProtectionPolicyRequest.newBuilder() to construct. + private UpdateAutoProtectionPolicyRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateAutoProtectionPolicyRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_UpdateAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_UpdateAutoProtectionPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.class, + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.Builder.class); + } + + private int bitField0_; + public static final int AUTO_PROTECTION_POLICY_FIELD_NUMBER = 1; + private com.google.cloud.backupdr.v1beta.AutoProtectionPolicy autoProtectionPolicy_; + + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicy field is set. + */ + @java.lang.Override + public boolean hasAutoProtectionPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicy. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicy() { + return autoProtectionPolicy_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance() + : autoProtectionPolicy_; + } + + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder + getAutoProtectionPolicyOrBuilder() { + return autoProtectionPolicy_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance() + : autoProtectionPolicy_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * AutoProtectionPolicy 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * AutoProtectionPolicy 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 = 2 [(.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
+   * AutoProtectionPolicy 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAutoProtectionPolicy()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAutoProtectionPolicy()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.backupdr.v1beta.UpdateAutoProtectionPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest other = + (com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) obj; + + if (hasAutoProtectionPolicy() != other.hasAutoProtectionPolicy()) return false; + if (hasAutoProtectionPolicy()) { + if (!getAutoProtectionPolicy().equals(other.getAutoProtectionPolicy())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasAutoProtectionPolicy()) { + hash = (37 * hash) + AUTO_PROTECTION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getAutoProtectionPolicy().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest 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.backupdr.v1beta.UpdateAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest 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.backupdr.v1beta.UpdateAutoProtectionPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.UpdateAutoProtectionPolicyRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for updating an AutoProtectionPolicy.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_UpdateAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_UpdateAutoProtectionPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.class, + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAutoProtectionPolicyFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + autoProtectionPolicy_ = null; + if (autoProtectionPolicyBuilder_ != null) { + autoProtectionPolicyBuilder_.dispose(); + autoProtectionPolicyBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.AutoProtectionPolicyProto + .internal_static_google_cloud_backupdr_v1beta_UpdateAutoProtectionPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest build() { + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest buildPartial() { + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest result = + new com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.autoProtectionPolicy_ = + autoProtectionPolicyBuilder_ == null + ? autoProtectionPolicy_ + : autoProtectionPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + .getDefaultInstance()) return this; + if (other.hasAutoProtectionPolicy()) { + mergeAutoProtectionPolicy(other.getAutoProtectionPolicy()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + 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( + internalGetAutoProtectionPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().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.cloud.backupdr.v1beta.AutoProtectionPolicy autoProtectionPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder> + autoProtectionPolicyBuilder_; + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicy field is set. + */ + public boolean hasAutoProtectionPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicy. + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicy() { + if (autoProtectionPolicyBuilder_ == null) { + return autoProtectionPolicy_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance() + : autoProtectionPolicy_; + } else { + return autoProtectionPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy value) { + if (autoProtectionPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoProtectionPolicy_ = value; + } else { + autoProtectionPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder builderForValue) { + if (autoProtectionPolicyBuilder_ == null) { + autoProtectionPolicy_ = builderForValue.build(); + } else { + autoProtectionPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutoProtectionPolicy( + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy value) { + if (autoProtectionPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && autoProtectionPolicy_ != null + && autoProtectionPolicy_ + != com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance()) { + getAutoProtectionPolicyBuilder().mergeFrom(value); + } else { + autoProtectionPolicy_ = value; + } + } else { + autoProtectionPolicyBuilder_.mergeFrom(value); + } + if (autoProtectionPolicy_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutoProtectionPolicy() { + bitField0_ = (bitField0_ & ~0x00000001); + autoProtectionPolicy_ = null; + if (autoProtectionPolicyBuilder_ != null) { + autoProtectionPolicyBuilder_.dispose(); + autoProtectionPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder + getAutoProtectionPolicyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAutoProtectionPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder + getAutoProtectionPolicyOrBuilder() { + if (autoProtectionPolicyBuilder_ != null) { + return autoProtectionPolicyBuilder_.getMessageOrBuilder(); + } else { + return autoProtectionPolicy_ == null + ? com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.getDefaultInstance() + : autoProtectionPolicy_; + } + } + + /** + * + * + *
+     * Required. The policy to update.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder> + internalGetAutoProtectionPolicyFieldBuilder() { + if (autoProtectionPolicyBuilder_ == null) { + autoProtectionPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy.Builder, + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder>( + getAutoProtectionPolicy(), getParentForChildren(), isClean()); + autoProtectionPolicy_ = null; + } + return autoProtectionPolicyBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + 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
+     * AutoProtectionPolicy 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * AutoProtectionPolicy 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 = 2 [(.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
+     * AutoProtectionPolicy 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 = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * AutoProtectionPolicy 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 = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * AutoProtectionPolicy 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * AutoProtectionPolicy 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + 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
+     * AutoProtectionPolicy 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * AutoProtectionPolicy 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 = 2 [(.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
+     * AutoProtectionPolicy 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) + private static final com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest(); + } + + public static com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAutoProtectionPolicyRequest 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.backupdr.v1beta.UpdateAutoProtectionPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateAutoProtectionPolicyRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateAutoProtectionPolicyRequestOrBuilder.java new file mode 100644 index 000000000000..b2a0107aaa99 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateAutoProtectionPolicyRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/autoprotectionpolicy.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface UpdateAutoProtectionPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the autoProtectionPolicy field is set. + */ + boolean hasAutoProtectionPolicy(); + + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The autoProtectionPolicy. + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicy getAutoProtectionPolicy(); + + /** + * + * + *
+   * Required. The policy to update.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.AutoProtectionPolicy auto_protection_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.AutoProtectionPolicyOrBuilder getAutoProtectionPolicyOrBuilder(); + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * AutoProtectionPolicy 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 = 2 [(.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
+   * AutoProtectionPolicy 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 = 2 [(.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
+   * AutoProtectionPolicy 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanAssociationRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanAssociationRequest.java new file mode 100644 index 000000000000..255c265229dc --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanAssociationRequest.java @@ -0,0 +1,1395 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for updating a backup plan association.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest} + */ +@com.google.protobuf.Generated +public final class UpdateBackupPlanAssociationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) + UpdateBackupPlanAssociationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateBackupPlanAssociationRequest"); + } + + // Use UpdateBackupPlanAssociationRequest.newBuilder() to construct. + private UpdateBackupPlanAssociationRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateBackupPlanAssociationRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanAssociationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.class, + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.Builder.class); + } + + private int bitField0_; + public static final int BACKUP_PLAN_ASSOCIATION_FIELD_NUMBER = 1; + private com.google.cloud.backupdr.v1beta.BackupPlanAssociation backupPlanAssociation_; + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlanAssociation field is set. + */ + @java.lang.Override + public boolean hasBackupPlanAssociation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlanAssociation. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociation() { + return backupPlanAssociation_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance() + : backupPlanAssociation_; + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationOrBuilder() { + return backupPlanAssociation_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance() + : backupPlanAssociation_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlanAssociation 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 the request will fail.
+   * Currently backup_plan_association.backup_plan is the only supported field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlanAssociation 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 the request will fail.
+   * Currently backup_plan_association.backup_plan is the only supported field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlanAssociation 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 the request will fail.
+   * Currently backup_plan_association.backup_plan is the only supported field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getBackupPlanAssociation()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBackupPlanAssociation()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.backupdr.v1beta.UpdateBackupPlanAssociationRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest other = + (com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) obj; + + if (hasBackupPlanAssociation() != other.hasBackupPlanAssociation()) return false; + if (hasBackupPlanAssociation()) { + if (!getBackupPlanAssociation().equals(other.getBackupPlanAssociation())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasBackupPlanAssociation()) { + hash = (37 * hash) + BACKUP_PLAN_ASSOCIATION_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlanAssociation().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest 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.backupdr.v1beta.UpdateBackupPlanAssociationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest 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.backupdr.v1beta.UpdateBackupPlanAssociationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.UpdateBackupPlanAssociationRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for updating a backup plan association.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanAssociationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.class, + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupPlanAssociationFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupPlanAssociation_ = null; + if (backupPlanAssociationBuilder_ != null) { + backupPlanAssociationBuilder_.dispose(); + backupPlanAssociationBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanAssociationProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanAssociationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest build() { + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest buildPartial() { + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest result = + new com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backupPlanAssociation_ = + backupPlanAssociationBuilder_ == null + ? backupPlanAssociation_ + : backupPlanAssociationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest other) { + if (other + == com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest + .getDefaultInstance()) return this; + if (other.hasBackupPlanAssociation()) { + mergeBackupPlanAssociation(other.getBackupPlanAssociation()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + internalGetBackupPlanAssociationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.cloud.backupdr.v1beta.BackupPlanAssociation backupPlanAssociation_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder> + backupPlanAssociationBuilder_; + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlanAssociation field is set. + */ + public boolean hasBackupPlanAssociation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlanAssociation. + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociation() { + if (backupPlanAssociationBuilder_ == null) { + return backupPlanAssociation_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance() + : backupPlanAssociation_; + } else { + return backupPlanAssociationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupPlanAssociation_ = value; + } else { + backupPlanAssociationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder builderForValue) { + if (backupPlanAssociationBuilder_ == null) { + backupPlanAssociation_ = builderForValue.build(); + } else { + backupPlanAssociationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupPlanAssociation( + com.google.cloud.backupdr.v1beta.BackupPlanAssociation value) { + if (backupPlanAssociationBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && backupPlanAssociation_ != null + && backupPlanAssociation_ + != com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance()) { + getBackupPlanAssociationBuilder().mergeFrom(value); + } else { + backupPlanAssociation_ = value; + } + } else { + backupPlanAssociationBuilder_.mergeFrom(value); + } + if (backupPlanAssociation_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupPlanAssociation() { + bitField0_ = (bitField0_ & ~0x00000001); + backupPlanAssociation_ = null; + if (backupPlanAssociationBuilder_ != null) { + backupPlanAssociationBuilder_.dispose(); + backupPlanAssociationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder + getBackupPlanAssociationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetBackupPlanAssociationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationOrBuilder() { + if (backupPlanAssociationBuilder_ != null) { + return backupPlanAssociationBuilder_.getMessageOrBuilder(); + } else { + return backupPlanAssociation_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlanAssociation.getDefaultInstance() + : backupPlanAssociation_; + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder> + internalGetBackupPlanAssociationFieldBuilder() { + if (backupPlanAssociationBuilder_ == null) { + backupPlanAssociationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlanAssociation, + com.google.cloud.backupdr.v1beta.BackupPlanAssociation.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder>( + getBackupPlanAssociation(), getParentForChildren(), isClean()); + backupPlanAssociation_ = null; + } + return backupPlanAssociationBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlanAssociation 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 the request will fail.
+     * Currently backup_plan_association.backup_plan is the only supported field.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) + private static final com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest(); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateBackupPlanAssociationRequest 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.backupdr.v1beta.UpdateBackupPlanAssociationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanAssociationRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanAssociationRequestOrBuilder.java new file mode 100644 index 000000000000..2a9da77772b1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanAssociationRequestOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplanassociation.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface UpdateBackupPlanAssociationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlanAssociation field is set. + */ + boolean hasBackupPlanAssociation(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlanAssociation. + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociation getBackupPlanAssociation(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlanAssociation backup_plan_association = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanAssociationOrBuilder + getBackupPlanAssociationOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlanAssociation 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 the request will fail.
+   * Currently backup_plan_association.backup_plan is the only supported field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlanAssociation 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 the request will fail.
+   * Currently backup_plan_association.backup_plan is the only supported field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlanAssociation 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 the request will fail.
+   * Currently backup_plan_association.backup_plan is the only supported field.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanRequest.java new file mode 100644 index 000000000000..9fe48387c9ef --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanRequest.java @@ -0,0 +1,1385 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for updating a backup plan.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateBackupPlanRequest} + */ +@com.google.protobuf.Generated +public final class UpdateBackupPlanRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) + UpdateBackupPlanRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateBackupPlanRequest"); + } + + // Use UpdateBackupPlanRequest.newBuilder() to construct. + private UpdateBackupPlanRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateBackupPlanRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.class, + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.Builder.class); + } + + private int bitField0_; + public static final int BACKUP_PLAN_FIELD_NUMBER = 1; + private com.google.cloud.backupdr.v1beta.BackupPlan backupPlan_; + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlan field is set. + */ + @java.lang.Override + public boolean hasBackupPlan() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlan. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlan() { + return backupPlan_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlan_; + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanOrBuilder() { + return backupPlan_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlan_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlan 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 the request will fail.
+   * Currently, these fields are supported in update: description, schedules,
+   * retention period, adding and removing Backup Rules.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlan 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 the request will fail.
+   * Currently, these fields are supported in update: description, schedules,
+   * retention period, adding and removing Backup Rules.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlan 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 the request will fail.
+   * Currently, these fields are supported in update: description, schedules,
+   * retention period, adding and removing Backup Rules.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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 REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getBackupPlan()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBackupPlan()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.backupdr.v1beta.UpdateBackupPlanRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest other = + (com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) obj; + + if (hasBackupPlan() != other.hasBackupPlan()) return false; + if (hasBackupPlan()) { + if (!getBackupPlan().equals(other.getBackupPlan())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasBackupPlan()) { + hash = (37 * hash) + BACKUP_PLAN_FIELD_NUMBER; + hash = (53 * hash) + getBackupPlan().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest 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.backupdr.v1beta.UpdateBackupPlanRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest 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.backupdr.v1beta.UpdateBackupPlanRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.UpdateBackupPlanRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for updating a backup plan.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateBackupPlanRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.class, + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBackupPlanFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + backupPlan_ = null; + if (backupPlanBuilder_ != null) { + backupPlanBuilder_.dispose(); + backupPlanBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupPlanRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest build() { + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest buildPartial() { + com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest result = + new com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.backupPlan_ = backupPlanBuilder_ == null ? backupPlan_ : backupPlanBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest other) { + if (other == com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest.getDefaultInstance()) + return this; + if (other.hasBackupPlan()) { + mergeBackupPlan(other.getBackupPlan()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + internalGetBackupPlanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.cloud.backupdr.v1beta.BackupPlan backupPlan_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder> + backupPlanBuilder_; + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlan field is set. + */ + public boolean hasBackupPlan() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlan. + */ + public com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlan() { + if (backupPlanBuilder_ == null) { + return backupPlan_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlan_; + } else { + return backupPlanBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlan(com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupPlan_ = value; + } else { + backupPlanBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupPlan( + com.google.cloud.backupdr.v1beta.BackupPlan.Builder builderForValue) { + if (backupPlanBuilder_ == null) { + backupPlan_ = builderForValue.build(); + } else { + backupPlanBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupPlan(com.google.cloud.backupdr.v1beta.BackupPlan value) { + if (backupPlanBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && backupPlan_ != null + && backupPlan_ != com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance()) { + getBackupPlanBuilder().mergeFrom(value); + } else { + backupPlan_ = value; + } + } else { + backupPlanBuilder_.mergeFrom(value); + } + if (backupPlan_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearBackupPlan() { + bitField0_ = (bitField0_ & ~0x00000001); + backupPlan_ = null; + if (backupPlanBuilder_ != null) { + backupPlanBuilder_.dispose(); + backupPlanBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlan.Builder getBackupPlanBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetBackupPlanFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanOrBuilder() { + if (backupPlanBuilder_ != null) { + return backupPlanBuilder_.getMessageOrBuilder(); + } else { + return backupPlan_ == null + ? com.google.cloud.backupdr.v1beta.BackupPlan.getDefaultInstance() + : backupPlan_; + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder> + internalGetBackupPlanFieldBuilder() { + if (backupPlanBuilder_ == null) { + backupPlanBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupPlan, + com.google.cloud.backupdr.v1beta.BackupPlan.Builder, + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder>( + getBackupPlan(), getParentForChildren(), isClean()); + backupPlan_ = null; + } + return backupPlanBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.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. The list of fields to update.
+     * Field mask is used to specify the fields to be overwritten in the
+     * BackupPlan 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 the request will fail.
+     * Currently, these fields are supported in update: description, schedules,
+     * retention period, adding and removing Backup Rules.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and t
+     * he request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) + private static final com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest(); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateBackupPlanRequest 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.backupdr.v1beta.UpdateBackupPlanRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanRequestOrBuilder.java new file mode 100644 index 000000000000..06fb2a0e4fbc --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupPlanRequestOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface UpdateBackupPlanRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.UpdateBackupPlanRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupPlan field is set. + */ + boolean hasBackupPlan(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupPlan. + */ + com.google.cloud.backupdr.v1beta.BackupPlan getBackupPlan(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupPlan backup_plan = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupPlanOrBuilder getBackupPlanOrBuilder(); + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlan 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 the request will fail.
+   * Currently, these fields are supported in update: description, schedules,
+   * retention period, adding and removing Backup Rules.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlan 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 the request will fail.
+   * Currently, these fields are supported in update: description, schedules,
+   * retention period, adding and removing Backup Rules.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The list of fields to update.
+   * Field mask is used to specify the fields to be overwritten in the
+   * BackupPlan 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 the request will fail.
+   * Currently, these fields are supported in update: description, schedules,
+   * retention period, adding and removing Backup Rules.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and t
+   * he request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupRequest.java new file mode 100644 index 000000000000..b04cb749c71d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupRequest.java @@ -0,0 +1,1342 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for updating a Backup.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateBackupRequest} + */ +@com.google.protobuf.Generated +public final class UpdateBackupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.UpdateBackupRequest) + UpdateBackupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateBackupRequest"); + } + + // Use UpdateBackupRequest.newBuilder() to construct. + private UpdateBackupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateBackupRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateBackupRequest.class, + com.google.cloud.backupdr.v1beta.UpdateBackupRequest.Builder.class); + } + + private int bitField0_; + 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 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 the request will fail.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup 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 the request will fail.
+   * 
+ * + * .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 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 the request will fail.
+   * 
+ * + * .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.backupdr.v1beta.Backup backup_; + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + @java.lang.Override + public boolean hasBackup() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.Backup getBackup() { + return backup_ == null ? com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance() : backup_; + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupOrBuilder getBackupOrBuilder() { + return backup_ == null ? com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance() : backup_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getBackup()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBackup()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + 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.backupdr.v1beta.UpdateBackupRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.UpdateBackupRequest other = + (com.google.cloud.backupdr.v1beta.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 (!getRequestId().equals(other.getRequestId())) 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 = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.UpdateBackupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.UpdateBackupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for updating a Backup.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateBackupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.UpdateBackupRequest) + com.google.cloud.backupdr.v1beta.UpdateBackupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateBackupRequest.class, + com.google.cloud.backupdr.v1beta.UpdateBackupRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.UpdateBackupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetBackupFieldBuilder(); + } + } + + @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; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.UpdateBackupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupRequest build() { + com.google.cloud.backupdr.v1beta.UpdateBackupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupRequest buildPartial() { + com.google.cloud.backupdr.v1beta.UpdateBackupRequest result = + new com.google.cloud.backupdr.v1beta.UpdateBackupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.UpdateBackupRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backup_ = backupBuilder_ == null ? backup_ : backupBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.UpdateBackupRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.UpdateBackupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.UpdateBackupRequest other) { + if (other == com.google.cloud.backupdr.v1beta.UpdateBackupRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasBackup()) { + mergeBackup(other.getBackup()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetBackupFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + 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 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 the request will fail.
+     * 
+ * + * .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 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 the request will fail.
+     * 
+ * + * .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 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 the request will fail.
+     * 
+ * + * .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 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 the request will fail.
+     * 
+ * + * .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 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 the request will fail.
+     * 
+ * + * .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); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup 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 the request will fail.
+     * 
+ * + * .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 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 the request will fail.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * Backup 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 the request will fail.
+     * 
+ * + * .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 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 the request will fail.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.backupdr.v1beta.Backup backup_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder> + backupBuilder_; + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + public boolean hasBackup() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + public com.google.cloud.backupdr.v1beta.Backup getBackup() { + if (backupBuilder_ == null) { + return backup_ == null + ? com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance() + : backup_; + } else { + return backupBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackup(com.google.cloud.backupdr.v1beta.Backup value) { + if (backupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backup_ = value; + } else { + backupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackup(com.google.cloud.backupdr.v1beta.Backup.Builder builderForValue) { + if (backupBuilder_ == null) { + backup_ = builderForValue.build(); + } else { + backupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackup(com.google.cloud.backupdr.v1beta.Backup value) { + if (backupBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && backup_ != null + && backup_ != com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance()) { + getBackupBuilder().mergeFrom(value); + } else { + backup_ = value; + } + } else { + backupBuilder_.mergeFrom(value); + } + if (backup_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.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 resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.Backup.Builder getBackupBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetBackupFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupOrBuilder getBackupOrBuilder() { + if (backupBuilder_ != null) { + return backupBuilder_.getMessageOrBuilder(); + } else { + return backup_ == null + ? com.google.cloud.backupdr.v1beta.Backup.getDefaultInstance() + : backup_; + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder> + internalGetBackupFieldBuilder() { + if (backupBuilder_ == null) { + backupBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.Backup, + com.google.cloud.backupdr.v1beta.Backup.Builder, + com.google.cloud.backupdr.v1beta.BackupOrBuilder>( + getBackup(), getParentForChildren(), isClean()); + backup_ = null; + } + return backupBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.UpdateBackupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.UpdateBackupRequest) + private static final com.google.cloud.backupdr.v1beta.UpdateBackupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.UpdateBackupRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.UpdateBackupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupRequestOrBuilder.java new file mode 100644 index 000000000000..b5cc7afe8394 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupRequestOrBuilder.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface UpdateBackupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.UpdateBackupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * Backup 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 the request will fail.
+   * 
+ * + * .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 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 the request will fail.
+   * 
+ * + * .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 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 the request will fail.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backup field is set. + */ + boolean hasBackup(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backup. + */ + com.google.cloud.backupdr.v1beta.Backup getBackup(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupOrBuilder getBackupOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupVaultRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupVaultRequest.java new file mode 100644 index 000000000000..66e2cacd55a1 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupVaultRequest.java @@ -0,0 +1,1659 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for updating a BackupVault.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateBackupVaultRequest} + */ +@com.google.protobuf.Generated +public final class UpdateBackupVaultRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.UpdateBackupVaultRequest) + UpdateBackupVaultRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateBackupVaultRequest"); + } + + // Use UpdateBackupVaultRequest.newBuilder() to construct. + private UpdateBackupVaultRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateBackupVaultRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.class, + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.Builder.class); + } + + private int bitField0_; + 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
+   * BackupVault 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 the request will fail.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * BackupVault 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 the request will fail.
+   * 
+ * + * .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
+   * BackupVault 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 the request will fail.
+   * 
+ * + * .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.backupdr.v1beta.BackupVault backupVault_; + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + @java.lang.Override + public boolean hasBackupVault() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVault() { + return backupVault_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance() + : backupVault_; + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultOrBuilder() { + return backupVault_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance() + : backupVault_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is 'false'.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int FORCE_FIELD_NUMBER = 5; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, will not check plan duration against backup vault
+   * enforcement duration.
+   * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + public static final int FORCE_UPDATE_ACCESS_RESTRICTION_FIELD_NUMBER = 6; + private boolean forceUpdateAccessRestriction_ = false; + + /** + * + * + *
+   * Optional. If set to true, we will force update access restriction even if
+   * some non compliant data sources are present. The default is 'false'.
+   * 
+ * + * bool force_update_access_restriction = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The forceUpdateAccessRestriction. + */ + @java.lang.Override + public boolean getForceUpdateAccessRestriction() { + return forceUpdateAccessRestriction_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getBackupVault()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + if (force_ != false) { + output.writeBool(5, force_); + } + if (forceUpdateAccessRestriction_ != false) { + output.writeBool(6, forceUpdateAccessRestriction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBackupVault()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, force_); + } + if (forceUpdateAccessRestriction_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(6, forceUpdateAccessRestriction_); + } + 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.backupdr.v1beta.UpdateBackupVaultRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest other = + (com.google.cloud.backupdr.v1beta.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 (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (getForce() != other.getForce()) return false; + if (getForceUpdateAccessRestriction() != other.getForceUpdateAccessRestriction()) 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 = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (37 * hash) + FORCE_UPDATE_ACCESS_RESTRICTION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForceUpdateAccessRestriction()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.UpdateBackupVaultRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.UpdateBackupVaultRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for updating a BackupVault.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateBackupVaultRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.UpdateBackupVaultRequest) + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.class, + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetBackupVaultFieldBuilder(); + } + } + + @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; + } + requestId_ = ""; + validateOnly_ = false; + force_ = false; + forceUpdateAccessRestriction_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateBackupVaultRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest build() { + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest buildPartial() { + com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest result = + new com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backupVault_ = + backupVaultBuilder_ == null ? backupVault_ : backupVaultBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.force_ = force_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.forceUpdateAccessRestriction_ = forceUpdateAccessRestriction_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest other) { + if (other == com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasBackupVault()) { + mergeBackupVault(other.getBackupVault()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + if (other.getForceUpdateAccessRestriction() != false) { + setForceUpdateAccessRestriction(other.getForceUpdateAccessRestriction()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetBackupVaultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + force_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + forceUpdateAccessRestriction_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + 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.SingleFieldBuilder< + 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
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .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
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .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
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .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
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .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
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .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); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .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
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .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
+     * BackupVault 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 the request will fail.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.backupdr.v1beta.BackupVault backupVault_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder> + backupVaultBuilder_; + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.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 resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + public com.google.cloud.backupdr.v1beta.BackupVault getBackupVault() { + if (backupVaultBuilder_ == null) { + return backupVault_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance() + : backupVault_; + } else { + return backupVaultBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupVault(com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backupVault_ = value; + } else { + backupVaultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setBackupVault( + com.google.cloud.backupdr.v1beta.BackupVault.Builder builderForValue) { + if (backupVaultBuilder_ == null) { + backupVault_ = builderForValue.build(); + } else { + backupVaultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeBackupVault(com.google.cloud.backupdr.v1beta.BackupVault value) { + if (backupVaultBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && backupVault_ != null + && backupVault_ != com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance()) { + getBackupVaultBuilder().mergeFrom(value); + } else { + backupVault_ = value; + } + } else { + backupVaultBuilder_.mergeFrom(value); + } + if (backupVault_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.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 resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupVault.Builder getBackupVaultBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetBackupVaultFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultOrBuilder() { + if (backupVaultBuilder_ != null) { + return backupVaultBuilder_.getMessageOrBuilder(); + } else { + return backupVault_ == null + ? com.google.cloud.backupdr.v1beta.BackupVault.getDefaultInstance() + : backupVault_; + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder> + internalGetBackupVaultFieldBuilder() { + if (backupVaultBuilder_ == null) { + backupVaultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.BackupVault, + com.google.cloud.backupdr.v1beta.BackupVault.Builder, + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder>( + getBackupVault(), getParentForChildren(), isClean()); + backupVault_ = null; + } + return backupVaultBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is 'false'.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, will not check plan duration against backup vault
+     * enforcement duration.
+     * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, will not check plan duration against backup vault
+     * enforcement duration.
+     * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, will not check plan duration against backup vault
+     * enforcement duration.
+     * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000010); + force_ = false; + onChanged(); + return this; + } + + private boolean forceUpdateAccessRestriction_; + + /** + * + * + *
+     * Optional. If set to true, we will force update access restriction even if
+     * some non compliant data sources are present. The default is 'false'.
+     * 
+ * + * bool force_update_access_restriction = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The forceUpdateAccessRestriction. + */ + @java.lang.Override + public boolean getForceUpdateAccessRestriction() { + return forceUpdateAccessRestriction_; + } + + /** + * + * + *
+     * Optional. If set to true, we will force update access restriction even if
+     * some non compliant data sources are present. The default is 'false'.
+     * 
+ * + * bool force_update_access_restriction = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The forceUpdateAccessRestriction to set. + * @return This builder for chaining. + */ + public Builder setForceUpdateAccessRestriction(boolean value) { + + forceUpdateAccessRestriction_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, we will force update access restriction even if
+     * some non compliant data sources are present. The default is 'false'.
+     * 
+ * + * bool force_update_access_restriction = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearForceUpdateAccessRestriction() { + bitField0_ = (bitField0_ & ~0x00000020); + forceUpdateAccessRestriction_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.UpdateBackupVaultRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.UpdateBackupVaultRequest) + private static final com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.UpdateBackupVaultRequest(); + } + + public static com.google.cloud.backupdr.v1beta.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.backupdr.v1beta.UpdateBackupVaultRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupVaultRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupVaultRequestOrBuilder.java new file mode 100644 index 000000000000..0304e28bfa1a --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateBackupVaultRequestOrBuilder.java @@ -0,0 +1,220 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface UpdateBackupVaultRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.UpdateBackupVaultRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * BackupVault 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 the request will fail.
+   * 
+ * + * .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
+   * BackupVault 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 the request will fail.
+   * 
+ * + * .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
+   * BackupVault 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 the request will fail.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the backupVault field is set. + */ + boolean hasBackupVault(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The backupVault. + */ + com.google.cloud.backupdr.v1beta.BackupVault getBackupVault(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.BackupVaultOrBuilder getBackupVaultOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is 'false'.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. If set to true, will not check plan duration against backup vault
+   * enforcement duration.
+   * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); + + /** + * + * + *
+   * Optional. If set to true, we will force update access restriction even if
+   * some non compliant data sources are present. The default is 'false'.
+   * 
+ * + * bool force_update_access_restriction = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The forceUpdateAccessRestriction. + */ + boolean getForceUpdateAccessRestriction(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateDataSourceRequest.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateDataSourceRequest.java new file mode 100644 index 000000000000..59fe369e9ad4 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateDataSourceRequest.java @@ -0,0 +1,1446 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * Request message for updating a data source instance.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateDataSourceRequest} + */ +@com.google.protobuf.Generated +public final class UpdateDataSourceRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.UpdateDataSourceRequest) + UpdateDataSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "UpdateDataSourceRequest"); + } + + // Use UpdateDataSourceRequest.newBuilder() to construct. + private UpdateDataSourceRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateDataSourceRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest.class, + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest.Builder.class); + } + + private int bitField0_; + 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
+   * DataSource 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 the request will fail.
+   * 
+ * + * .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 ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * DataSource 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 the request will fail.
+   * 
+ * + * .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
+   * DataSource 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 the request will fail.
+   * 
+ * + * .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 DATA_SOURCE_FIELD_NUMBER = 2; + private com.google.cloud.backupdr.v1beta.DataSource dataSource_; + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataSource field is set. + */ + @java.lang.Override + public boolean hasDataSource() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataSource. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSource getDataSource() { + return dataSource_ == null + ? com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance() + : dataSource_; + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.DataSourceOrBuilder getDataSourceOrBuilder() { + return dataSource_ == null + ? com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance() + : dataSource_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 4; + private boolean allowMissing_ = false; + + /** + * + * + *
+   * Optional. Enable upsert.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getDataSource()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(4, allowMissing_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataSource()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); + } + 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.backupdr.v1beta.UpdateDataSourceRequest)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest other = + (com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasDataSource() != other.hasDataSource()) return false; + if (hasDataSource()) { + if (!getDataSource().equals(other.getDataSource())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) 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 (hasDataSource()) { + hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest 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.backupdr.v1beta.UpdateDataSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest 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.backupdr.v1beta.UpdateDataSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.UpdateDataSourceRequest 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for updating a data source instance.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.UpdateDataSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.UpdateDataSourceRequest) + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest.class, + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetDataSourceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + dataSource_ = null; + if (dataSourceBuilder_ != null) { + dataSourceBuilder_.dispose(); + dataSourceBuilder_ = null; + } + requestId_ = ""; + allowMissing_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupVaultProto + .internal_static_google_cloud_backupdr_v1beta_UpdateDataSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest build() { + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest buildPartial() { + com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest result = + new com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataSource_ = dataSourceBuilder_ == null ? dataSource_ : dataSourceBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.allowMissing_ = allowMissing_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest) { + return mergeFrom((com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest other) { + if (other == com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasDataSource()) { + mergeDataSource(other.getDataSource()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDataSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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.SingleFieldBuilder< + 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
+     * DataSource 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 the request will fail.
+     * 
+ * + * .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
+     * DataSource 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 the request will fail.
+     * 
+ * + * .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
+     * DataSource 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 the request will fail.
+     * 
+ * + * .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
+     * DataSource 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 the request will fail.
+     * 
+ * + * .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
+     * DataSource 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 the request will fail.
+     * 
+ * + * .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); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * DataSource 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 the request will fail.
+     * 
+ * + * .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
+     * DataSource 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 the request will fail.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * DataSource 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 the request will fail.
+     * 
+ * + * .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
+     * DataSource 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 the request will fail.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.backupdr.v1beta.DataSource dataSource_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSource, + com.google.cloud.backupdr.v1beta.DataSource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder> + dataSourceBuilder_; + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataSource field is set. + */ + public boolean hasDataSource() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataSource. + */ + public com.google.cloud.backupdr.v1beta.DataSource getDataSource() { + if (dataSourceBuilder_ == null) { + return dataSource_ == null + ? com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance() + : dataSource_; + } else { + return dataSourceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataSource(com.google.cloud.backupdr.v1beta.DataSource value) { + if (dataSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + } else { + dataSourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataSource( + com.google.cloud.backupdr.v1beta.DataSource.Builder builderForValue) { + if (dataSourceBuilder_ == null) { + dataSource_ = builderForValue.build(); + } else { + dataSourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataSource(com.google.cloud.backupdr.v1beta.DataSource value) { + if (dataSourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataSource_ != null + && dataSource_ != com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance()) { + getDataSourceBuilder().mergeFrom(value); + } else { + dataSource_ = value; + } + } else { + dataSourceBuilder_.mergeFrom(value); + } + if (dataSource_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataSource() { + bitField0_ = (bitField0_ & ~0x00000002); + dataSource_ = null; + if (dataSourceBuilder_ != null) { + dataSourceBuilder_.dispose(); + dataSourceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.DataSource.Builder getDataSourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDataSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.backupdr.v1beta.DataSourceOrBuilder getDataSourceOrBuilder() { + if (dataSourceBuilder_ != null) { + return dataSourceBuilder_.getMessageOrBuilder(); + } else { + return dataSource_ == null + ? com.google.cloud.backupdr.v1beta.DataSource.getDefaultInstance() + : dataSource_; + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSource, + com.google.cloud.backupdr.v1beta.DataSource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder> + internalGetDataSourceFieldBuilder() { + if (dataSourceBuilder_ == null) { + dataSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.backupdr.v1beta.DataSource, + com.google.cloud.backupdr.v1beta.DataSource.Builder, + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder>( + getDataSource(), getParentForChildren(), isClean()); + dataSource_ = null; + } + return dataSourceBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean allowMissing_; + + /** + * + * + *
+     * Optional. Enable upsert.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + /** + * + * + *
+     * Optional. Enable upsert.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Enable upsert.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000008); + allowMissing_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.UpdateDataSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.UpdateDataSourceRequest) + private static final com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest(); + } + + public static com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataSourceRequest 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.backupdr.v1beta.UpdateDataSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateDataSourceRequestOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateDataSourceRequestOrBuilder.java new file mode 100644 index 000000000000..7005d8af6abe --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/UpdateDataSourceRequestOrBuilder.java @@ -0,0 +1,190 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupvault.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface UpdateDataSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.UpdateDataSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * DataSource 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 the request will fail.
+   * 
+ * + * .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
+   * DataSource 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 the request will fail.
+   * 
+ * + * .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
+   * DataSource 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 the request will fail.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataSource field is set. + */ + boolean hasDataSource(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataSource. + */ + com.google.cloud.backupdr.v1beta.DataSource getDataSource(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.DataSource data_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.backupdr.v1beta.DataSourceOrBuilder getDataSourceOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. Enable upsert.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WeekDayOfMonth.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WeekDayOfMonth.java new file mode 100644 index 000000000000..2098f8aec924 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WeekDayOfMonth.java @@ -0,0 +1,986 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * `WeekDayOfMonth` defines the week day of the month on which the backups will
+ * run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values
+ * like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.WeekDayOfMonth} + */ +@com.google.protobuf.Generated +public final class WeekDayOfMonth extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.WeekDayOfMonth) + WeekDayOfMonthOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "WeekDayOfMonth"); + } + + // Use WeekDayOfMonth.newBuilder() to construct. + private WeekDayOfMonth(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private WeekDayOfMonth() { + weekOfMonth_ = 0; + dayOfWeek_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_WeekDayOfMonth_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.class, + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.Builder.class); + } + + /** + * + * + *
+   * `WeekOfMonth` enumerates possible weeks in the month, e.g. the first,
+   * third, or last week of the month.
+   * 
+ * + * Protobuf enum {@code google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth} + */ + public enum WeekOfMonth implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The zero value. Do not use.
+     * 
+ * + * WEEK_OF_MONTH_UNSPECIFIED = 0; + */ + WEEK_OF_MONTH_UNSPECIFIED(0), + /** + * + * + *
+     * The first week of the month.
+     * 
+ * + * FIRST = 1; + */ + FIRST(1), + /** + * + * + *
+     * The second week of the month.
+     * 
+ * + * SECOND = 2; + */ + SECOND(2), + /** + * + * + *
+     * The third week of the month.
+     * 
+ * + * THIRD = 3; + */ + THIRD(3), + /** + * + * + *
+     * The fourth  week of the month.
+     * 
+ * + * FOURTH = 4; + */ + FOURTH(4), + /** + * + * + *
+     * The last  week of the month.
+     * 
+ * + * LAST = 5; + */ + LAST(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "WeekOfMonth"); + } + + /** + * + * + *
+     * The zero value. Do not use.
+     * 
+ * + * WEEK_OF_MONTH_UNSPECIFIED = 0; + */ + public static final int WEEK_OF_MONTH_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The first week of the month.
+     * 
+ * + * FIRST = 1; + */ + public static final int FIRST_VALUE = 1; + + /** + * + * + *
+     * The second week of the month.
+     * 
+ * + * SECOND = 2; + */ + public static final int SECOND_VALUE = 2; + + /** + * + * + *
+     * The third week of the month.
+     * 
+ * + * THIRD = 3; + */ + public static final int THIRD_VALUE = 3; + + /** + * + * + *
+     * The fourth  week of the month.
+     * 
+ * + * FOURTH = 4; + */ + public static final int FOURTH_VALUE = 4; + + /** + * + * + *
+     * The last  week of the month.
+     * 
+ * + * LAST = 5; + */ + public static final int LAST_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 WeekOfMonth 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 WeekOfMonth forNumber(int value) { + switch (value) { + case 0: + return WEEK_OF_MONTH_UNSPECIFIED; + case 1: + return FIRST; + case 2: + return SECOND; + case 3: + return THIRD; + case 4: + return FOURTH; + case 5: + return LAST; + 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 WeekOfMonth findValueByNumber(int number) { + return WeekOfMonth.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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.WeekDayOfMonth.getDescriptor().getEnumTypes().get(0); + } + + private static final WeekOfMonth[] VALUES = values(); + + public static WeekOfMonth 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 WeekOfMonth(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth) + } + + public static final int WEEK_OF_MONTH_FIELD_NUMBER = 1; + private int weekOfMonth_ = 0; + + /** + * + * + *
+   * Required. Specifies the week of the month.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for weekOfMonth. + */ + @java.lang.Override + public int getWeekOfMonthValue() { + return weekOfMonth_; + } + + /** + * + * + *
+   * Required. Specifies the week of the month.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekOfMonth. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth getWeekOfMonth() { + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth result = + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth.forNumber(weekOfMonth_); + return result == null + ? com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth.UNRECOGNIZED + : result; + } + + public static final int DAY_OF_WEEK_FIELD_NUMBER = 2; + private int dayOfWeek_ = 0; + + /** + * + * + *
+   * Required. Specifies the day of the week.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override + public int getDayOfWeekValue() { + return dayOfWeek_; + } + + /** + * + * + *
+   * Required. Specifies the day of the week.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dayOfWeek. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDayOfWeek() { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.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 (weekOfMonth_ + != com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth.WEEK_OF_MONTH_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, weekOfMonth_); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + output.writeEnum(2, dayOfWeek_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (weekOfMonth_ + != com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth.WEEK_OF_MONTH_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, weekOfMonth_); + } + if (dayOfWeek_ != com.google.type.DayOfWeek.DAY_OF_WEEK_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, dayOfWeek_); + } + 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.backupdr.v1beta.WeekDayOfMonth)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.WeekDayOfMonth other = + (com.google.cloud.backupdr.v1beta.WeekDayOfMonth) obj; + + if (weekOfMonth_ != other.weekOfMonth_) return false; + if (dayOfWeek_ != other.dayOfWeek_) 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) + WEEK_OF_MONTH_FIELD_NUMBER; + hash = (53 * hash) + weekOfMonth_; + hash = (37 * hash) + DAY_OF_WEEK_FIELD_NUMBER; + hash = (53 * hash) + dayOfWeek_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth 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.backupdr.v1beta.WeekDayOfMonth parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth 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.backupdr.v1beta.WeekDayOfMonth parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.WeekDayOfMonth 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * `WeekDayOfMonth` defines the week day of the month on which the backups will
+   * run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values
+   * like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.WeekDayOfMonth} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.WeekDayOfMonth) + com.google.cloud.backupdr.v1beta.WeekDayOfMonthOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_WeekDayOfMonth_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.class, + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.Builder.class); + } + + // Construct using com.google.cloud.backupdr.v1beta.WeekDayOfMonth.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + weekOfMonth_ = 0; + dayOfWeek_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupPlanProto + .internal_static_google_cloud_backupdr_v1beta_WeekDayOfMonth_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WeekDayOfMonth getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.WeekDayOfMonth.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WeekDayOfMonth build() { + com.google.cloud.backupdr.v1beta.WeekDayOfMonth result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WeekDayOfMonth buildPartial() { + com.google.cloud.backupdr.v1beta.WeekDayOfMonth result = + new com.google.cloud.backupdr.v1beta.WeekDayOfMonth(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.backupdr.v1beta.WeekDayOfMonth result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.weekOfMonth_ = weekOfMonth_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dayOfWeek_ = dayOfWeek_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.WeekDayOfMonth) { + return mergeFrom((com.google.cloud.backupdr.v1beta.WeekDayOfMonth) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.backupdr.v1beta.WeekDayOfMonth other) { + if (other == com.google.cloud.backupdr.v1beta.WeekDayOfMonth.getDefaultInstance()) + return this; + if (other.weekOfMonth_ != 0) { + setWeekOfMonthValue(other.getWeekOfMonthValue()); + } + if (other.dayOfWeek_ != 0) { + setDayOfWeekValue(other.getDayOfWeekValue()); + } + 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 8: + { + weekOfMonth_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + dayOfWeek_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + 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 int weekOfMonth_ = 0; + + /** + * + * + *
+     * Required. Specifies the week of the month.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for weekOfMonth. + */ + @java.lang.Override + public int getWeekOfMonthValue() { + return weekOfMonth_; + } + + /** + * + * + *
+     * Required. Specifies the week of the month.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for weekOfMonth to set. + * @return This builder for chaining. + */ + public Builder setWeekOfMonthValue(int value) { + weekOfMonth_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the week of the month.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekOfMonth. + */ + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth getWeekOfMonth() { + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth result = + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth.forNumber(weekOfMonth_); + return result == null + ? com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Specifies the week of the month.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The weekOfMonth to set. + * @return This builder for chaining. + */ + public Builder setWeekOfMonth( + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + weekOfMonth_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the week of the month.
+     * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearWeekOfMonth() { + bitField0_ = (bitField0_ & ~0x00000001); + weekOfMonth_ = 0; + onChanged(); + return this; + } + + private int dayOfWeek_ = 0; + + /** + * + * + *
+     * Required. Specifies the day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + @java.lang.Override + public int getDayOfWeekValue() { + return dayOfWeek_; + } + + /** + * + * + *
+     * Required. Specifies the day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeekValue(int value) { + dayOfWeek_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dayOfWeek. + */ + @java.lang.Override + public com.google.type.DayOfWeek getDayOfWeek() { + com.google.type.DayOfWeek result = com.google.type.DayOfWeek.forNumber(dayOfWeek_); + return result == null ? com.google.type.DayOfWeek.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. Specifies the day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The dayOfWeek to set. + * @return This builder for chaining. + */ + public Builder setDayOfWeek(com.google.type.DayOfWeek value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dayOfWeek_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the day of the week.
+     * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearDayOfWeek() { + bitField0_ = (bitField0_ & ~0x00000002); + dayOfWeek_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.WeekDayOfMonth) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.WeekDayOfMonth) + private static final com.google.cloud.backupdr.v1beta.WeekDayOfMonth DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.WeekDayOfMonth(); + } + + public static com.google.cloud.backupdr.v1beta.WeekDayOfMonth getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WeekDayOfMonth 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.backupdr.v1beta.WeekDayOfMonth getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WeekDayOfMonthOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WeekDayOfMonthOrBuilder.java new file mode 100644 index 000000000000..deff44ac679d --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WeekDayOfMonthOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupplan.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface WeekDayOfMonthOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.WeekDayOfMonth) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Specifies the week of the month.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for weekOfMonth. + */ + int getWeekOfMonthValue(); + + /** + * + * + *
+   * Required. Specifies the week of the month.
+   * 
+ * + * + * .google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth week_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The weekOfMonth. + */ + com.google.cloud.backupdr.v1beta.WeekDayOfMonth.WeekOfMonth getWeekOfMonth(); + + /** + * + * + *
+   * Required. Specifies the day of the week.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enum numeric value on the wire for dayOfWeek. + */ + int getDayOfWeekValue(); + + /** + * + * + *
+   * Required. Specifies the day of the week.
+   * 
+ * + * .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dayOfWeek. + */ + com.google.type.DayOfWeek getDayOfWeek(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedManagementURI.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedManagementURI.java new file mode 100644 index 000000000000..e380015f7744 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedManagementURI.java @@ -0,0 +1,812 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * ManagementURI depending on the Workforce Identity i.e. either 1p or 3p.
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI} + */ +@com.google.protobuf.Generated +public final class WorkforceIdentityBasedManagementURI extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI) + WorkforceIdentityBasedManagementURIOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "WorkforceIdentityBasedManagementURI"); + } + + // Use WorkforceIdentityBasedManagementURI.newBuilder() to construct. + private WorkforceIdentityBasedManagementURI( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private WorkforceIdentityBasedManagementURI() { + firstPartyManagementUri_ = ""; + thirdPartyManagementUri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedManagementURI_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedManagementURI_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.class, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.Builder.class); + } + + public static final int FIRST_PARTY_MANAGEMENT_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object firstPartyManagementUri_ = ""; + + /** + * + * + *
+   * Output only. First party Management URI for Google Identities.
+   * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyManagementUri. + */ + @java.lang.Override + public java.lang.String getFirstPartyManagementUri() { + java.lang.Object ref = firstPartyManagementUri_; + 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(); + firstPartyManagementUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. First party Management URI for Google Identities.
+   * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyManagementUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirstPartyManagementUriBytes() { + java.lang.Object ref = firstPartyManagementUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firstPartyManagementUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THIRD_PARTY_MANAGEMENT_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object thirdPartyManagementUri_ = ""; + + /** + * + * + *
+   * Output only. Third party Management URI for External Identity Providers.
+   * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyManagementUri. + */ + @java.lang.Override + public java.lang.String getThirdPartyManagementUri() { + java.lang.Object ref = thirdPartyManagementUri_; + 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(); + thirdPartyManagementUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Third party Management URI for External Identity Providers.
+   * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyManagementUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getThirdPartyManagementUriBytes() { + java.lang.Object ref = thirdPartyManagementUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + thirdPartyManagementUri_ = 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.GeneratedMessage.isStringEmpty(firstPartyManagementUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, firstPartyManagementUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thirdPartyManagementUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, thirdPartyManagementUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(firstPartyManagementUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, firstPartyManagementUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thirdPartyManagementUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, thirdPartyManagementUri_); + } + 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.backupdr.v1beta.WorkforceIdentityBasedManagementURI)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI other = + (com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI) obj; + + if (!getFirstPartyManagementUri().equals(other.getFirstPartyManagementUri())) return false; + if (!getThirdPartyManagementUri().equals(other.getThirdPartyManagementUri())) 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) + FIRST_PARTY_MANAGEMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getFirstPartyManagementUri().hashCode(); + hash = (37 * hash) + THIRD_PARTY_MANAGEMENT_URI_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyManagementUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI 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.backupdr.v1beta.WorkforceIdentityBasedManagementURI parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI 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.backupdr.v1beta.WorkforceIdentityBasedManagementURI parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.WorkforceIdentityBasedManagementURI 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ManagementURI depending on the Workforce Identity i.e. either 1p or 3p.
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI) + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURIOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedManagementURI_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedManagementURI_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.class, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + firstPartyManagementUri_ = ""; + thirdPartyManagementUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedManagementURI_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI build() { + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI buildPartial() { + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI result = + new com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.firstPartyManagementUri_ = firstPartyManagementUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.thirdPartyManagementUri_ = thirdPartyManagementUri_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI other) { + if (other + == com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + .getDefaultInstance()) return this; + if (!other.getFirstPartyManagementUri().isEmpty()) { + firstPartyManagementUri_ = other.firstPartyManagementUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getThirdPartyManagementUri().isEmpty()) { + thirdPartyManagementUri_ = other.thirdPartyManagementUri_; + bitField0_ |= 0x00000002; + 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: + { + firstPartyManagementUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + thirdPartyManagementUri_ = input.readStringRequireUtf8(); + 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 java.lang.Object firstPartyManagementUri_ = ""; + + /** + * + * + *
+     * Output only. First party Management URI for Google Identities.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyManagementUri. + */ + public java.lang.String getFirstPartyManagementUri() { + java.lang.Object ref = firstPartyManagementUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firstPartyManagementUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. First party Management URI for Google Identities.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyManagementUri. + */ + public com.google.protobuf.ByteString getFirstPartyManagementUriBytes() { + java.lang.Object ref = firstPartyManagementUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firstPartyManagementUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. First party Management URI for Google Identities.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The firstPartyManagementUri to set. + * @return This builder for chaining. + */ + public Builder setFirstPartyManagementUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + firstPartyManagementUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. First party Management URI for Google Identities.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFirstPartyManagementUri() { + firstPartyManagementUri_ = getDefaultInstance().getFirstPartyManagementUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. First party Management URI for Google Identities.
+     * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for firstPartyManagementUri to set. + * @return This builder for chaining. + */ + public Builder setFirstPartyManagementUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + firstPartyManagementUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object thirdPartyManagementUri_ = ""; + + /** + * + * + *
+     * Output only. Third party Management URI for External Identity Providers.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyManagementUri. + */ + public java.lang.String getThirdPartyManagementUri() { + java.lang.Object ref = thirdPartyManagementUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + thirdPartyManagementUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Third party Management URI for External Identity Providers.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyManagementUri. + */ + public com.google.protobuf.ByteString getThirdPartyManagementUriBytes() { + java.lang.Object ref = thirdPartyManagementUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + thirdPartyManagementUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Third party Management URI for External Identity Providers.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The thirdPartyManagementUri to set. + * @return This builder for chaining. + */ + public Builder setThirdPartyManagementUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + thirdPartyManagementUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Third party Management URI for External Identity Providers.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearThirdPartyManagementUri() { + thirdPartyManagementUri_ = getDefaultInstance().getThirdPartyManagementUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Third party Management URI for External Identity Providers.
+     * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for thirdPartyManagementUri to set. + * @return This builder for chaining. + */ + public Builder setThirdPartyManagementUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + thirdPartyManagementUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI) + private static final com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI(); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkforceIdentityBasedManagementURI 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.backupdr.v1beta.WorkforceIdentityBasedManagementURI + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedManagementURIOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedManagementURIOrBuilder.java new file mode 100644 index 000000000000..d5ef036bb3c3 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedManagementURIOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface WorkforceIdentityBasedManagementURIOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.WorkforceIdentityBasedManagementURI) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. First party Management URI for Google Identities.
+   * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyManagementUri. + */ + java.lang.String getFirstPartyManagementUri(); + + /** + * + * + *
+   * Output only. First party Management URI for Google Identities.
+   * 
+ * + * string first_party_management_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyManagementUri. + */ + com.google.protobuf.ByteString getFirstPartyManagementUriBytes(); + + /** + * + * + *
+   * Output only. Third party Management URI for External Identity Providers.
+   * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyManagementUri. + */ + java.lang.String getThirdPartyManagementUri(); + + /** + * + * + *
+   * Output only. Third party Management URI for External Identity Providers.
+   * 
+ * + * string third_party_management_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyManagementUri. + */ + com.google.protobuf.ByteString getThirdPartyManagementUriBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedOAuth2ClientID.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedOAuth2ClientID.java new file mode 100644 index 000000000000..492fd69796e5 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedOAuth2ClientID.java @@ -0,0 +1,812 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +/** + * + * + *
+ * OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p,
+ * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID} + */ +@com.google.protobuf.Generated +public final class WorkforceIdentityBasedOAuth2ClientID extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID) + WorkforceIdentityBasedOAuth2ClientIDOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "WorkforceIdentityBasedOAuth2ClientID"); + } + + // Use WorkforceIdentityBasedOAuth2ClientID.newBuilder() to construct. + private WorkforceIdentityBasedOAuth2ClientID( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private WorkforceIdentityBasedOAuth2ClientID() { + firstPartyOauth2ClientId_ = ""; + thirdPartyOauth2ClientId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedOAuth2ClientID_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedOAuth2ClientID_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.class, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.Builder.class); + } + + public static final int FIRST_PARTY_OAUTH2_CLIENT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object firstPartyOauth2ClientId_ = ""; + + /** + * + * + *
+   * Output only. First party OAuth Client ID for Google Identities.
+   * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyOauth2ClientId. + */ + @java.lang.Override + public java.lang.String getFirstPartyOauth2ClientId() { + java.lang.Object ref = firstPartyOauth2ClientId_; + 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(); + firstPartyOauth2ClientId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. First party OAuth Client ID for Google Identities.
+   * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyOauth2ClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirstPartyOauth2ClientIdBytes() { + java.lang.Object ref = firstPartyOauth2ClientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firstPartyOauth2ClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THIRD_PARTY_OAUTH2_CLIENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object thirdPartyOauth2ClientId_ = ""; + + /** + * + * + *
+   * Output only. Third party OAuth Client ID for External Identity Providers.
+   * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyOauth2ClientId. + */ + @java.lang.Override + public java.lang.String getThirdPartyOauth2ClientId() { + java.lang.Object ref = thirdPartyOauth2ClientId_; + 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(); + thirdPartyOauth2ClientId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Third party OAuth Client ID for External Identity Providers.
+   * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyOauth2ClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getThirdPartyOauth2ClientIdBytes() { + java.lang.Object ref = thirdPartyOauth2ClientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + thirdPartyOauth2ClientId_ = 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.GeneratedMessage.isStringEmpty(firstPartyOauth2ClientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, firstPartyOauth2ClientId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thirdPartyOauth2ClientId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, thirdPartyOauth2ClientId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(firstPartyOauth2ClientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, firstPartyOauth2ClientId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thirdPartyOauth2ClientId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, thirdPartyOauth2ClientId_); + } + 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.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID)) { + return super.equals(obj); + } + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID other = + (com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID) obj; + + if (!getFirstPartyOauth2ClientId().equals(other.getFirstPartyOauth2ClientId())) return false; + if (!getThirdPartyOauth2ClientId().equals(other.getThirdPartyOauth2ClientId())) 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) + FIRST_PARTY_OAUTH2_CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getFirstPartyOauth2ClientId().hashCode(); + hash = (37 * hash) + THIRD_PARTY_OAUTH2_CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyOauth2ClientId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID 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.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID 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.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.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.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID 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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p,
+   * 
+ * + * Protobuf type {@code google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID) + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientIDOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedOAuth2ClientID_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedOAuth2ClientID_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.class, + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.Builder.class); + } + + // Construct using + // com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + firstPartyOauth2ClientId_ = ""; + thirdPartyOauth2ClientId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.backupdr.v1beta.BackupDRProto + .internal_static_google_cloud_backupdr_v1beta_WorkforceIdentityBasedOAuth2ClientID_descriptor; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + getDefaultInstanceForType() { + return com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID build() { + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID buildPartial() { + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID result = + new com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.firstPartyOauth2ClientId_ = firstPartyOauth2ClientId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.thirdPartyOauth2ClientId_ = thirdPartyOauth2ClientId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID) { + return mergeFrom( + (com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID other) { + if (other + == com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + .getDefaultInstance()) return this; + if (!other.getFirstPartyOauth2ClientId().isEmpty()) { + firstPartyOauth2ClientId_ = other.firstPartyOauth2ClientId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getThirdPartyOauth2ClientId().isEmpty()) { + thirdPartyOauth2ClientId_ = other.thirdPartyOauth2ClientId_; + bitField0_ |= 0x00000002; + 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: + { + firstPartyOauth2ClientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + thirdPartyOauth2ClientId_ = input.readStringRequireUtf8(); + 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 java.lang.Object firstPartyOauth2ClientId_ = ""; + + /** + * + * + *
+     * Output only. First party OAuth Client ID for Google Identities.
+     * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyOauth2ClientId. + */ + public java.lang.String getFirstPartyOauth2ClientId() { + java.lang.Object ref = firstPartyOauth2ClientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firstPartyOauth2ClientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. First party OAuth Client ID for Google Identities.
+     * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyOauth2ClientId. + */ + public com.google.protobuf.ByteString getFirstPartyOauth2ClientIdBytes() { + java.lang.Object ref = firstPartyOauth2ClientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firstPartyOauth2ClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. First party OAuth Client ID for Google Identities.
+     * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The firstPartyOauth2ClientId to set. + * @return This builder for chaining. + */ + public Builder setFirstPartyOauth2ClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + firstPartyOauth2ClientId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. First party OAuth Client ID for Google Identities.
+     * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFirstPartyOauth2ClientId() { + firstPartyOauth2ClientId_ = getDefaultInstance().getFirstPartyOauth2ClientId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. First party OAuth Client ID for Google Identities.
+     * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for firstPartyOauth2ClientId to set. + * @return This builder for chaining. + */ + public Builder setFirstPartyOauth2ClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + firstPartyOauth2ClientId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object thirdPartyOauth2ClientId_ = ""; + + /** + * + * + *
+     * Output only. Third party OAuth Client ID for External Identity Providers.
+     * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyOauth2ClientId. + */ + public java.lang.String getThirdPartyOauth2ClientId() { + java.lang.Object ref = thirdPartyOauth2ClientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + thirdPartyOauth2ClientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Third party OAuth Client ID for External Identity Providers.
+     * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyOauth2ClientId. + */ + public com.google.protobuf.ByteString getThirdPartyOauth2ClientIdBytes() { + java.lang.Object ref = thirdPartyOauth2ClientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + thirdPartyOauth2ClientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Third party OAuth Client ID for External Identity Providers.
+     * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The thirdPartyOauth2ClientId to set. + * @return This builder for chaining. + */ + public Builder setThirdPartyOauth2ClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + thirdPartyOauth2ClientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Third party OAuth Client ID for External Identity Providers.
+     * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearThirdPartyOauth2ClientId() { + thirdPartyOauth2ClientId_ = getDefaultInstance().getThirdPartyOauth2ClientId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Third party OAuth Client ID for External Identity Providers.
+     * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for thirdPartyOauth2ClientId to set. + * @return This builder for chaining. + */ + public Builder setThirdPartyOauth2ClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + thirdPartyOauth2ClientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID) + } + + // @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID) + private static final com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID(); + } + + public static com.google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkforceIdentityBasedOAuth2ClientID 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.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedOAuth2ClientIDOrBuilder.java b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedOAuth2ClientIDOrBuilder.java new file mode 100644 index 000000000000..97b676b36cf8 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/java/com/google/cloud/backupdr/v1beta/WorkforceIdentityBasedOAuth2ClientIDOrBuilder.java @@ -0,0 +1,84 @@ +/* + * Copyright 2026 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! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/backupdr/v1beta/backupdr.proto +// Protobuf Java Version: 4.33.6 + +package com.google.cloud.backupdr.v1beta; + +@com.google.protobuf.Generated +public interface WorkforceIdentityBasedOAuth2ClientIDOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.backupdr.v1beta.WorkforceIdentityBasedOAuth2ClientID) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. First party OAuth Client ID for Google Identities.
+   * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The firstPartyOauth2ClientId. + */ + java.lang.String getFirstPartyOauth2ClientId(); + + /** + * + * + *
+   * Output only. First party OAuth Client ID for Google Identities.
+   * 
+ * + * string first_party_oauth2_client_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for firstPartyOauth2ClientId. + */ + com.google.protobuf.ByteString getFirstPartyOauth2ClientIdBytes(); + + /** + * + * + *
+   * Output only. Third party OAuth Client ID for External Identity Providers.
+   * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The thirdPartyOauth2ClientId. + */ + java.lang.String getThirdPartyOauth2ClientId(); + + /** + * + * + *
+   * Output only. Third party OAuth Client ID for External Identity Providers.
+   * 
+ * + * string third_party_oauth2_client_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for thirdPartyOauth2ClientId. + */ + com.google.protobuf.ByteString getThirdPartyOauth2ClientIdBytes(); +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto new file mode 100644 index 000000000000..9195d1819f83 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto @@ -0,0 +1,134 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/autoprotectionpolicy.proto"; +import "google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "AppliedAutoProtectionPolicyProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// AppliedAutoProtectionPolicy is a read-only view of AutoProtectionPolicy +// and AutoProtectionPolicyBinding resources that apply to a given workload +// project. +message AppliedAutoProtectionPolicy { + option (google.api.resource) = { + type: "backupdr.googleapis.com/AppliedAutoProtectionPolicy" + pattern: "projects/{project}/locations/{location}/appliedAutoProtectionPolicies/{applied_auto_protection_policy}" + plural: "appliedAutoProtectionPolicies" + singular: "appliedAutoProtectionPolicy" + }; + + // Represents the various states an applied auto protection policy can be in. + enum State { + // State is not specified. + STATE_UNSPECIFIED = 0; + + // The policy is in the process of being applied. + CREATING = 1; + + // The policy has been applied and is active. + ACTIVE = 2; + + // The policy is in the process of being removed. + DELETION_INITIATED = 3; + } + + // Identifier. Canonical resource name. + // Format: + // projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{id}. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The full resource name of the AutoProtectionPolicyBinding that + // applies the source policy to a scope including this workload project. e.g., + // projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}. + string source_binding = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The criteria resources must meet for this rule to apply. From + // AutoProtectionPolicy.criteria. + Criteria criteria = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The set of backup plan configurations, mirroring the + // backup_plan_details from the source AutoProtectionPolicy. Each element + // specifies a backup plan for a given resource type. + repeated BackupPlanDetail backup_plan_details = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp indicating when the binding was last modified. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp indicating when the binding was last created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The summary of the last policy application when the job has + // run. + BindingEvaluationSummary binding_evaluation_summary = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of the applied auto protection policy. + State status = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for listing AppliedAutoProtectionPolicies. +message ListAppliedAutoProtectionPoliciesRequest { + // Required. The project and location for which to retrieve the list of + // applied policies. Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of applied policies to return in a single + // page. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListAppliedAutoProtectionPolicies` call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters resources listed in the + // response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that sorts the results in the response. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListAppliedAutoProtectionPolicies. +message ListAppliedAutoProtectionPoliciesResponse { + // A list of the AppliedAutoProtectionPolicy resources found. + repeated AppliedAutoProtectionPolicy applied_auto_protection_policies = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/autoprotectionpolicy.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/autoprotectionpolicy.proto new file mode 100644 index 000000000000..f29ae43a769b --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/autoprotectionpolicy.proto @@ -0,0 +1,288 @@ +// Copyright 2026 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.backupdr.v1beta; + +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.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "AutoProtectionPolicyProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// An AutoprotectionPolicy is a policy resource designed to automate backup +// management, moving from manual per-resource protection to a bulk approach. +// The policy dynamically discovers and applies a specified backup plan to all +// eligible resources that match its defined scope and criteria. +message AutoProtectionPolicy { + option (google.api.resource) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + pattern: "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}" + plural: "autoProtectionPolicies" + singular: "autoProtectionPolicy" + }; + + // The state of an AutoprotectionPolicy. + enum State { + // The state of the policy is unspecified. + STATE_UNSPECIFIED = 0; + + // The policy is being created. + CREATING = 1; + + // The policy is active and protecting matching resources. + ACTIVE = 2; + + // The policy is being updated. + UPDATING = 3; + + // The policy is being deleted. + DELETING = 4; + } + + // Identifier. The resource name of the AutoprotectionPolicy. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. A description of the policy. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The backup plan details for matching resources. + repeated BackupPlanDetail backup_plan_details = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The criteria for matching resources. + Criteria criteria = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The current state of the AutoprotectionPolicy. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The etag for the policy. + // If this is provided on update, it must match the server's etag, otherwise + // the request will be rejected with an ABORTED error. + string etag = 6; + + // Output only. Summary of total count of different containers covered through + // this policy. + BindingSummary binding_summary = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Summary of last policy application when job was run per + // workload type. + PolicyEvaluationSummary policy_evaluation_summary = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the policy was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the policy was last updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupPlanDetail defines configuration of protection. +message BackupPlanDetail { + // Required. The type of resource that this policy will automatically protect. + // For MVP, `compute.googleapis.com/Instance` and + // `compute.googleapis.com/Disk` are supported. + string resource_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the BackupPlan to apply to resources that + // match the policy's criteria. This backup plan must be in the same location + // as AutoProtectionPolicy. Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; +} + +// Criteria specifies a set of criteria for matching resources. +message Criteria { + // Required. A list of matching conditions that a resource must meet to be + // protected by the policy. + repeated MatchingCondition matching_conditions = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// MatchingCondition specifies a set of conditions for matching resources. +message MatchingCondition { + // A condition that a resource must meet to be protected by the + // policy. + oneof condition { + // Optional. A condition that matches resources based on their labels. + // For MVP, this is limited to a single label match. + KeyValuePair label_condition = 1 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// PolicyEvaluationSummary contains the summary of the last run of job that +// applies policy to matching resources. +message PolicyEvaluationSummary { + // Output only. The number of resources that currently match the policy's + // criteria. + int64 matching_resource_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of matching resources that are successfully + // protected. + int64 protected_resource_count = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of matching resources whose protection failed + // during job run. + int64 failed_resource_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BindingSummary contains count of different containers covered through this +// policy. +message BindingSummary { + // Output only. Total count of Projects protected with this policy. + int64 project_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// KeyValuePair defines a key-value pair for matching resource labels. +message KeyValuePair { + // Required. The key of the label to match. + // This must be in the format `{label_key}`. + // The key must match the regex + // Format:`[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The values of the label to match. + // There will be explicit “OR” between values of array. + // Each value must be in the format `{label_value}`. + // The value must match the regex + // Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`. + repeated string values = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for creating an AutoProtectionPolicy. +message CreateAutoProtectionPolicyRequest { + // Required. The parent resource where this policy will be created. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The ID to use for the policy. + // This will become the final component of the policy's resource name. + string auto_protection_policy_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AutoProtectionPolicy resource to create. + AutoProtectionPolicy auto_protection_policy = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for getting an AutoProtectionPolicy. +message GetAutoProtectionPolicyRequest { + // Required. The name of the policy to retrieve. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + } + ]; +} + +// Request message for updating an AutoProtectionPolicy. +message UpdateAutoProtectionPolicyRequest { + // Required. The policy to update. + AutoProtectionPolicy auto_protection_policy = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Field mask is used to specify the fields to be overwritten in the + // AutoProtectionPolicy 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 = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for deleting an AutoProtectionPolicy. +message DeleteAutoProtectionPolicyRequest { + // Required. The name of the policy to delete. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + } + ]; + + // The current etag of the AutoProtectionPolicy. + // If an etag is provided and does not match the current etag of the + // connection, the request will be rejected with an ABORTED error. + string etag = 2; +} + +// Request message for ListAutoProtectionPolicies. +message ListAutoProtectionPoliciesRequest { + // Required. The project and location for which to retrieve the list of + // policies. Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of policies to return in a single page. + // If unspecified, a server-default value will be used. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + // page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters resources listed in the + // response. The following fields are filterable: + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that sorts the results in the response. The + // following fields are sortable: + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListAutoProtectionPolicies. +message ListAutoProtectionPoliciesResponse { + // A list of the AutoProtectionPolicy resources found. + repeated AutoProtectionPolicy auto_protection_policies = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto new file mode 100644 index 000000000000..f5bcc7e76738 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto @@ -0,0 +1,200 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "AutoProtectionPolicyBindingProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// An AutoprotectionPolicyBinding (APPA) acts as the bridge between an +// AutoprotectionPolicy and the scope (Project, Folder, or Organization) where +// the policy should be applied. +message AutoProtectionPolicyBinding { + option (google.api.resource) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + pattern: "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}" + plural: "autoProtectionPolicyBindings" + singular: "autoProtectionPolicyBinding" + }; + + // The state of an AutoProtectionPolicyBinding. + enum State { + // The state of the binding is unspecified. + STATE_UNSPECIFIED = 0; + + // The binding is being created. + CREATING = 1; + + // The binding is active. + ACTIVE = 2; + + // The binding deletion is initiated. + DELETION_INITIATED = 3; + } + + // Identifier. The resource name of the AutoProtectionPolicyBinding. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. A description of the binding. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The current state of the AutoProtectionPolicyBinding. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Resource Id of target container on which policy will + // be applied. Format: projects/{project_id} + string scope = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "*" } + ]; + + // Output only. Summaries of the last policy application when the job has run, + // with one entry per resource type specified in the AutoProtectionPolicy. + BindingEvaluationSummary binding_evaluation_summary = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the binding was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the binding was last updated. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Output only. The etag for the binding. + // If this is provided on update, it must match the server's etag. + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// BindingEvaluationSummary contains the summary of the last run of job +// that applies policy to matching resources for a given binding. +message BindingEvaluationSummary { + // Output only. The number of resources that currently match the policy's + // criteria. + int64 matching_resource_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of matching resources that are successfully + // protected. + int64 protected_resource_count = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of matching resources whose protection failed + // during job run. + int64 failed_resource_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for creating an AutoProtectionPolicyBinding. +message CreateAutoProtectionPolicyBindingRequest { + // Required. The parent resource where this binding will be created. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + } + ]; + + // Required. The ID to use for the binding. + // This will become the final component of the binding's resource name. + string auto_protection_policy_binding_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The AutoProtectionPolicyBinding resource to create. + AutoProtectionPolicyBinding auto_protection_policy_binding = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for getting an AutoProtectionPolicyBinding. +message GetAutoProtectionPolicyBindingRequest { + // Required. The name of the binding to retrieve. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} + +// Request message for ListAutoProtectionPolicyBindings. +message ListAutoProtectionPolicyBindingsRequest { + // Required. The project and location for which to retrieve the list of + // policies. Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicy" + } + ]; + + // Optional. The maximum number of policies to return in a single page. + // If unspecified, a server-default value will be used. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListAutoProtectionPolicies` call. Provide this to retrieve the subsequent + // page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters resources listed in the + // response. The following fields are filterable: + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that sorts the results in the response. The + // following fields are sortable: + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListAutoProtectionPolicyBindings. +message ListAutoProtectionPolicyBindingsResponse { + // A list of the AutoProtectionPolicyBindings resources found. + repeated AutoProtectionPolicyBinding auto_protection_policy_bindings = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Request message for initiating delete of an AutoProtectionPolicyBinding. +message InitiateDeleteAutoProtectionPolicyBindingRequest { + // Required. The name of the binding to delete. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupdr.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupdr.proto new file mode 100644 index 000000000000..79678d780ce0 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupdr.proto @@ -0,0 +1,1003 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/appliedautoprotectionpolicy.proto"; +import "google/cloud/backupdr/v1beta/autoprotectionpolicy.proto"; +import "google/cloud/backupdr/v1beta/autoprotectionpolicybinding.proto"; +import "google/cloud/backupdr/v1beta/backupplan.proto"; +import "google/cloud/backupdr/v1beta/backupplanassociation.proto"; +import "google/cloud/backupdr/v1beta/backupvault.proto"; +import "google/cloud/backupdr/v1beta/backupvault_cloudsql.proto"; +import "google/cloud/backupdr/v1beta/bindingmatchingresource.proto"; +import "google/cloud/backupdr/v1beta/datasourcereference.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupDRProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// The BackupDR Service +service BackupDR { + option (google.api.default_host) = "backupdr.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-backupdr," + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ManagementServers in a given project and location. + rpc ListManagementServers(ListManagementServersRequest) + returns (ListManagementServersResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/managementServers" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single ManagementServer. + rpc GetManagementServer(GetManagementServerRequest) + returns (ManagementServer) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/managementServers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new ManagementServer in a given project and location. + rpc CreateManagementServer(CreateManagementServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/managementServers" + body: "management_server" + }; + option (google.api.method_signature) = + "parent,management_server,management_server_id"; + option (google.longrunning.operation_info) = { + response_type: "ManagementServer" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single ManagementServer. + rpc DeleteManagementServer(DeleteManagementServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/managementServers/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + + // Creates a new BackupVault in a given project and location. + rpc CreateBackupVault(CreateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{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" + }; + } + + // Lists BackupVaults in a given project and location. + rpc ListBackupVaults(ListBackupVaultsRequest) + returns (ListBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupVaults" + }; + option (google.api.method_signature) = "parent"; + } + + // FetchUsableBackupVaults lists usable BackupVaults in a given project and + // location. Usable BackupVault are the ones that user has + // backupdr.backupVaults.get permission. + rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) + returns (FetchUsableBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a BackupVault. + rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a BackupVault. + rpc UpdateBackupVault(UpdateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{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" + }; + } + + // Deletes a BackupVault. + rpc DeleteBackupVault(DeleteBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DataSources in a given project and location. + rpc ListDataSources(ListDataSourcesRequest) + returns (ListDataSourcesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a DataSource. + rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a DataSource. + rpc UpdateDataSource(UpdateDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" + body: "data_source" + }; + option (google.api.method_signature) = "data_source,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataSource" + metadata_type: "OperationMetadata" + }; + } + + // Lists Backups in a given project and location. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetch Backups for a given resource type. + rpc FetchBackupsForResourceType(FetchBackupsForResourceTypeRequest) + returns (FetchBackupsForResourceTypeResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups:fetchForResourceType" + }; + option (google.api.method_signature) = "parent,resource_type"; + } + + // Gets details of a Backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a Backup. + rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Restore from a Backup + rpc RestoreBackup(RestoreBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "RestoreBackupResponse" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlan + rpc CreateBackupPlan(CreateBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/backupPlans" + body: "backup_plan" + }; + option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlan" + metadata_type: "OperationMetadata" + }; + } + + // Update a BackupPlan. + rpc UpdateBackupPlan(UpdateBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{backup_plan.name=projects/*/locations/*/backupPlans/*}" + body: "backup_plan" + }; + option (google.api.method_signature) = "backup_plan,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlan" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlan. + rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlans in a given project and location. + rpc ListBackupPlans(ListBackupPlansRequest) + returns (ListBackupPlansResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupPlans" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlan. + rpc DeleteBackupPlan(DeleteBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlanRevision. + rpc GetBackupPlanRevision(GetBackupPlanRevisionRequest) + returns (BackupPlanRevision) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupPlans/*/revisions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlanRevisions in a given project and location. + rpc ListBackupPlanRevisions(ListBackupPlanRevisionsRequest) + returns (ListBackupPlanRevisionsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/backupPlans/*}/revisions" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a BackupPlanAssociation + rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations" + body: "backup_plan_association" + }; + option (google.api.method_signature) = + "parent,backup_plan_association,backup_plan_association_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Update a BackupPlanAssociation. + rpc UpdateBackupPlanAssociation(UpdateBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{backup_plan_association.name=projects/*/locations/*/backupPlanAssociations/*}" + body: "backup_plan_association" + }; + option (google.api.method_signature) = + "backup_plan_association,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlanAssociation. + rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) + returns (BackupPlanAssociation) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlanAssociations in a given project and location. + rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) + returns (ListBackupPlanAssociationsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations" + }; + option (google.api.method_signature) = "parent"; + } + + // List BackupPlanAssociations for a given resource type. + rpc FetchBackupPlanAssociationsForResourceType( + FetchBackupPlanAssociationsForResourceTypeRequest) + returns (FetchBackupPlanAssociationsForResourceTypeResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/backupPlanAssociations:fetchForResourceType" + }; + option (google.api.method_signature) = "parent,resource_type"; + } + + // Deletes a single BackupPlanAssociation. + rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Triggers a new Backup. + rpc TriggerBackup(TriggerBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" + body: "*" + }; + option (google.api.method_signature) = "name,rule_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single DataSourceReference. + rpc GetDataSourceReference(GetDataSourceReferenceRequest) + returns (DataSourceReference) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/dataSourceReferences/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists DataSourceReferences for a given project and location. + rpc ListDataSourceReferences(ListDataSourceReferencesRequest) + returns (ListDataSourceReferencesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences" + }; + option (google.api.method_signature) = "parent"; + } + + // Fetch DataSourceReferences for a given project, location and resource type. + rpc FetchDataSourceReferencesForResourceType( + FetchDataSourceReferencesForResourceTypeRequest) + returns (FetchDataSourceReferencesForResourceTypeResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/dataSourceReferences:fetchForResourceType" + }; + option (google.api.method_signature) = "parent,resource_type"; + } + + // Initializes the service related config for a project. + rpc InitializeService(InitializeServiceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/serviceConfig}:initialize" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "InitializeServiceResponse" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new AutoProtectionPolicy in a given project and location. + rpc CreateAutoProtectionPolicy(CreateAutoProtectionPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies" + body: "auto_protection_policy" + }; + option (google.api.method_signature) = + "parent,auto_protection_policy,auto_protection_policy_id"; + option (google.longrunning.operation_info) = { + response_type: "AutoProtectionPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Lists AutoProtectionPolicies for a given project and location. + rpc ListAutoProtectionPolicies(ListAutoProtectionPoliciesRequest) + returns (ListAutoProtectionPoliciesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/autoProtectionPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single AutoProtectionPolicy. + rpc GetAutoProtectionPolicy(GetAutoProtectionPolicyRequest) + returns (AutoProtectionPolicy) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the parameters of a single AutoProtectionPolicy. + rpc UpdateAutoProtectionPolicy(UpdateAutoProtectionPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{auto_protection_policy.name=projects/*/locations/*/autoProtectionPolicies/*}" + body: "auto_protection_policy" + }; + option (google.api.method_signature) = "auto_protection_policy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AutoProtectionPolicy" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single AutoProtectionPolicy. + rpc DeleteAutoProtectionPolicy(DeleteAutoProtectionPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new AutoProtectionPolicyBinding in a given project and + // location. + rpc CreateAutoProtectionPolicyBinding( + CreateAutoProtectionPolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings" + body: "auto_protection_policy_binding" + }; + option (google.api.method_signature) = + "parent,auto_protection_policy_binding,auto_protection_policy_binding_id"; + option (google.longrunning.operation_info) = { + response_type: "AutoProtectionPolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Returns the auto protection policy binding read from the CCFE tables. + rpc GetAutoProtectionPolicyBinding(GetAutoProtectionPolicyBindingRequest) + returns (AutoProtectionPolicyBinding) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns the auto protection policy bindings read from the CCFE tables. + rpc ListAutoProtectionPolicyBindings(ListAutoProtectionPolicyBindingsRequest) + returns (ListAutoProtectionPolicyBindingsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*}/bindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists AppliedAutoProtectionPolicies in a given project and location. + rpc ListAppliedAutoProtectionPolicies( + ListAppliedAutoProtectionPoliciesRequest) + returns (ListAppliedAutoProtectionPoliciesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/appliedAutoProtectionPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // InitiateDeleteAutoProtectionPolicyBinding initiates delete for + // AutoProtectionPolicy Binding + rpc InitiateDeleteAutoProtectionPolicyBinding( + InitiateDeleteAutoProtectionPolicyBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}:initiateDelete" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "AutoProtectionPolicyBinding" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Binding Matching Resource. + rpc GetBindingMatchingResource(GetBindingMatchingResourceRequest) + returns (BindingMatchingResource) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/autoProtectionPolicies/*/bindings/*/matchingResources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Binding Matching Resources for a given AutoProtectionPolicyBinding. + rpc ListBindingMatchingResources(ListBindingMatchingResourcesRequest) + returns (ListBindingMatchingResourcesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/autoProtectionPolicies/*/bindings/*}/matchingResources" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Network configuration for ManagementServer instance. +message NetworkConfig { + // VPC peering modes supported by Google Cloud Backup and DR. + enum PeeringMode { + // Peering mode not set. + PEERING_MODE_UNSPECIFIED = 0; + + // Connect using Private Service Access to the Management Server. Private + // services access provides an IP address range for multiple Google Cloud + // services, including Google Cloud Backup and DR. + PRIVATE_SERVICE_ACCESS = 1; + } + + // Optional. The resource name of the Google Compute Engine VPC network to + // which the ManagementServer instance is connected. + string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The network connect mode of the ManagementServer instance. For + // this version, only PRIVATE_SERVICE_ACCESS is supported. + PeeringMode peering_mode = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// ManagementURI for the Management Server resource. +message ManagementURI { + // Output only. The ManagementServer AGM/RD WebUI URL. + string web_ui = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ManagementServer AGM/RD API URL. + string api = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. +message WorkforceIdentityBasedManagementURI { + // Output only. First party Management URI for Google Identities. + string first_party_management_uri = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party Management URI for External Identity Providers. + string third_party_management_uri = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, +message WorkforceIdentityBasedOAuth2ClientID { + // Output only. First party OAuth Client ID for Google Identities. + string first_party_oauth2_client_id = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party OAuth Client ID for External Identity Providers. + string third_party_oauth2_client_id = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ManagementServer describes a single BackupDR ManagementServer instance. +message ManagementServer { + option (google.api.resource) = { + type: "backupdr.googleapis.com/ManagementServer" + pattern: "projects/{project}/locations/{location}/managementServers/{managementserver}" + plural: "managementServers" + singular: "managementServer" + }; + + // Type of backup service resource. + enum InstanceType { + // Instance type is not mentioned. + INSTANCE_TYPE_UNSPECIFIED = 0; + + // Instance for backup and restore management (i.e., AGM). + BACKUP_RESTORE = 1; + } + + // State of Management server instance. + enum InstanceState { + // State not set. + INSTANCE_STATE_UNSPECIFIED = 0; + + // The instance is being created. + CREATING = 1; + + // The instance has been created and is fully usable. + READY = 2; + + // The instance configuration is being updated. Certain kinds of updates + // may cause the instance to become unusable while the update is in + // progress. + UPDATING = 3; + + // The instance is being deleted. + DELETING = 4; + + // The instance is being repaired and may be unstable. + REPAIRING = 5; + + // Maintenance is being performed on this instance. + MAINTENANCE = 6; + + // The instance is experiencing an issue and might be unusable. You can get + // further details from the statusMessage field of Instance resource. + ERROR = 7; + } + + // Output only. Identifier. The resource name. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the ManagementServer instance (2048 characters + // or less). + string description = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource labels to represent user provided metadata. + // Labels currently defined: + // 1. migrate_from_go= + // If set to true, the MS is created in migration ready mode. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The type of the ManagementServer resource. + InstanceType type = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The hostname or ip address of the exposed AGM endpoints, used + // by clients to connect to AGM/RD graphical user interface and APIs. + ManagementURI management_uri = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The hostnames of the exposed AGM endpoints for both types of + // user i.e. 1p and 3p, used to connect AGM/RM UI. + WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = + 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ManagementServer state. + InstanceState state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. VPC networks to which the ManagementServer instance is connected. + // For this version, only a single network is supported. This field is + // optional if MS is created without PSA + repeated NetworkConfig networks = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Server specified ETag for the ManagementServer resource to + // prevent simultaneous updates from overwiting each other. + string etag = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The OAuth 2.0 client id is required to make API calls to the + // Backup and DR instance API of this ManagementServer. This is the value that + // should be provided in the 'aud' field of the OIDC ID Token (see openid + // specification + // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). + string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. + WorkforceIdentityBasedOAuth2ClientID + workforce_identity_based_oauth2_client_id = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The hostname or ip address of the exposed AGM endpoints, used + // by BAs to connect to BA proxy. + repeated string ba_proxy_uri = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + google.protobuf.BoolValue satisfies_pzs = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for listing management servers. +message ListManagementServersRequest { + // Required. The project and location for which to retrieve management servers + // information, in the format 'projects/{project_id}/locations/{location}'. + // In Google Cloud Backup and DR, locations map to Google Cloud regions, for + // example + // **us-central1**. To retrieve management servers for all locations, use "-" + // for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + optional string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + optional string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing management servers. +message ListManagementServersResponse { + // The list of ManagementServer instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return management servers in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated ManagementServer management_servers = 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; +} + +// Request message for getting a management server instance. +message GetManagementServerRequest { + // Required. Name of the management server resource name, in the format + // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/ManagementServer" + } + ]; +} + +// Request message for creating a management server instance. +message CreateManagementServerRequest { + // Required. The management server project and location in the format + // 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR + // locations map to Google Cloud regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Required. The name of the management server to create. The name must be + // unique for the specified project and location. + string management_server_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [management server + // resource][google.cloud.backupdr.v1.ManagementServer] + ManagementServer management_server = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for deleting a management server instance. +message DeleteManagementServerRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for initializing the service. +message InitializeServiceRequest { + // The configuration for initializing the resource. + oneof initialization_config { + // Optional. The configuration for initializing a Cloud SQL instance. + CloudSqlInstanceInitializationConfig + cloud_sql_instance_initialization_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The resource name of the serviceConfig used to initialize the + // service. The location must be the location of the BackupVault. + // Format: `projects/{project_id}/locations/{location}/serviceConfig`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource type to which the default service config will be + // applied. Examples include, "compute.googleapis.com/Instance" and + // "storage.googleapis.com/Bucket". + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The location where the BackupPlan will be created. This field is + // required for multi-region BackupVaults and is optional for regional + // BackupVaults. It is useful when creating a Backup Vault in a multi-region, + // allowing the BackupPlan to reside in a specific region within that + // multi-region. If this field is not provided, the BackupPlan will be created + // in the same location as specified in the `name` field. + string backup_plan_location = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validates the request and returns the result, but does + // not actually run it. + bool validate_only = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for initializing the service. +message InitializeServiceResponse { + // The resource name of the default `BackupVault` created. + // Format: + // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + string backup_vault_name = 1; + + // The resource name of the default `BackupPlan` created. + // Format: + // `projects/{project_id}/locations/{location}/backupPlans/{backup_plan_id}`. + string backup_plan_name = 2; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to 'Code.CANCELLED'. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AdditionalInfo contains additional Info related to backup plan + // association resource. + map additional_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupplan.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupplan.proto new file mode 100644 index 000000000000..e7184735077c --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupplan.proto @@ -0,0 +1,669 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/dayofweek.proto"; +import "google/type/month.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPlanProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// A `BackupPlan` specifies some common fields, such as `description` as well +// as one or more `BackupRule` messages. Each `BackupRule` has a retention +// policy and defines a schedule by which the system is to perform backup +// workloads. +message BackupPlan { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlan" + pattern: "projects/{project}/locations/{location}/backupPlans/{backup_plan}" + plural: "backupPlans" + singular: "backupPlan" + }; + + // `State` enumerates the possible states for a `BackupPlan`. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + + // The resource is being updated. + UPDATING = 5; + } + + // Defines optional workload-specific properties for backups generated by this + // plan. + oneof resource_properties { + // Optional. Defines optional properties specific to backups of disk-based + // resources, such as Compute Engine Persistent Disks. This includes + // settings like whether to perform a guest flush. + DiskBackupPlanProperties disk_backup_plan_properties = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines optional properties specific to backups of compute + // instance based resources, such as Compute Engine Instances. This includes + // settings like whether to perform a guest flush. + ComputeInstanceBackupPlanProperties + compute_instance_backup_plan_properties = 20 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Output only. Identifier. The resource name of the `BackupPlan`. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the `BackupPlan` resource. + // + // The description allows for additional details about `BackupPlan` and its + // use cases to be provided. An example description is the following: "This + // is a backup plan that performs a daily backup at 6pm and retains data for 3 + // months". The description must be at most 2048 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This collection of key/value pairs allows for custom labels to be + // supplied by the user. Example, {"tag": "Weekly"}. + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. When the `BackupPlan` was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the `BackupPlan` was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The backup rules for this `BackupPlan`. + repeated BackupRule backup_rules = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional field to configure the maximum number of days for which + // a backup can be retained. This field is only applicable for on-demand + // backups taken with custom retention value. + int32 max_custom_on_demand_retention_days = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The `State` for the `BackupPlan`. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The resource type to which the `BackupPlan` will be applied. + // Examples include, "compute.googleapis.com/Instance", + // "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", + // "compute.googleapis.com/Disk". + string resource_type = 8 [(google.api.field_behavior) = REQUIRED]; + + // Optional. `etag` is returned from the service in the response. As a user of + // the service, you may provide an etag value in this field to prevent stale + // resources. + string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Resource name of backup vault which will be used as storage + // location for backups. Format: + // projects/{project}/locations/{location}/backupVaults/{backupvault} + string backup_vault = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Output only. The Google Cloud service account to be used by the BackupVault + // for taking backups. Specify the email address of the Backup Vault Service + // Account. + string backup_vault_service_account = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Applicable only for Cloud SQL resource_type. + // + // Configures how long logs will be stored. It is defined in “days”. This + // value should be greater than or equal to minimum enforced log retention + // duration of the backup vault. + int64 log_retention_days = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. All resource types to which backupPlan can be applied. + repeated string supported_resource_types = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The user friendly revision ID of the `BackupPlanRevision`. + // + // Example: v0, v1, v2, etc. + string revision_id = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource id of the `BackupPlanRevision`. + // + // Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + string revision_name = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `BackupRule` binds the backup schedule to a retention policy. +message BackupRule { + // The schedule that defines the automated backup workloads for this + // `BackupRule`. + oneof backup_schedule_oneof { + // Optional. Defines a schedule that runs within the confines of a defined + // window of time. + StandardSchedule standard_schedule = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is + // unique per `BackupPlan`.The `rule_id` must start with a lowercase letter + // followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, + // /[a-z][a-z0-9-]{,62}/. + string rule_id = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Configures the duration for which backup data will be kept. It is + // defined in “days”. The value should be greater than or equal to minimum + // enforced retention of the backup vault. + // + // Minimum value is 1 and maximum value is 36159 for custom retention + // on-demand backup. + // Minimum and maximum values are workload specific for all other rules. + // Note: Longer retention can lead to higher storage costs post introductory + // trial. We recommend starting with a short duration of 3 days or less. + int32 backup_retention_days = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// `StandardSchedule` defines a schedule that run within the confines of a +// defined window of days. We can define recurrence type for schedule as +// HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. +message StandardSchedule { + // `RecurrenceTypes` enumerates the applicable periodicity for the schedule. + enum RecurrenceType { + // recurrence type not set + RECURRENCE_TYPE_UNSPECIFIED = 0; + + // The `BackupRule` is to be applied hourly. + HOURLY = 1; + + // The `BackupRule` is to be applied daily. + DAILY = 2; + + // The `BackupRule` is to be applied weekly. + WEEKLY = 3; + + // The `BackupRule` is to be applied monthly. + MONTHLY = 4; + + // The `BackupRule` is to be applied yearly. + YEARLY = 5; + } + + // Required. Specifies the `RecurrenceType` for the schedule. + RecurrenceType recurrence_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies frequency for hourly backups. A hourly frequency of 2 + // means jobs will run every 2 hours from start time till end time defined. + // + // This is required for `recurrence_type`, `HOURLY` and is not applicable + // otherwise. A validation error will occur if a value is supplied and + // `recurrence_type` is not `HOURLY`. + // + // The supported values for each resource type are as follows: + // + // * `compute.googleapis.com/Instance`: 1-23 + // * `compute.googleapis.com/Disk`: 1-23 + // * `sqladmin.googleapis.com/Instance`: 6-23 + // * `alloydb.googleapis.com/Cluster`: 1-23 + // * `file.googleapis.com/Instance`: 1-23 + // + // Refer to link + // https://cloud.google.com/backup-disaster-recovery/docs/concepts/cloud_best_practices + // for more details. + int32 hourly_frequency = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs + // will run. + // + // This is required for `recurrence_type`, `WEEKLY` and is not applicable + // otherwise. A validation error will occur if a value is supplied and + // `recurrence_type` is not `WEEKLY`. + repeated google.type.DayOfWeek days_of_week = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. + // + // Values for `days_of_month` are only applicable for `recurrence_type`, + // `MONTHLY` and `YEARLY`. A validation error will occur if other values are + // supplied. + repeated int32 days_of_month = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST + // MONDAY, on which jobs will run. This will be specified by two fields in + // `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, + // e.g. `LAST`. + // + // This field is only applicable for `recurrence_type`, `MONTHLY` and + // `YEARLY`. A validation error will occur if other values are supplied. + WeekDayOfMonth week_day_of_month = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on + // which jobs will run. + // + // This field is only applicable when `recurrence_type` is `YEARLY`. A + // validation error will occur if other values are supplied. + repeated google.type.Month months = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. A BackupWindow defines the window of day during which backup jobs + // will run. Jobs are queued at the beginning of the window and will be marked + // as `NOT_RUN` if they do not start by the end of the window. + // + // Note: running jobs will not be cancelled at the end of the window. + BackupWindow backup_window = 7 [(google.api.field_behavior) = REQUIRED]; + + // Required. The time zone to be used when interpreting the schedule. + // The value of this field must be a time zone name from the IANA tz database. + // See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the + // list of valid timezone names. For e.g., Europe/Paris. + string time_zone = 8 [(google.api.field_behavior) = REQUIRED]; +} + +// `BackupWindow` defines a window of the day during which backup jobs will run. +message BackupWindow { + // Required. The hour of day (0-23) when the window starts for e.g. if value + // of start hour of day is 6 that mean backup window start at 6:00. + int32 start_hour_of_day = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The hour of day (1-24) when the window end for e.g. if value of + // end hour of day is 10 that mean backup window end time is 10:00. + // + // End hour of day should be greater than start hour of day. + // 0 <= start_hour_of_day < end_hour_of_day <= 24 + // + // End hour of day is not include in backup window that mean if + // end_hour_of_day= 10 jobs should start before 10:00. + int32 end_hour_of_day = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `WeekDayOfMonth` defines the week day of the month on which the backups will +// run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values +// like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. +message WeekDayOfMonth { + // `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, + // third, or last week of the month. + enum WeekOfMonth { + // The zero value. Do not use. + WEEK_OF_MONTH_UNSPECIFIED = 0; + + // The first week of the month. + FIRST = 1; + + // The second week of the month. + SECOND = 2; + + // The third week of the month. + THIRD = 3; + + // The fourth week of the month. + FOURTH = 4; + + // The last week of the month. + LAST = 5; + } + + // Required. Specifies the week of the month. + WeekOfMonth week_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specifies the day of the week. + google.type.DayOfWeek day_of_week = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for creating a `BackupPlan`. +message CreateBackupPlanRequest { + // Required. The `BackupPlan` project and location in the format + // `projects/{project}/locations/{location}`. In Google Cloud Backup and DR + // locations map to Google Cloud regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Required. The name of the `BackupPlan` to create. The name must be unique + // for the specified project and location.The name must start with a lowercase + // letter followed by up to 62 lowercase letters, numbers, or hyphens. + // Pattern, /[a-z][a-z0-9-]{,62}/. + string backup_plan_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `BackupPlan` resource object to create. + BackupPlan backup_plan = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The request message for getting a list `BackupPlan`. +message ListBackupPlansRequest { + // Required. The project and location for which to retrieve `BackupPlans` + // information. Format: `projects/{project}/locations/{location}`. In Google + // Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + // **us-central1**. To retrieve backup plans for all locations, use "-" for + // the + // `{location}` value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Optional. The maximum number of `BackupPlans` to return in a single + // response. If not specified, a default value will be chosen by the service. + // Note that the response may include a partial list and a caller should + // only rely on the response's + // [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of + // [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token] + // received from a previous `ListBackupPlans` call. + // Provide this to retrieve the subsequent page in a multi-page list of + // results. When paginating, all other parameters provided to + // `ListBackupPlans` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field match expression used to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field by which to sort the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for getting a list of `BackupPlan`. +message ListBackupPlansResponse { + // The list of `BackupPlans` in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of resources from all locations. In case any location is unreachable, + // the response will only return backup plans in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + // BackupPlan + repeated BackupPlan backup_plans = 1; + + // A token which may be sent as + // [page_token][google.cloud.backupdr.v1beta.ListBackupPlansRequest.page_token] + // in a subsequent `ListBackupPlans` call to retrieve the next page of + // results. If this field is omitted or empty, then there are no more results + // to return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request message for getting a `BackupPlan`. +message GetBackupPlanRequest { + // Required. The resource name of the `BackupPlan` to retrieve. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; +} + +// The request message for deleting a `BackupPlan`. +message DeleteBackupPlanRequest { + // Required. The resource name of the `BackupPlan` to delete. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for updating a backup plan. +message UpdateBackupPlanRequest { + // Required. The resource being updated + BackupPlan backup_plan = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + // Field mask is used to specify the fields to be overwritten in the + // BackupPlan 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 the request will fail. + // Currently, these fields are supported in update: description, schedules, + // retention period, adding and removing Backup Rules. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// `BackupPlanRevision` represents a snapshot of a `BackupPlan` at a point in +// time. +message BackupPlanRevision { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlanRevision" + pattern: "projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}" + plural: "backupPlanRevisions" + singular: "backupPlanRevision" + }; + + // The state of the `BackupPlanRevision`. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + } + + // Output only. Identifier. The resource name of the `BackupPlanRevision`. + // + // Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The user friendly revision ID of the `BackupPlanRevision`. + // + // Example: v0, v1, v2, etc. + string revision_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource State + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The Backup Plan being encompassed by this revision. + BackupPlan backup_plan_snapshot = 4; + + // Output only. The timestamp that the revision was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for getting a `BackupPlanRevision`. +message GetBackupPlanRevisionRequest { + // Required. The resource name of the `BackupPlanRevision` to retrieve. + // + // Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanRevision" + } + ]; +} + +// The request message for getting a list of `BackupPlanRevision`. +message ListBackupPlanRevisionsRequest { + // Required. The project and location for which to retrieve + // `BackupPlanRevisions` information. Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In + // Google Cloud Backup and DR, locations map to Google Cloud regions, for e.g. + // **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanRevision" + } + ]; + + // Optional. The maximum number of `BackupPlans` to return in a single + // response. If not specified, a default value will be chosen by the service. + // Note that the response may include a partial list and a caller should + // only rely on the response's + // [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of + // [next_page_token][google.cloud.backupdr.v1beta.ListBackupPlansResponse.next_page_token] + // received from a previous `ListBackupPlans` call. + // Provide this to retrieve the subsequent page in a multi-page list of + // results. When paginating, all other parameters provided to + // `ListBackupPlans` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for getting a list of `BackupPlanRevision`. +message ListBackupPlanRevisionsResponse { + // The list of `BackupPlanRevisions` in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of resources from all locations. In case any location is unreachable, + // the response will only return backup plans in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupPlanRevision backup_plan_revisions = 1; + + // A token which may be sent as + // [page_token][google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest.page_token] + // in a subsequent `ListBackupPlanRevisions` call to retrieve the next page of + // results. If this field is omitted or empty, then there are no more results + // to return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Properties for a disk backup plan. +message DiskBackupPlanProperties { + // Optional. Indicates whether to perform a guest flush operation before + // taking a disk backup. When set to false, the system will create + // crash-consistent backups. Default value is false. + bool guest_flush = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Properties for a compute instance backup plan. +message ComputeInstanceBackupPlanProperties { + // Optional. Indicates whether to perform a guest flush operation before + // taking a compute backup. When set to false, the system will create + // crash-consistent backups. Default value is false. + bool guest_flush = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupplanassociation.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupplanassociation.proto new file mode 100644 index 000000000000..0cd0b70d1471 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupplanassociation.proto @@ -0,0 +1,478 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/backupvault_alloydb.proto"; +import "google/cloud/backupdr/v1beta/backupvault_cloudsql.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPlanAssociationProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// A BackupPlanAssociation represents a single BackupPlanAssociation which +// contains details like workload, backup plan etc +message BackupPlanAssociation { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + pattern: "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}" + plural: "backupPlanAssociations" + singular: "backupPlanAssociation" + }; + + // Enum for State of BackupPlan Association + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + + // The resource is being updated. + UPDATING = 5; + + // The resource has been created but backups are paused. + PAUSED = 6; + } + + // Properties of the protected Google Cloud resource. + oneof resource_properties { + // Output only. Cloud SQL instance's backup plan association properties. + CloudSqlInstanceBackupPlanAssociationProperties + cloud_sql_instance_backup_plan_association_properties = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AlloyDB cluster's backup plan association properties. + AlloyDBClusterBackupPlanAssociationProperties + alloydb_cluster_backup_plan_association_properties = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Identifier. The resource name of BackupPlanAssociation in + // below format Format : + // projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Required. Immutable. Resource type of workload on which backupplan is + // applied + string resource_type = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Immutable. Resource name of workload on which the backup plan is + // applied. + // + // The format can either be the resource name (e.g., + // "projects/my-project/zones/us-central1-a/instances/my-instance") or the + // full resource URI (e.g., + // "https://www.googleapis.com/compute/v1/projects/my-project/zones/us-central1-a/instances/my-instance"). + string resource = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Resource name of backup plan which needs to be applied on + // workload. Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Output only. The time when the instance was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The BackupPlanAssociation resource state. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The config info related to backup rules. + repeated RuleConfigInfo rules_config_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource name of data source which will be used as storage + // location for backups taken. Format : + // projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource} + string data_source = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The user friendly revision ID of the `BackupPlanRevision`. + // + // Example: v0, v1, v2, etc. + string backup_plan_revision_id = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource id of the `BackupPlanRevision`. + // + // Format: + // `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` + string backup_plan_revision_name = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the `AutoProtectionPolicyBinding` that + // manages this association, if any. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`. + string auto_protection_policy_binding = 16 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} + +// Message for rules config info. +message RuleConfigInfo { + // Enum for LastBackupState + enum LastBackupState { + // State not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0; + + // The first backup is pending. + FIRST_BACKUP_PENDING = 1; + + // The most recent backup could not be run/failed because of the lack of + // permissions. + PERMISSION_DENIED = 2; + + // The last backup operation succeeded. + SUCCEEDED = 3; + + // The last backup operation failed. + FAILED = 4; + } + + // Output only. Backup Rule id fetched from backup plan. + string rule_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last backup state for rule. + LastBackupState last_backup_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. google.rpc.Status object to store the last backup error. + google.rpc.Status last_backup_error = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The point in time when the last successful backup was captured + // from the source. + google.protobuf.Timestamp last_successful_backup_consistency_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for creating a backup plan. +message CreateBackupPlanAssociationRequest { + // Required. The backup plan association project and location in the format + // `projects/{project_id}/locations/{location}`. In Backup and DR locations + // map to Google Cloud regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Required. The name of the backup plan association to create. The name must + // be unique for the specified project and location. + string backup_plan_association_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + BackupPlanAssociation backup_plan_association = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for List BackupPlanAssociation +message ListBackupPlanAssociationsRequest { + // Required. The project and location for which to retrieve backup Plan + // Associations information, in the format + // `projects/{project_id}/locations/{location}`. In Backup and DR, locations + // map to Google Cloud regions, for example **us-central1**. To retrieve + // backup plan associations for all locations, use "-" for the + // `{location}` value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for List BackupPlanAssociation +message ListBackupPlanAssociationsResponse { + // The list of Backup Plan Associations in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup plan associations in reachable + // locations and the 'unreachable' field will be populated with a list of + // unreachable locations. + repeated BackupPlanAssociation backup_plan_associations = 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; +} + +// Request for the FetchBackupPlanAssociationsForResourceType method. +message FetchBackupPlanAssociationsForResourceTypeRequest { + // Required. The parent resource name. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Required. The type of the Google Cloud resource. + // Ex: sql.googleapis.com/Instance + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of BackupPlanAssociations to return. The + // service may return fewer than this value. If unspecified, at most 50 + // BackupPlanAssociations will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous call of + // `FetchBackupPlanAssociationsForResourceType`. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `FetchBackupPlanAssociationsForResourceType` must match + // the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results fetched in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. Supported + // fields: + // * resource + // * backup_plan + // * state + // * data_source + // * cloud_sql_instance_backup_plan_association_properties.instance_create_time + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // * name + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the FetchBackupPlanAssociationsForResourceType method. +message FetchBackupPlanAssociationsForResourceTypeResponse { + // Output only. The BackupPlanAssociations from the specified parent. + repeated BackupPlanAssociation backup_plan_associations = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for getting a BackupPlanAssociation resource. +message GetBackupPlanAssociationRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; +} + +// Request message for deleting a backup plan association. +message DeleteBackupPlanAssociationRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. This field is exclusively used by Backup and DR's auto-protection + // feature. The resource name of the `AutoProtectionPolicyBinding` that + // triggered the deletion of this association. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`. + string auto_protection_policy_binding = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} + +// Request message for updating a backup plan association. +message UpdateBackupPlanAssociationRequest { + // Required. The resource being updated + BackupPlanAssociation backup_plan_association = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + // Field mask is used to specify the fields to be overwritten in the + // BackupPlanAssociation 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 the request will fail. + // Currently backup_plan_association.backup_plan is the only supported field. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for triggering a backup. +message TriggerBackupRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. backup rule_id for which a backup needs to be triggered. + // If not specified, on-demand backup with custom retention will be triggered. + string rule_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The duration for which backup data will be kept, while taking an + // on-demand backup with custom retention. It is defined in "days". + // It is mutually exclusive with rule_id. This field is required if + // rule_id is not provided. + int32 custom_retention_days = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to be applied on the backup. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault.proto new file mode 100644 index 000000000000..e0c23fdc1234 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault.proto @@ -0,0 +1,1431 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/backupvault_alloydb.proto"; +import "google/cloud/backupdr/v1beta/backupvault_ba.proto"; +import "google/cloud/backupdr/v1beta/backupvault_cloudsql.proto"; +import "google/cloud/backupdr/v1beta/backupvault_disk.proto"; +import "google/cloud/backupdr/v1beta/backupvault_gce.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupVaultProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; + +// Backup configuration state. Is the resource configured for backup? +enum BackupConfigState { + // The possible states of backup configuration. + // Status not set. + BACKUP_CONFIG_STATE_UNSPECIFIED = 0; + + // The data source is actively protected (i.e. there is a + // BackupPlanAssociation or Appliance SLA pointing to it) + ACTIVE = 1; + + // The data source is no longer protected (but may have backups under it) + PASSIVE = 2; +} + +// BackupView contains enum options for Partial and Full view. +enum BackupView { + // If the value is not set, the default 'FULL' view is used. + BACKUP_VIEW_UNSPECIFIED = 0; + + // Includes basic data about the Backup, but not the full contents. + BACKUP_VIEW_BASIC = 1; + + // Includes all data about the Backup. + // This is the default value (for both ListBackups and GetBackup). + BACKUP_VIEW_FULL = 2; +} + +// BackupVaultView contains enum options for Partial and Full view. +enum BackupVaultView { + // If the value is not set, the default 'FULL' view is used. + BACKUP_VAULT_VIEW_UNSPECIFIED = 0; + + // Includes basic data about the Backup Vault, but not the full contents. + BACKUP_VAULT_VIEW_BASIC = 1; + + // Includes all data about the Backup Vault. + // This is the default value (for both ListBackupVaults and GetBackupVault). + BACKUP_VAULT_VIEW_FULL = 2; +} + +// Message describing a BackupVault object. +message BackupVault { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupVault" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}" + plural: "backupVaults" + singular: "backupVault" + }; + + // Message describing the EncryptionConfig of backup vault. + // This determines how data within the vault is encrypted at rest. + message EncryptionConfig { + // Optional. The Cloud KMS key name to encrypt backups in this backup vault. + // Must be in the same region as the vault. Some workload backups like + // compute disk backups may use their inherited source key instead. Format: + // projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key} + optional string kms_key_name = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; + } + + // How a backup's enforced retention end time is inherited. + enum BackupRetentionInheritance { + // Inheritance behavior not set. This will default to + // `INHERIT_VAULT_RETENTION`. + BACKUP_RETENTION_INHERITANCE_UNSPECIFIED = 0; + + // The enforced retention end time of a backup will be inherited from the + // backup vault's `backup_minimum_enforced_retention_duration` field. + // + // This is the default behavior. + INHERIT_VAULT_RETENTION = 1; + + // The enforced retention end time of a backup will always match the expire + // time of the backup. + // + // If this is set, the backup's enforced retention end time will be set to + // match the expire time during creation of the backup. When updating, the + // ERET and expire time must be updated together and have the same value. + // Invalid update requests will be rejected by the server. + MATCH_BACKUP_EXPIRE_TIME = 2; + } + + // Holds the state of the backup vault resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The backup vault is being created. + CREATING = 1; + + // The backup vault has been created and is fully usable. + ACTIVE = 2; + + // The backup vault is being deleted. + DELETING = 3; + + // The backup vault is experiencing an issue and might be unusable. + ERROR = 4; + + // The backup vault is being updated. + UPDATING = 5; + } + + // Holds the access restriction for the backup vault. + enum AccessRestriction { + // Access restriction not set. If user does not provide any value or pass + // this value, it will be changed to WITHIN_ORGANIZATION. + ACCESS_RESTRICTION_UNSPECIFIED = 0; + + // Access to or from resources outside your current project will be denied. + WITHIN_PROJECT = 1; + + // Access to or from resources outside your current organization will be + // denied. + WITHIN_ORGANIZATION = 2; + + // No access restriction. + UNRESTRICTED = 3; + + // Access to or from resources outside your current organization will be + // denied except for backup appliance. + WITHIN_ORG_BUT_UNRESTRICTED_FOR_BA = 4; + } + + // Output only. Identifier. Name of the backup vault to create. It must have + // the + // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. + // `{backupvault}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the project and location. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the BackupVault instance (2048 characters or + // less). + optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined: + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The default and minimum enforced retention for each backup within + // the backup vault. The enforced retention for each backup can be extended. + // Note: Longer minimum enforced retention period impacts potential storage + // costs post introductory trial. We recommend starting with a short duration + // of 3 days or less. + optional google.protobuf.Duration backup_minimum_enforced_retention_duration = + 20 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Setting for how a backup's enforced retention end time is + // inherited. + optional BackupRetentionInheritance backup_retention_inheritance = 27 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Set to true when there are no backups nested under this + // resource. + optional bool deletable = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Server specified ETag for the backup vault resource to + // prevent simultaneous updates from overwiting each other. + optional string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The BackupVault resource instance state. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Time after which the BackupVault resource is locked. + optional google.protobuf.Timestamp effective_time = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of backups in this backup vault. + int64 backup_count = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service account used by the BackupVault Service for this + // BackupVault. The user should grant this account permissions in their + // workload project to enable the service to run backups and restores there. + string service_account = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total size of the storage used by all backup resources. + int64 total_stored_bytes = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Immutable after resource creation until resource deletion. + string uid = 21 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. User annotations. See https://google.aip.dev/128#annotations + // Stores small amounts of arbitrary data. + map annotations = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Restricts access to certain sources and destinations for data + // being sent into, or restored from, the backup vault. Defaults to + // WITHIN_ORGANIZATION if not provided during creation. + AccessRestriction access_restriction = 24 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The encryption config of the backup vault. + optional EncryptionConfig encryption_config = 29 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message describing a DataSource object. +// Datasource object used to represent Datasource details for both admin and +// basic view. +message DataSource { + option (google.api.resource) = { + type: "backupdr.googleapis.com/DataSource" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}" + plural: "dataSources" + singular: "dataSource" + }; + + // Holds the state of the data source resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The data source is being created. + CREATING = 1; + + // The data source has been created and is fully usable. + ACTIVE = 2; + + // The data source is being deleted. + DELETING = 3; + + // The data source is experiencing an issue and might be unusable. + ERROR = 4; + } + + // The source resource that is represented by this DataSource. It can be a + // Google Cloud resource, or one backed up by a Backup Appliance. + oneof source_resource { + // The backed up resource is a Google Cloud resource. + // The word 'DataSource' was included in the names to indicate that this is + // the representation of the Google Cloud resource used within the + // DataSource object. + DataSourceGcpResource data_source_gcp_resource = 26; + + // The backed up resource is a backup appliance application. + DataSourceBackupApplianceApplication + data_source_backup_appliance_application = 27; + } + + // Output only. Identifier. Name of the datasource to create. + // It must have the + // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. + // `{datasource}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the backup vault. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The DataSource resource instance state. + State state = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined: + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Number of backups in the data source. + optional int64 backup_count = 7; + + // Server specified ETag for the ManagementServer resource to prevent + // simultaneous updates from overwiting each other. + optional string etag = 14; + + // The number of bytes (metadata and data) stored in this datasource. + optional int64 total_stored_bytes = 23; + + // Output only. The backup configuration state. + BackupConfigState config_state = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Details of how the resource is configured for backup. + BackupConfigInfo backup_config_info = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This field is set to true if the backup is blocked by vault + // access restriction. + bool backup_blocked_by_vault_access_restriction = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupConfigInfo has information about how the resource is configured +// for Backup and about the most recent backup to this vault. +message BackupConfigInfo { + // LastBackupstate tracks whether the last backup was not yet started, + // successful, failed, or could not be run because of the lack of permissions. + enum LastBackupState { + // Status not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0; + + // The first backup has not yet completed + FIRST_BACKUP_PENDING = 1; + + // The most recent backup was successful + SUCCEEDED = 2; + + // The most recent backup failed + FAILED = 3; + + // The most recent backup could not be run/failed because of the lack of + // permissions + PERMISSION_DENIED = 4; + } + + // Configuration Info has the resource format-specific configuration. + oneof backup_config { + // Configuration for a Google Cloud resource. + GcpBackupConfig gcp_backup_config = 4; + + // Configuration for an application backed up by a Backup Appliance. + BackupApplianceBackupConfig backup_appliance_backup_config = 5; + } + + // Output only. The status of the last backup to this BackupVault + LastBackupState last_backup_state = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the last backup were successful, this field has the + // consistency date. + google.protobuf.Timestamp last_successful_backup_consistency_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the last backup failed, this field has the error message. + google.rpc.Status last_backup_error = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// GcpBackupConfig captures the Backup configuration details for Google Cloud +// resources. All Google Cloud resources regardless of type are protected with +// backup plan associations. +message GcpBackupConfig { + // The name of the backup plan. + string backup_plan = 1 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + }]; + + // The description of the backup plan. + string backup_plan_description = 2; + + // The name of the backup plan association. + string backup_plan_association = 3 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + }]; + + // The names of the backup plan rules which point to this backupvault + repeated string backup_plan_rules = 4; + + // The name of the backup plan revision. + string backup_plan_revision_name = 5; + + // The user friendly id of the backup plan revision. + // E.g. v0, v1 etc. + string backup_plan_revision_id = 6; + + // Output only. The resource name of the `AutoProtectionPolicyBinding` that + // manages this datasource, if any. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{policy}/bindings/{binding}`. + string auto_protection_policy_binding = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/AutoProtectionPolicyBinding" + } + ]; +} + +// BackupApplianceBackupConfig captures the backup configuration for +// applications that are protected by Backup Appliances. +message BackupApplianceBackupConfig { + // The name of the backup appliance. + string backup_appliance_name = 1; + + // The ID of the backup appliance. + int64 backup_appliance_id = 2; + + // The ID of the SLA of this application. + int64 sla_id = 3; + + // The name of the application. + string application_name = 4; + + // The name of the host where the application is running. + string host_name = 5; + + // The name of the SLT associated with the application. + string slt_name = 6; + + // The name of the SLP associated with the application. + string slp_name = 7; +} + +// DataSourceGcpResource is used for protected resources that are Google Cloud +// Resources. This name is easeier to understand than GcpResourceDataSource or +// GcpDataSourceResource +message DataSourceGcpResource { + // gcp_Properties has properties of the Google Cloud Resource. + oneof gcp_resource_properties { + // ComputeInstanceDataSourceProperties has a subset of Compute Instance + // properties that are useful at the Datasource level. + ComputeInstanceDataSourceProperties compute_instance_datasource_properties = + 4; + + // Output only. CloudSqlInstanceDataSourceProperties has a subset of Cloud + // SQL Instance properties that are useful at the Datasource level. + CloudSqlInstanceDataSourceProperties + cloud_sql_instance_datasource_properties = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB + // cluster properties that are useful at the Datasource level. Currently + // none of its child properties are auditable. If new auditable properties + // are added, the AUDIT annotation should be added. + AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties = + 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // DiskDataSourceProperties has a subset of Disk properties that are useful + // at the Datasource level. + DiskDataSourceProperties disk_datasource_properties = 7; + } + + // Output only. Full resource pathname URL of the source Google Cloud + // resource. + string gcp_resourcename = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // The type of the Google Cloud resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} + +// BackupApplianceApplication describes a Source Resource when it is an +// application backed up by a BackupAppliance. +message DataSourceBackupApplianceApplication { + // The name of the Application as known to the Backup Appliance. + string application_name = 1; + + // Appliance name. + string backup_appliance = 2; + + // Appliance Id of the Backup Appliance. + int64 appliance_id = 3; + + // The type of the application. e.g. VMBackup + string type = 4; + + // The appid field of the application within the Backup Appliance. + int64 application_id = 8; + + // Hostname of the host where the application is running. + string hostname = 6; + + // Hostid of the application host. + int64 host_id = 7; +} + +// ServiceLockInfo represents the details of a lock taken by the service on a +// Backup resource. +message ServiceLockInfo { + // Output only. The name of the operation that created this lock. + // The lock will automatically be released when the operation completes. + string operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupApplianceLockInfo contains metadata about the backupappliance that +// created the lock. +message BackupApplianceLockInfo { + // The information about this lock. + oneof lock_source { + // The job name on the backup/recovery appliance that created this lock. + string job_name = 6; + + // The image name that depends on this Backup. + string backup_image = 7; + + // The SLA on the backup/recovery appliance that owns the lock. + int64 sla_id = 8; + } + + // Required. The ID of the backup/recovery appliance that created this lock. + int64 backup_appliance_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the backup/recovery appliance that created this lock. + string backup_appliance_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The + // value of this string is only meaningful to the client and it is not + // interpreted by the BackupVault service. + string lock_reason = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// BackupLock represents a single lock on a Backup resource. An unexpired +// lock on a Backup prevents the Backup from being deleted. +message BackupLock { + // Metadata about the owner and reason for the lock. + oneof ClientLockInfo { + // If the client is a backup and recovery appliance, this + // contains metadata about why the lock exists. + BackupApplianceLockInfo backup_appliance_lock_info = 3; + + // Output only. Contains metadata about the lock exist for Google Cloud + // native backups. + ServiceLockInfo service_lock_info = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Required. The time after which this lock is not considered valid and will + // no longer protect the Backup from deletion. + google.protobuf.Timestamp lock_until_time = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message describing a Backup object. +message Backup { + option (google.api.resource) = { + type: "backupdr.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}" + plural: "backups" + singular: "backup" + }; + + // GCPBackupPlanInfo captures the plan configuration details of Google Cloud + // resources at the time of backup. + message GCPBackupPlanInfo { + // Resource name of backup plan by which workload is protected at the time + // of the backup. + // Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 1 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + }]; + + // The rule id of the backup plan which triggered this backup in case of + // scheduled backup or used for + string backup_plan_rule_id = 2; + + // Resource name of the backup plan revision which triggered this backup in + // case of scheduled backup or used for on demand backup. + // Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId}/revisions/{revisionId} + string backup_plan_revision_name = 3; + + // The user friendly id of the backup plan revision which triggered this + // backup in case of scheduled backup or used for on demand backup. + string backup_plan_revision_id = 4; + } + + // Holds the state of the backup resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The backup is being created. + CREATING = 1; + + // The backup has been created and is fully usable. + ACTIVE = 2; + + // The backup is being deleted. + DELETING = 3; + + // The backup is experiencing an issue and might be unusable. + ERROR = 4; + + // The backup is being uploaded. + UPLOADING = 5; + } + + // Type of the backup, scheduled or ondemand. + enum BackupType { + // Backup type is unspecified. + BACKUP_TYPE_UNSPECIFIED = 0; + + // Scheduled backup. + SCHEDULED = 1; + + // On demand backup. + ON_DEMAND = 2; + + // Operational backup. + ON_DEMAND_OPERATIONAL = 3; + } + + // Workload specific backup properties. + oneof backup_properties { + // Output only. Compute Engine specific backup properties. + ComputeInstanceBackupProperties compute_instance_backup_properties = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud SQL specific backup properties. + CloudSqlInstanceBackupProperties cloud_sql_instance_backup_properties = 26 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Backup Appliance specific backup properties. + BackupApplianceBackupProperties backup_appliance_backup_properties = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. AlloyDB specific backup properties. + AlloyDbClusterBackupProperties alloy_db_backup_properties = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Disk specific backup properties. + DiskBackupProperties disk_backup_properties = 28 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Configuration Info has the resource format-specific configuration. + oneof plan_info { + // Output only. Configuration for a Google Cloud resource. + GCPBackupPlanInfo gcp_backup_plan_info = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Resource that is being backed up. + oneof source_resource { + // Output only. Unique identifier of the GCP resource that is being backed + // up. + BackupGcpResource gcp_resource = 31 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Identifier. Name of the backup to create. It must have the + // format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. + // `{backup}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the datasource. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The description of the Backup instance (2048 characters or + // less). + optional string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The backup can not be deleted before this time. + optional google.protobuf.Timestamp enforced_retention_end_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Setting for how the enforced retention end time is inherited. + // This value is copied from this backup's BackupVault. + optional BackupVault.BackupRetentionInheritance backup_retention_inheritance = + 30 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. When this backup is automatically expired. + optional google.protobuf.Timestamp expire_time = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The point in time when this backup was captured from the + // source. + optional google.protobuf.Timestamp consistency_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Server specified ETag to prevent updates from overwriting each + // other. + optional string etag = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Backup resource instance state. + State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of BackupLocks taken by the service to prevent the + // deletion of the backup. + repeated BackupLock service_locks = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The list of BackupLocks taken by the accessor Backup Appliance. + repeated BackupLock backup_appliance_locks = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Type of the backup, unspecified, scheduled or ondemand. + BackupType backup_type = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. source resource size in bytes at the time of the backup. + int64 resource_size_bytes = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Output only. Reserved for future use. + optional bool satisfies_pzs = 24 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Output only. Reserved for future use. + optional bool satisfies_pzi = 25 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Output only. The list of KMS key versions used to encrypt the + // backup. + repeated string kms_key_versions = 33 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; +} + +// Message for creating a BackupVault. +message CreateBackupVaultRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Required. ID of the requesting object + // If auto-generating ID server-side, remove this field and + // backup_vault_id from the method_signature of Create RPC + string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing backupvault stores. +message ListBackupVaultsRequest { + // Required. The project and location for which to retrieve backupvault stores + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Google Cloud Backup and DR, locations map to Google Cloud regions, for + // example + // **us-central1**. + // To retrieve backupvault stores for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // Vault. + BackupVaultView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing BackupVaults. +message ListBackupVaultsResponse { + // The list of BackupVault instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup vaults in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupVault backup_vaults = 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; +} + +// Request message for fetching usable BackupVaults. +message FetchUsableBackupVaultsRequest { + // Required. The project and location for which to retrieve backupvault stores + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Google Cloud Backup and DR, locations map to Google Cloud regions, for + // example + // **us-central1**. + // To retrieve backupvault stores for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for fetching usable BackupVaults. +message FetchUsableBackupVaultsResponse { + // The list of BackupVault instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup vaults in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupVault backup_vaults = 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; +} + +// Request for the FetchBackupsForResourceType method. +message FetchBackupsForResourceTypeRequest { + // Required. Datasources are the parent resource for the backups. + // Format: + // projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/Backup" + } + ]; + + // Required. The type of the GCP resource. + // Ex: sqladmin.googleapis.com/Instance + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of Backups to return. The service may + // return fewer than this value. If unspecified, at most 50 + // Backups will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous call of + // `FetchBackupsForResourceType`. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `FetchBackupsForResourceType` must match + // the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results fetched in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. Supported + // fields: + // * name + // * state + // * backup_type + // * create_time + // * expire_time + // * enforced_retention_end_time + // * gcp_backup_plan_info.backup_plan + // * cloud_sql_instance_backup_properties.instance_tier + // * cloud_sql_instance_backup_properties.database_installed_version + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // * name + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This parameter is used to specify the view of the backup. + // If not specified, the default view is BASIC. + BackupView view = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the FetchBackupsForResourceType method. +message FetchBackupsForResourceTypeResponse { + // The Backups from the specified parent. + repeated Backup backups = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for getting a BackupVault. +message GetBackupVaultRequest { + // Required. Name of the backupvault store resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // Vault + BackupVaultView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a BackupVault. +message UpdateBackupVaultRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // BackupVault 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, will not check plan duration against backup vault + // enforcement duration. + bool force = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, we will force update access restriction even if + // some non compliant data sources are present. The default is 'false'. + bool force_update_access_restriction = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a BackupVault. +message DeleteBackupVaultRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, any data source from this backup vault will also + // be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; + + // The current etag of the backup vault. + // If an etag is provided and does not match the current etag of the + // connection, deletion will be blocked. + string etag = 4; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true and the BackupVault is not found, the request will + // succeed but no action will be taken. + bool allow_missing = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, backupvault deletion will proceed even if there + // are backup plans referencing the backupvault. The default is 'false'. + bool ignore_backup_plan_references = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing DataSources. +message ListDataSourcesRequest { + // Required. The project and location for which to retrieve data + // sources information, in the format + // 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + // DR, locations map to Google Cloud regions, for example + // **us-central1**. + // To retrieve data sources for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing DataSources. +message ListDataSourcesResponse { + // The list of DataSource instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return data sources in reachable locations + // and the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated DataSource data_sources = 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; +} + +// Request message for getting a DataSource instance. +message GetDataSourceRequest { + // Required. Name of the data source resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; +} + +// Request message for updating a data source instance. +message UpdateDataSourceRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // DataSource 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + DataSource data_source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Enable upsert. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing Backups. +message ListBackupsRequest { + // Required. The project and location for which to retrieve backup + // information, in the format + // 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and + // DR, locations map to Google Cloud regions, for example + // **us-central1**. + // To retrieve data sources for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/Backup" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // resource. + BackupView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing Backups. +message ListBackupsResponse { + // The list of Backup instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return data sources in reachable locations + // and the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated Backup backups = 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; +} + +// Request message for getting a Backup. +message GetBackupRequest { + // Required. Name of the data source resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // resource. + BackupView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a Backup. +message UpdateBackupRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Backup. +message DeleteBackupRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for restoring from a Backup. +message RestoreBackupRequest { + // The target environment for the restore operation. + oneof target_environment { + // Compute Engine target environment to be used during restore. + ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + + // Disk target environment to be used during restore. + DiskTargetEnvironment disk_target_environment = 5; + + // Region disk target environment to be used during restore. + RegionDiskTargetEnvironment region_disk_target_environment = 6; + } + + // The property overrides for the instance being restored. + oneof instance_properties { + // Compute Engine instance properties to be overridden during restore. + ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + + // Disk properties to be overridden during restore. + DiskRestoreProperties disk_restore_properties = 7; + } + + // Required. The resource name of the Backup instance, in the format + // 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. A field mask used to clear server-side default values + // for fields within the `instance_properties` oneof. + // + // When a field in this mask is cleared, the server will not apply its + // default logic (like inheriting a value from the source) for that field. + // + // The most common current use case is clearing default encryption keys. + // + // Examples of field mask paths: + // - Compute Instance Disks: + // `compute_instance_restore_properties.disks.*.disk_encryption_key` + // - Single Disk: `disk_restore_properties.disk_encryption_key` + optional google.protobuf.FieldMask clear_overrides_field_mask = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for restoring from a Backup. +message RestoreBackupResponse { + // Details of the target resource created/modified as part of restore. + TargetResource target_resource = 1; +} + +// Details of the target resource created/modified as part of restore. +message TargetResource { + // Minimum details to identify the restored resource. + oneof target_resource_info { + // Details of the native Google Cloud resource created as part of restore. + GcpResource gcp_resource = 1; + } +} + +// Minimum details to identify a Google Cloud resource +message GcpResource { + // Name of the Google Cloud resource. + string gcp_resourcename = 1; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // Type of the resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} + +// Minimum details to identify a Google Cloud resource for a backup. +message BackupGcpResource { + // Name of the Google Cloud resource. + string gcp_resourcename = 1; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // Type of the resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_alloydb.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_alloydb.proto new file mode 100644 index 000000000000..f43963293d3f --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_alloydb.proto @@ -0,0 +1,112 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultAlloyDBProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; +option (google.api.resource_definition) = { + type: "alloydb.googleapis.com/Cluster" + pattern: "projects/{project}/locations/{location}/clusters/{cluster}" + plural: "clusters" + singular: "cluster" +}; + +// AlloyDBClusterDataSourceProperties represents the properties of a +// AlloyDB cluster resource that are stored in the DataSource. +// . +message AlloyDBClusterDataSourceProperties { + // Output only. Name of the AlloyDB cluster backed up by the datasource. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } + ]; + + // Output only. Point in time recovery windows. + // The order is guaranteed to be ascending by start time. + repeated AlloyDbPitrWindow pitr_windows = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The cluster UID of the AlloyDB cluster backed up by the + // datasource. + string cluster_uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AlloyDBClusterDataSourceReferenceProperties represents the properties of an +// AlloyDB cluster that are stored in the DataSourceReference. +message AlloyDBClusterDataSourceReferenceProperties { + // Output only. Name of the AlloyDB cluster backed up by the datasource. + // Format: + // projects/{project}/locations/{location}/clusters/{cluster} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" } + ]; +} + +// Point in time recovery window for an AlloyDB cluster. +message AlloyDbPitrWindow { + // Output only. The start time of the PITR window. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end time of the PITR window. It is not set if the + // corresponding Backup Plan Association is active. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Log retention days for the PITR window. + int64 log_retention_days = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AlloyDbClusterBackupProperties represents AlloyDB cluster +// backup properties. +// . +message AlloyDbClusterBackupProperties { + // An optional text description for the backup. + optional string description = 1; + + // Output only. Storage usage of this particular backup + int64 stored_bytes = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The chain id of this backup. Backups belonging to the same + // chain are sharing the same chain id. This property is calculated and + // maintained by BackupDR. + string chain_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The PostgreSQL major version of the AlloyDB cluster when the + // backup was taken. + string database_version = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Properties for an AlloyDB cluster backup plan association. +message AlloyDBClusterBackupPlanAssociationProperties { + // Output only. The cluster UID of the AlloyDB cluster. + string cluster_uid = 1 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_ba.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_ba.proto new file mode 100644 index 000000000000..7e43bac3e048 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_ba.proto @@ -0,0 +1,49 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultBaProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// BackupApplianceBackupProperties represents BackupDR backup appliance's +// properties. +message BackupApplianceBackupProperties { + // Output only. The numeric generation ID of the backup (monotonically + // increasing). + optional int32 generation_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when this backup object was finalized (if none, + // backup is not finalized). + optional google.protobuf.Timestamp finalize_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The earliest timestamp of data available in this Backup. + optional google.protobuf.Timestamp recovery_range_start_time = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The latest timestamp of data available in this Backup. + optional google.protobuf.Timestamp recovery_range_end_time = 4 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_cloudsql.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_cloudsql.proto new file mode 100644 index 000000000000..36d0adcb88ba --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_cloudsql.proto @@ -0,0 +1,146 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultCloudSqlProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; +option (google.api.resource_definition) = { + type: "sqladmin.googleapis.com/Instance" + pattern: "projects/{project}/instances/{instance}" +}; + +// CloudSqlInstanceDataSourceProperties represents the properties of a +// Cloud SQL resource that are stored in the DataSource. +message CloudSqlInstanceDataSourceProperties { + // Output only. Name of the Cloud SQL instance backed up by the datasource. + // Format: + // projects/{project}/instances/{instance} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "sqladmin.googleapis.com/Instance" + } + ]; + + // Output only. The installed database version of the Cloud SQL instance. + string database_installed_version = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instance creation timestamp. + google.protobuf.Timestamp instance_create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tier (or machine type) for this instance. Example: + // `db-custom-1-3840` + string instance_tier = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudSqlInstanceBackupProperties represents Cloud SQL Instance +// Backup properties. +message CloudSqlInstanceBackupProperties { + // Output only. The installed database version of the Cloud SQL instance + // when the backup was taken. + string database_installed_version = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the backup is a final backup. + bool final_backup = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The source instance of the backup. + // Format: + // projects/{project}/instances/{instance} + string source_instance = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "sqladmin.googleapis.com/Instance" + } + ]; + + // Output only. The instance creation timestamp. + google.protobuf.Timestamp instance_create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tier (or machine type) for this instance. Example: + // `db-custom-1-3840` + string instance_tier = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instance delete timestamp. + google.protobuf.Timestamp instance_delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudSqlInstanceDataSourceReferenceProperties represents the properties of a +// Cloud SQL resource that are stored in the DataSourceReference. +message CloudSqlInstanceDataSourceReferenceProperties { + // Output only. Name of the Cloud SQL instance backed up by the datasource. + // Format: + // projects/{project}/instances/{instance} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "sqladmin.googleapis.com/Instance" + } + ]; + + // Output only. The installed database version of the Cloud SQL instance. + string database_installed_version = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The instance creation timestamp. + google.protobuf.Timestamp instance_create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tier (or machine type) for this instance. Example: + // `db-custom-1-3840` + string instance_tier = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudSqlInstanceInitializationConfig contains the configuration for +// initializing a Cloud SQL instance. +message CloudSqlInstanceInitializationConfig { + // The edition of the Cloud SQL instance. For details, see + // https://cloud.google.com/sql/docs/editions-intro. + enum Edition { + // Unspecified edition. + EDITION_UNSPECIFIED = 0; + + // Enterprise edition. + ENTERPRISE = 1; + + // Enterprise Plus edition. + ENTERPRISE_PLUS = 2; + } + + // Required. The edition of the Cloud SQL instance. + Edition edition = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Cloud SQL instance's BPA properties. +message CloudSqlInstanceBackupPlanAssociationProperties { + // Output only. The time when the instance was created. + google.protobuf.Timestamp instance_create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_disk.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_disk.proto new file mode 100644 index 000000000000..bcd62219c853 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_disk.proto @@ -0,0 +1,280 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/backupvault_gce.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultDiskProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/StoragePool" + pattern: "projects/{project}/zones/{zone}/storagePools/{storage_pool}" +}; + +// DiskTargetEnvironment represents the target environment for the disk. +message DiskTargetEnvironment { + // Required. Target project for the disk. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Target zone for the disk. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to use the project service account for the disk restore. + optional bool use_project_service_account = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// RegionDiskTargetEnvironment represents the target environment for the disk. +message RegionDiskTargetEnvironment { + // Required. Target project for the disk. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Target region for the disk. + string region = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Target URLs of the replica zones for the disk. + repeated string replica_zones = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to use the project service account for the disk restore. + optional bool use_project_service_account = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// DiskRestoreProperties represents the properties of a Disk restore. +message DiskRestoreProperties { + // The supported access modes of the disk. + enum AccessMode { + // The default AccessMode, means the disk can be attached to single instance + // in RW mode. + READ_WRITE_SINGLE = 0; + + // The AccessMode means the disk can be attached to multiple instances in RW + // mode. + READ_WRITE_MANY = 1; + + // The AccessMode means the disk can be attached to multiple instances in RO + // mode. + READ_ONLY_MANY = 2; + } + + // Architecture of the source disk. + enum Architecture { + // Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0; + + // Disks with architecture X86_64 + X86_64 = 1; + + // Disks with architecture ARM64 + ARM64 = 2; + } + + // Specifies the source of the restore. + // This is required for selective or cross-workload restores. + oneof source_options { + // Options for creating a disk from a source Compute Instance backup. + RestoreDiskFromInstanceOptions instance_backup_source = 19; + } + + // Required. Name of the disk. + optional string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional description of this resource. Provide this property + // when you create the resource. + optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The size of the disk in GB. + optional int64 size_gb = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of publicly available licenses that are applicable to this + // backup. This is applicable if the original image had licenses attached, + // e.g. Windows image + repeated string licenses = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of features to enable in the guest operating system. This + // is applicable only for bootable images. + repeated GuestOsFeature guest_os_feature = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts the disk using a + // customer-supplied encryption key or a customer-managed encryption key. + optional CustomerEncryptionKey disk_encryption_key = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Physical block size of the persistent disk, in bytes. + // If not present in a request, a default value is used. + // Currently, the supported size is 4096. + optional int64 physical_block_size_bytes = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates how many IOPS to provision for the disk. This sets the + // number of I/O operations per second that the disk can handle. + optional int64 provisioned_iops = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates how much throughput to provision for the disk. This + // sets the number of throughput MB per second that the disk can handle. + optional int64 provisioned_throughput = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether this disk is using confidential compute mode. + // Encryption with a Cloud KMS key is required to enable this option. + optional bool enable_confidential_compute = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The storage pool in which the new disk is created. You can + // provide this as a partial or full URL to the resource. + optional string storage_pool = 11 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "compute.googleapis.com/StoragePool" + } + ]; + + // Optional. The access mode of the disk. + optional AccessMode access_mode = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The architecture of the source disk. Valid values are + // ARM64 or X86_64. + optional Architecture architecture = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource policies applied to this disk. + repeated string resource_policy = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Required. URL of the disk type resource describing which disk type to use + // to create the disk. + optional string type = 16 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Labels to apply to this disk. These can be modified later using + // setLabels method. Label values can be empty. + map labels = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource manager tags to be bound to the disk. + map resource_manager_tags = 18 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Options for creating a disk from a source Compute Instance backup. +message RestoreDiskFromInstanceOptions { + // Required: The disk to be restored from the instance backup. + oneof source_disk { + // The device name of the disk to restore from the VM backup. + string source_device_name = 1; + + // Set to true to restore the boot disk from the instance backup. + // This field should only be set to true if selected. + bool boot_disk = 2; + } +} + +// DiskBackupProperties represents the properties of a Disk backup. +message DiskBackupProperties { + // Architecture of the source disk. + enum Architecture { + // Default value. This value is unused. + ARCHITECTURE_UNSPECIFIED = 0; + + // Disks with architecture X86_64 + X86_64 = 1; + + // Disks with architecture ARM64 + ARM64 = 2; + } + + // A description of the source disk. + optional string description = 1; + + // A list of publicly available licenses that are applicable to this backup. + // This is applicable if the original image had licenses attached, e.g. + // Windows image. + repeated string licenses = 2; + + // A list of guest OS features that are applicable to this backup. + repeated GuestOsFeature guest_os_feature = 3; + + // The architecture of the source disk. Valid values are + // ARM64 or X86_64. + optional Architecture architecture = 4; + + // The URL of the type of the disk. + optional string type = 5; + + // Size(in GB) of the source disk. + optional int64 size_gb = 6; + + // Region and zone are mutually exclusive fields. + // The URL of the region of the source disk. + optional string region = 7; + + // The URL of the Zone where the source disk. + optional string zone = 8; + + // The URL of the Zones where the source disk should be replicated. + repeated string replica_zones = 9; + + // The source disk used to create this backup. + optional string source_disk = 10; + + // The access mode of the source disk. + optional string access_mode = 11; + + // The number of IOPS provisioned for the source disk. + optional int64 provisioned_iops = 12; + + // The number of throughput provisioned for the source disk. + optional int64 provisioned_throughput = 13; + + // The physical block size of the source disk. + optional int64 physical_block_size_bytes = 14; + + // Indicates whether the source disk is using confidential compute mode. + optional bool enable_confidential_compute = 15; + + // The storage pool of the source disk. + optional string storage_pool = 16; + + // The labels of the source disk. + map labels = 17; + + // Optional. Defines if the guest flush is enabled for the source disk. + // Default value is false. + bool guest_flush = 18 [(google.api.field_behavior) = OPTIONAL]; +} + +// DiskDataSourceProperties represents the properties of a +// Disk resource that are stored in the DataSource. +// . +message DiskDataSourceProperties { + // Name of the disk backed up by the datasource. + string name = 1; + + // The description of the disk. + string description = 2; + + // The type of the disk. + string type = 3; + + // The size of the disk in GB. + int64 size_gb = 4; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_gce.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_gce.proto new file mode 100644 index 000000000000..9c1b1b347948 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/backupvault_gce.proto @@ -0,0 +1,967 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultGceProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// Specifies whether the virtual machine instance will be shut down on key +// revocation. It is currently used in instance, instance properties and GMI +// protos +enum KeyRevocationActionType { + // Default value. This value is unused. + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0; + + // Indicates user chose no operation. + NONE = 1; + + // Indicates user chose to opt for VM shutdown on key revocation. + STOP = 2; +} + +// ComputeInstanceBackupProperties represents Compute Engine instance backup +// properties. +message ComputeInstanceBackupProperties { + // An optional text description for the instances that are created from these + // properties. + optional string description = 1; + + // A list of tags to apply to the instances that are created from these + // properties. The tags identify valid sources or targets for network + // firewalls. The setTags method can modify this list of tags. Each tag within + // the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). + optional Tags tags = 2; + + // The machine type to use for instances that are created from these + // properties. + optional string machine_type = 3; + + // Enables instances created based on these properties to send packets with + // source IP addresses other than their own and receive packets with + // destination IP addresses other than their own. If these instances will be + // used as an IP gateway or it will be set as the next-hop in a Route + // resource, specify `true`. If unsure, leave this set to `false`. See the + // https://cloud.google.com/vpc/docs/using-routes#canipforward + // documentation for more information. + optional bool can_ip_forward = 4; + + // An array of network access configurations for this interface. + repeated NetworkInterface network_interface = 5; + + // An array of disks that are associated with the instances that are created + // from these properties. + repeated AttachedDisk disk = 6; + + // The metadata key/value pairs to assign to instances that are created from + // these properties. These pairs can consist of custom metadata or predefined + // keys. See https://cloud.google.com/compute/docs/metadata/overview for more + // information. + optional Metadata metadata = 7; + + // A list of service accounts with specified scopes. Access tokens for these + // service accounts are available to the instances that are created from + // these properties. Use metadata queries to obtain the access tokens for + // these instances. + repeated ServiceAccount service_account = 8; + + // Specifies the scheduling options for the instances that are created from + // these properties. + optional Scheduling scheduling = 9; + + // A list of guest accelerator cards' type and count to use for instances + // created from these properties. + repeated AcceleratorConfig guest_accelerator = 10; + + // Minimum cpu/platform to be used by instances. The instance may be + // scheduled on the specified or newer cpu/platform. Applicable values are the + // friendly names of CPU platforms, such as + // `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. + // For more information, read + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + optional string min_cpu_platform = 11; + + // KeyRevocationActionType of the instance. Supported options are "STOP" and + // "NONE". The default value is "NONE" if it is not specified. + optional KeyRevocationActionType key_revocation_action_type = 12; + + // The source instance used to create this backup. This can be a partial or + // full URL to the resource. For example, the following are valid values: + // -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + // -projects/project/zones/zone/instances/instance + optional string source_instance = 13; + + // Labels to apply to instances that are created from these properties. + map labels = 14; + + // Optional. Indicates whether to perform a guest flush operation before + // taking a compute backup. When set to false, the system will create + // crash-consistent backups. Default value is false. + bool guest_flush = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// ComputeInstanceRestoreProperties represents Compute Engine instance +// properties to be overridden during restore. +message ComputeInstanceRestoreProperties { + // The private IPv6 google access type for the VMs. + enum InstancePrivateIpv6GoogleAccess { + // Default value. This value is unused. + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; + + // Each network interface inherits PrivateIpv6GoogleAccess from its + // subnetwork. + INHERIT_FROM_SUBNETWORK = 1; + + // Outbound private IPv6 access from VMs in this subnet to Google services. + // If specified, the subnetwork who is attached to the instance's default + // network interface will be assigned an internal IPv6 prefix if it doesn't + // have before. + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2; + + // Bidirectional private IPv6 access to/from Google services. If + // specified, the subnetwork who is attached to the instance's default + // network interface will be assigned an internal IPv6 prefix if it doesn't + // have before. + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3; + } + + // Required. Name of the compute instance. + optional string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Controls for advanced machine-related behavior features. + optional AdvancedMachineFeatures advanced_machine_features = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Allows this instance to send and receive packets with + // non-matching destination or source IPs. + optional bool can_ip_forward = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls Confidential compute options on the instance + optional ConfidentialInstanceConfig confidential_instance_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the resource should be protected against deletion. + optional bool deletion_protection = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional description of this resource. Provide this property + // when you create the resource. + optional string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Array of disks associated with this instance. Persistent disks + // must be created before you can assign them. Source regional persistent + // disks will be restored with default replica zones if not specified. + repeated AttachedDisk disks = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enables display device for the instance. + optional DisplayDevice display_device = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of the type and count of accelerator cards attached to the + // instance. + repeated AcceleratorConfig guest_accelerators = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the hostname of the instance. The specified hostname + // must be RFC1035 compliant. If hostname is not specified, the default + // hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global + // DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal + // DNS. + optional string hostname = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts suspended data for an instance with a + // customer-managed encryption key. + optional CustomerEncryptionKey instance_encryption_key = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. KeyRevocationActionType of the instance. + optional KeyRevocationActionType key_revocation_action_type = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to apply to this instance. + map labels = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full or partial URL of the machine type resource to use for this + // instance. + optional string machine_type = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This includes custom metadata and predefined keys. + optional Metadata metadata = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum CPU platform to use for this instance. + optional string min_cpu_platform = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of network configurations for this instance. These + // specify how interfaces are configured to interact with other network + // services, such as connecting to the internet. Multiple interfaces are + // supported per instance. Required to restore in different project or region. + repeated NetworkInterface network_interfaces = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configure network performance such as egress bandwidth tier. + optional NetworkPerformanceConfig network_performance_config = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Input only. Additional params passed with the request, but not persisted + // as part of resource payload. + optional InstanceParams params = 19 + [(google.api.field_behavior) = INPUT_ONLY]; + + // Optional. The private IPv6 google access type for the VM. + // If not specified, use INHERIT_FROM_SUBNETWORK as default. + optional InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the reservations that this instance can consume from. + optional AllocationAffinity allocation_affinity = 21 [ + json_name = "reservationAffinity", + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Resource policies applied to this instance. + // By default, no resource policies will be applied. + repeated string resource_policies = 22 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sets the scheduling options for this instance. + optional Scheduling scheduling = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of service accounts, with their specified scopes, + // authorized for this instance. Only one service account per VM instance is + // supported. + repeated ServiceAccount service_accounts = 24 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Tags to apply to this instance. Tags are used to identify valid + // sources or targets for network firewalls and are specified by the client + // during instance creation. + optional Tags tags = 26 [(google.api.field_behavior) = OPTIONAL]; +} + +// ComputeInstanceTargetEnvironment represents Compute Engine target +// environment to be used during restore. +message ComputeInstanceTargetEnvironment { + // Required. Target project for the Compute Engine instance. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zone of the Compute Engine instance. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether to use the project service account for the Compute Engine + // instance restore. + optional bool use_project_service_account = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// ComputeInstanceDataSourceProperties represents the properties of a +// ComputeEngine resource that are stored in the DataSource. +message ComputeInstanceDataSourceProperties { + // Name of the compute instance backed up by the datasource. + string name = 1; + + // The description of the Compute Engine instance. + string description = 2; + + // The machine type of the instance. + string machine_type = 3; + + // The total number of disks attached to the Instance. + int64 total_disk_count = 4; + + // The sum of all the disk sizes. + int64 total_disk_size_gb = 5; +} + +// Specifies options for controlling advanced machine features. +message AdvancedMachineFeatures { + // Optional. Whether to enable nested virtualization or not (default is + // false). + optional bool enable_nested_virtualization = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of threads per physical core. To disable simultaneous + // multithreading (SMT) set this to 1. If unset, the maximum number + // of threads supported per core by the underlying processor is + // assumed. + optional int32 threads_per_core = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of physical cores to expose to an instance. Multiply + // by the number of threads per core to compute the total number of virtual + // CPUs to expose to the instance. If unset, the number of cores is + // inferred from the instance's nominal CPU count and the underlying + // platform's SMT width. + optional int32 visible_core_count = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to enable UEFI networking for instance creation. + optional bool enable_uefi_networking = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of Confidential Instance options. +message ConfidentialInstanceConfig { + // Optional. Defines whether the instance should have confidential compute + // enabled. + optional bool enable_confidential_compute = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of Display Device options +message DisplayDevice { + // Optional. Enables display for the Compute Engine VM + optional bool enable_display = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Network performance configuration. +message NetworkPerformanceConfig { + // Network performance tier. + enum Tier { + // This value is unused. + TIER_UNSPECIFIED = 0; + + // Default network performance config. + DEFAULT = 1; + + // Tier 1 network performance config. + TIER_1 = 2; + } + + // Optional. The tier of the total egress bandwidth. + optional Tier total_egress_bandwidth_tier = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Additional instance params. +message InstanceParams { + // Optional. Resource manager tags to be bound to the instance. + map resource_manager_tags = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Feature type of the Guest OS. +message GuestOsFeature { + // List of the Feature Types. + enum FeatureType { + // Default value, which is unused. + FEATURE_TYPE_UNSPECIFIED = 0; + + // VIRTIO_SCSI_MULTIQUEUE feature type. + VIRTIO_SCSI_MULTIQUEUE = 1; + + // WINDOWS feature type. + WINDOWS = 2; + + // MULTI_IP_SUBNET feature type. + MULTI_IP_SUBNET = 3; + + // UEFI_COMPATIBLE feature type. + UEFI_COMPATIBLE = 4; + + // SECURE_BOOT feature type. + SECURE_BOOT = 5; + + // GVNIC feature type. + GVNIC = 6; + + // SEV_CAPABLE feature type. + SEV_CAPABLE = 7; + + // BARE_METAL_LINUX_COMPATIBLE feature type. + BARE_METAL_LINUX_COMPATIBLE = 8; + + // SUSPEND_RESUME_COMPATIBLE feature type. + SUSPEND_RESUME_COMPATIBLE = 9; + + // SEV_LIVE_MIGRATABLE feature type. + SEV_LIVE_MIGRATABLE = 10; + + // SEV_SNP_CAPABLE feature type. + SEV_SNP_CAPABLE = 11; + + // TDX_CAPABLE feature type. + TDX_CAPABLE = 12; + + // IDPF feature type. + IDPF = 13; + + // SEV_LIVE_MIGRATABLE_V2 feature type. + SEV_LIVE_MIGRATABLE_V2 = 14; + } + + // The ID of a supported feature. + optional FeatureType type = 1; +} + +// Specifies the reservations that this instance can consume from. +message AllocationAffinity { + // Indicates whether to consume from a reservation or not. + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Do not consume from any allocated capacity. + NO_RESERVATION = 1; + + // Consume any allocation available. + ANY_RESERVATION = 2; + + // Must consume from a specific reservation. Must specify key value fields + // for specifying the reservations. + SPECIFIC_RESERVATION = 3; + } + + // Optional. Specifies the type of reservation from which this instance can + // consume + optional Type consume_allocation_type = 1 [ + json_name = "consumeReservationType", + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Corresponds to the label key of a reservation resource. + optional string key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of a reservation resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A specification of the type and number of accelerator cards attached to the +// instance. +message AcceleratorConfig { + // Optional. Full or partial URL of the accelerator type resource to attach to + // this instance. + optional string accelerator_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of the guest accelerator cards exposed to this + // instance. + optional int32 accelerator_count = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A customer-supplied encryption key. +message CustomerEncryptionKey { + // The key to use for encryption. + oneof key { + // Optional. Specifies a 256-bit customer-supplied + // encryption key. + string raw_key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. RSA-wrapped 2048-bit + // customer-supplied encryption key to either encrypt or decrypt this + // resource. + string rsa_encrypted_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the encryption key that is stored in Google Cloud + // KMS. + string kms_key_name = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The service account being used for the encryption request for the + // given KMS key. If absent, the Compute Engine default service account is + // used. + optional string kms_key_service_account = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A key/value pair to be used for storing metadata. +message Entry { + // Optional. Key for the metadata entry. + optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Value for the metadata entry. These are free-form strings, and + // only have meaning as interpreted by the image running in the instance. The + // only restriction placed on values is that their size must be less than + // or equal to 262144 bytes (256 KiB). + optional string value = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A metadata key/value entry. +message Metadata { + // Optional. Array of key/value pairs. The total size of all keys and values + // must be less than 512 KB. + repeated Entry items = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A network interface resource attached to an instance. +// s +message NetworkInterface { + // Stack type for this network interface. + enum StackType { + // Default should be STACK_TYPE_UNSPECIFIED. + STACK_TYPE_UNSPECIFIED = 0; + + // The network interface will be assigned IPv4 address. + IPV4_ONLY = 1; + + // The network interface can have both IPv4 and IPv6 addresses. + IPV4_IPV6 = 2; + } + + // IPv6 access type for this network interface. + enum Ipv6AccessType { + // IPv6 access type not set. Means this network interface hasn't been + // turned on IPv6 yet. + UNSPECIFIED_IPV6_ACCESS_TYPE = 0; + + // This network interface can have internal IPv6. + INTERNAL = 1; + + // This network interface can have external IPv6. + EXTERNAL = 2; + } + + // Nic type for this network interface. + enum NicType { + // Default should be NIC_TYPE_UNSPECIFIED. + NIC_TYPE_UNSPECIFIED = 0; + + // VIRTIO + VIRTIO_NET = 1; + + // GVNIC + GVNIC = 2; + } + + // Optional. URL of the VPC network resource for this instance. + optional string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URL of the Subnetwork resource for this instance. + optional string subnetwork = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An IPv4 internal IP address to assign to the instance for this + // network interface. If not specified by the user, an unused internal IP is + // assigned by the system. + optional string ip_address = 3 [ + json_name = "networkIP", + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. An IPv6 internal network address for this network interface. To + // use a static internal IP address, it must be unused and in the same region + // as the instance's zone. If not specified, Google Cloud will automatically + // assign an internal IPv6 address from the instance's subnetwork. + optional string ipv6_address = 4 [ + (google.api.field_info).format = IPV6, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The prefix length of the primary internal IPv6 range. + optional int32 internal_ipv6_prefix_length = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. [Output Only] The name of the network interface, which is + // generated by the server. + optional string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. An array of configurations for this interface. Currently, only + // one access config,ONE_TO_ONE_NAT is supported. If there are no + // accessConfigs specified, then this instance will have + // no external internet access. + repeated AccessConfig access_configs = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of IPv6 access configurations for this interface. + // Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there + // is no ipv6AccessConfig specified, then this instance will + // have no external IPv6 Internet access. + repeated AccessConfig ipv6_access_configs = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of alias IP ranges for this network interface. + // You can only specify this field for network interfaces in VPC networks. + repeated AliasIpRange alias_ip_ranges = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // The stack type for this network interface. + optional StackType stack_type = 10; + + // Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the + // IP can be accessed from the Internet. This field is always inherited from + // its subnetwork. + optional Ipv6AccessType ipv6_access_type = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The networking queue count that's specified by users for the + // network interface. Both Rx and Tx queues will be set to this number. It'll + // be empty if not specified by the users. + optional int32 queue_count = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of vNIC to be used on this interface. This may be gVNIC + // or VirtioNet. + optional NicType nic_type = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URL of the network attachment that this interface should + // connect to in the following format: + // projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. + optional string network_attachment = 14 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An access configuration attached to an instance's network interface. +// Only one access config per instance is supported. +message AccessConfig { + // The type of configuration. + enum AccessType { + // Default value. This value is unused. + ACCESS_TYPE_UNSPECIFIED = 0; + + // ONE_TO_ONE_NAT + ONE_TO_ONE_NAT = 1; + + // Direct IPv6 access. + DIRECT_IPV6 = 2; + } + + // Network tier property used by addresses, instances and forwarding rules. + enum NetworkTier { + // Default value. This value is unused. + NETWORK_TIER_UNSPECIFIED = 0; + + // High quality, Google-grade network tier, support for all networking + // products. + PREMIUM = 1; + + // Public internet quality, only limited support for other networking + // products. + STANDARD = 2; + } + + // Optional. In accessConfigs (IPv4), the + // default and only option is ONE_TO_ONE_NAT. In + // ipv6AccessConfigs, the default and only option is + // DIRECT_IPV6. + optional AccessType type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of this access configuration. + optional string name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The external IP address of this access configuration. + optional string external_ip = 3 + [json_name = "natIP", (google.api.field_behavior) = OPTIONAL]; + + // Optional. The external IPv6 address of this access configuration. + optional string external_ipv6 = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix length of the external IPv6 range. + optional int32 external_ipv6_prefix_length = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether a public DNS 'PTR' record should be created to + // map the external IP address of the instance to a DNS domain name. + optional bool set_public_ptr = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The DNS domain name for the public PTR record. + optional string public_ptr_domain_name = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This signifies the networking tier used for configuring this + // access + optional NetworkTier network_tier = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An alias IP range attached to an instance's network interface. +message AliasIpRange { + // Optional. The IP alias ranges to allocate for this interface. + optional string ip_cidr_range = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of a subnetwork secondary IP range from which to + // allocate an IP alias range. If not specified, the primary range of the + // subnetwork is used. + optional string subnetwork_range_name = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Sets the scheduling options for an Instance. +message Scheduling { + // Node Affinity: the configuration of desired nodes onto which this Instance + // could be scheduled. + message NodeAffinity { + // Defines the type of node selections. + enum Operator { + // Default value. This value is unused. + OPERATOR_UNSPECIFIED = 0; + + // Requires Compute Engine to seek for matched nodes. + IN = 1; + + // Requires Compute Engine to avoid certain nodes. + NOT_IN = 2; + } + + // Optional. Corresponds to the label key of Node resource. + optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines the operation of node selection. + optional Operator operator = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of Node resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Defines the maintenance behavior for this instance= + enum OnHostMaintenance { + // Default value. This value is unused. + ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + + // Tells Compute Engine to terminate and (optionally) restart the instance + // away from the maintenance activity. + TERMINATE = 1; + + // Default, Allows Compute Engine to automatically migrate instances + // out of the way of maintenance events. + MIGRATE = 1000; + } + + // Defines the provisioning model for an instance. + enum ProvisioningModel { + // Default value. This value is not used. + PROVISIONING_MODEL_UNSPECIFIED = 0; + + // Standard provisioning with user controlled runtime, no discounts. + STANDARD = 1; + + // Heavily discounted, no guaranteed runtime. + SPOT = 2; + } + + // Defines the supported termination actions for an instance. + enum InstanceTerminationAction { + // Default value. This value is unused. + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0; + + // Delete the VM. + DELETE = 1; + + // Stop the VM without storing in-memory content. default action. + STOP = 2; + } + + // Optional. Defines the maintenance behavior for this instance. + optional OnHostMaintenance on_host_maintenance = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether the instance should be automatically restarted + // if it is terminated by Compute Engine (not terminated by a user). + optional bool automatic_restart = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines whether the instance is preemptible. + optional bool preemptible = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of node affinity and anti-affinity configurations. + // Overrides reservationAffinity. + repeated NodeAffinity node_affinities = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The minimum number of virtual CPUs this instance will consume + // when running on a sole-tenant node. + optional int32 min_node_cpus = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the provisioning model of the instance. + optional ProvisioningModel provisioning_model = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the termination action for the instance. + optional InstanceTerminationAction instance_termination_action = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the maximum amount of time a Local Ssd Vm should wait + // while recovery of the Local Ssd state is attempted. Its value should be in + // between 0 and 168 hours with hour granularity and the default value being 1 + // hour. + optional SchedulingDuration local_ssd_recovery_timeout = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A SchedulingDuration represents a fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". Range is approximately 10,000 years. +message SchedulingDuration { + // Optional. Span of time at a resolution of a second. + optional int64 seconds = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Span of time that's a fraction of a second at nanosecond + // resolution. + optional int32 nanos = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A service account. +message ServiceAccount { + // Optional. Email address of the service account. + optional string email = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of scopes to be made available for this service account. + repeated string scopes = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of instance tags. +message Tags { + // Optional. An array of tags. Each tag must be 1-63 characters long, and + // comply with RFC1035. + repeated string items = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// An instance-attached disk resource. +message AttachedDisk { + // Specifies the parameters to initialize this disk. + message InitializeParams { + // Optional. Specifies the disk name. If not specified, the default is to + // use the name of the instance. + optional string disk_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. URL of the zone where the disk should be created. + // Required for each regional disk associated with the instance. + repeated string replica_zones = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // List of the Disk Types. + enum DiskType { + // Default value, which is unused. + DISK_TYPE_UNSPECIFIED = 0; + + // A scratch disk type. + SCRATCH = 1; + + // A persistent disk type. + PERSISTENT = 2; + } + + // List of the Disk Modes. + enum DiskMode { + // Default value, which is unused. + DISK_MODE_UNSPECIFIED = 0; + + // Attaches this disk in read-write mode. Only one + // virtual machine at a time can be attached to a disk in read-write mode. + READ_WRITE = 1; + + // Attaches this disk in read-only mode. Multiple virtual machines can use + // a disk in read-only mode at a time. + READ_ONLY = 2; + + // The disk is locked for administrative reasons. Nobody else + // can use the disk. This mode is used (for example) when taking + // a snapshot of a disk to prevent mounting the disk while it is + // being snapshotted. + LOCKED = 3; + } + + // List of the Disk Interfaces. + enum DiskInterface { + // Default value, which is unused. + DISK_INTERFACE_UNSPECIFIED = 0; + + // SCSI Disk Interface. + SCSI = 1; + + // NVME Disk Interface. + NVME = 2; + + // NVDIMM Disk Interface. + NVDIMM = 3; + + // ISCSI Disk Interface. + ISCSI = 4; + } + + // List of the states of the Disk. + enum DiskSavedState { + // Default Disk state has not been preserved. + DISK_SAVED_STATE_UNSPECIFIED = 0; + + // Disk state has been preserved. + PRESERVED = 1; + } + + // Optional. Specifies the parameters to initialize this disk. + optional InitializeParams initialize_params = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This is used as an identifier for the disks. This is the unique + // name has to provided to modify disk parameters like disk_name and + // replica_zones (in case of RePDs) + optional string device_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the resource. + optional string kind = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Specifies the type of the disk. + optional DiskType disk_type_deprecated = 6 [deprecated = true]; + + // Optional. The mode in which to attach this disk. + optional DiskMode mode = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies a valid partial or full URL to an existing Persistent + // Disk resource. + optional string source = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A zero-based index to this disk, where 0 is reserved for the + // boot disk. + optional int64 index = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates that this is a boot disk. The virtual machine will use + // the first partition of the disk for its root filesystem. + optional bool boot = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether the disk will be auto-deleted when the instance + // is deleted (but not when the disk is detached from the instance). + optional bool auto_delete = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Any valid publicly visible licenses. + repeated string license = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the disk interface to use for attaching this disk. + optional DiskInterface disk_interface = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of features to enable on the guest operating system. + // Applicable only for bootable images. + repeated GuestOsFeature guest_os_feature = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts or decrypts a disk using a customer-supplied + // encryption key. + optional CustomerEncryptionKey disk_encryption_key = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The size of the disk in GB. + optional int64 disk_size_gb = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output only. The state of the disk. + optional DiskSavedState saved_state = 17 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Output only. The URI of the disk type resource. For example: + // projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + optional string disk_type = 18 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Specifies the type of the disk. + optional DiskType type = 19 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/bindingmatchingresource.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/bindingmatchingresource.proto new file mode 100644 index 000000000000..076ed92fb0ee --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/bindingmatchingresource.proto @@ -0,0 +1,181 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BindingMatchingResourceProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// Request message for getting a BindingMatchingResource. +message GetBindingMatchingResourceRequest { + // Required. The name of the matching resource to retrieve. + // Format: + // projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BindingMatchingResource" + } + ]; +} + +// Request message for List BindingMatchingResources. +message ListBindingMatchingResourcesRequest { + // Required. The project, location, auto protection policy and binding for + // which to retrieve `BindingMatchingResources` information. Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}`. + // In Google Cloud Backup and DR, locations map to Google Cloud regions, for + // example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BindingMatchingResource" + } + ]; + + // Optional. The maximum number of `BindingMatchingResources` to return in a + // single response. The default page size is 100 and maximum page size is 200. + // Note that the response may include a partial list and a caller should + // only rely on the response's + // [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of + // [next_page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse.next_page_token] + // received from a previous `ListBindingMatchingResources` call. Provide this + // to retrieve the subsequent page in a multi-page list of results. When + // paginating, all other parameters provided to `ListBindingMatchingResources` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field match expression used to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field by which to sort the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for getting a list of `BindingMatchingResources`. +message ListBindingMatchingResourcesResponse { + // The list of `BindingMatchingResources` in the project,location for the + // specified binding. + repeated BindingMatchingResource matching_resources = 1; + + // A token which may be sent as + // [page_token][google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest.page_token] + // in a subsequent `ListBindingMatchingResources` call to retrieve the next + // page of results. If this field is omitted or empty, then there are no more + // results to return. + string next_page_token = 2; +} + +// BindingMatchingResource contains the details of a resource that matches the +// criteria of a binding. +message BindingMatchingResource { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BindingMatchingResource" + pattern: "projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}" + plural: "bindingMatchingResources" + singular: "bindingMatchingResource" + }; + + // Identifier. The resource name of the `BindingMatchingResource`. + // Format: + // `projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Immutable. Resource name of the workload that matches the + // criteria of the binding. + // + // The format can be either a relative resource name (e.g., + // `projects/my-project/zones/us-central1-a/instances/my-instance`) or a + // schemeless full resource name (e.g., + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`). + string resource = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The timestamp when the resource was last evaluated for + // protection. + google.protobuf.Timestamp last_evaluation_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The auto protection details of the resource from the current + // binding's perspective. + AutoProtectionDetails auto_protection_details = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AutoProtectionDetails contains the protection details of a resource from the +// current binding's perspective. +message AutoProtectionDetails { + // Enum for protection state of the resource. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // Resource is protected. + PROTECTED = 1; + + // Resource protection failed. + PROTECTION_FAILED = 2; + + // Resource is being unprotected. + UNPROTECTING = 3; + + // Resource unprotection failed. + UNPROTECTION_FAILED = 4; + } + + // Output only. Protection state of the resource from the current binding's + // perspective. Output only. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource name of backup plan association linked to the + // resource, if any. Format: + // projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} + string backup_plan_association = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Output only. Resource name of the datasource linked to the resource, if + // any. Format: + // projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{dataSourceId} + string data_source = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Output only. Error during last sync for protection/unprotection, if any. + google.rpc.Status error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/datasourcereference.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/datasourcereference.proto new file mode 100644 index 000000000000..ff4a391e7f80 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/datasourcereference.proto @@ -0,0 +1,255 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1beta/backupvault.proto"; +import "google/cloud/backupdr/v1beta/backupvault_alloydb.proto"; +import "google/cloud/backupdr/v1beta/backupvault_cloudsql.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "DataSourceReferenceProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// DataSourceReference is a reference to a DataSource resource. +message DataSourceReference { + option (google.api.resource) = { + type: "backupdr.googleapis.com/DataSourceReference" + pattern: "projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}" + plural: "dataSourceReferences" + singular: "dataSourceReference" + }; + + // Identifier. The resource name of the DataSourceReference. + // Format: + // projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The resource name of the DataSource. + // Format: + // projects/{project}/locations/{location}/backupVaults/{backupVault}/dataSources/{dataSource} + string data_source = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Output only. The time when the DataSourceReference was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The backup configuration state of the DataSource. + BackupConfigState data_source_backup_config_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of backups in the DataSource. + int64 data_source_backup_count = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information of backup configuration on the DataSource. + DataSourceBackupConfigInfo data_source_backup_config_info = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Google Cloud resource that the DataSource is associated + // with. + DataSourceGcpResourceInfo data_source_gcp_resource_info = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total size of the storage used by all backup resources for the + // referenced datasource. + optional int64 total_stored_bytes = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Information of backup configuration on the DataSource. +message DataSourceBackupConfigInfo { + // Output only. The status of the last backup in this DataSource + BackupConfigInfo.LastBackupState last_backup_state = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the last successful backup to this DataSource. + google.protobuf.Timestamp last_successful_backup_consistency_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The Google Cloud resource that the DataSource is associated with. +message DataSourceGcpResourceInfo { + // The properties of the Google Cloud resource. + oneof resource_properties { + // Output only. The properties of the Cloud SQL instance. + CloudSqlInstanceDataSourceReferenceProperties + cloud_sql_instance_properties = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The properties of the AlloyDB cluster. + AlloyDBClusterDataSourceReferenceProperties alloy_db_cluster_properties = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The resource name of the Google Cloud resource. + // Ex: projects/{project}/zones/{zone}/instances/{instance} + string gcp_resourcename = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the Google Cloud resource. + // Ex: compute.googleapis.com/Instance + string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location of the Google Cloud resource. + // Ex: //"global"/"unspecified" + string location = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for the GetDataSourceReference method. +message GetDataSourceReferenceRequest { + // Required. The name of the DataSourceReference to retrieve. + // Format: + // projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSourceReference" + } + ]; +} + +// Request for the ListDataSourceReferences method. +message ListDataSourceReferencesRequest { + // Required. The parent resource name. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSourceReference" + } + ]; + + // Optional. The maximum number of DataSourceReferences to return. The service + // may return fewer than this value. If unspecified, at most 50 + // DataSourceReferences will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListDataSourceReferences` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDataSourceReferences` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results listed in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. + // + // The following field and operator combinations are supported: + // + // * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=` + // * data_source_gcp_resource_info.type with `=`, `!=` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // + // * data_source + // * data_source_gcp_resource_info.gcp_resourcename + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the ListDataSourceReferences method. +message ListDataSourceReferencesResponse { + // The DataSourceReferences from the specified parent. + repeated DataSourceReference data_source_references = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for the FetchDataSourceReferencesForResourceType method. +message FetchDataSourceReferencesForResourceTypeRequest { + // Required. The parent resource name. + // Format: projects/{project}/locations/{location} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSourceReference" + } + ]; + + // Required. The type of the Google Cloud resource. + // Ex: sql.googleapis.com/Instance + string resource_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of DataSourceReferences to return. The service + // may return fewer than this value. If unspecified, at most 50 + // DataSourceReferences will be returned. The maximum value is 100; values + // above 100 will be coerced to 100. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous call of + // `FetchDataSourceReferencesForResourceType`. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `FetchDataSourceReferencesForResourceType` must match + // the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter expression that filters the results fetched in the + // response. The expression must specify the field name, a comparison + // operator, and the value that you want to use for filtering. Supported + // fields: + // * data_source + // * data_source_gcp_resource_info.gcp_resourcename + // * data_source_backup_config_state + // * data_source_backup_count + // * data_source_backup_config_info.last_backup_state + // * data_source_gcp_resource_info.gcp_resourcename + // * data_source_gcp_resource_info.type + // * data_source_gcp_resource_info.location + // * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A comma-separated list of fields to order by, sorted in ascending + // order. Use "desc" after a field name for descending. + // + // Supported fields: + // * name + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the FetchDataSourceReferencesForResourceType method. +message FetchDataSourceReferencesForResourceTypeResponse { + // The DataSourceReferences from the specified parent. + repeated DataSourceReference data_source_references = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/protection_summary.proto b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/protection_summary.proto new file mode 100644 index 000000000000..48980ea53f91 --- /dev/null +++ b/java-backupdr/proto-google-cloud-backupdr-v1beta/src/main/proto/google/cloud/backupdr/v1beta/protection_summary.proto @@ -0,0 +1,324 @@ +// Copyright 2026 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.backupdr.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1Beta"; +option go_package = "cloud.google.com/go/backupdr/apiv1beta/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "ProtectionSummaryProto"; +option java_package = "com.google.cloud.backupdr.v1beta"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1beta"; +option ruby_package = "Google::Cloud::BackupDR::V1beta"; + +// The Protection Summary service. +service BackupDrProtectionSummary { + option (google.api.default_host) = "backupdr.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-backupdr," + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ResourceBackupConfigs. + rpc ListResourceBackupConfigs(ListResourceBackupConfigsRequest) + returns (ListResourceBackupConfigsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/resourceBackupConfigs" + }; + option (google.api.method_signature) = "parent"; + } + +} + +// Request for ListResourceBackupConfigs. +message ListResourceBackupConfigsRequest { + // Required. The project and location for which to retrieve resource backup + // configs. Format: 'projects/{project_id}/locations/{location}'. In Google + // Cloud Backup and DR, locations map to Google Cloud regions, for example + // **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will use 100 as default. Maximum value is + // 500 and values above 500 will be coerced to 500. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for ListResourceBackupConfigs. +message ListResourceBackupConfigsResponse { + // The list of ResourceBackupConfigs for the specified scope. + repeated ResourceBackupConfig resource_backup_configs = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; +} + +// ResourceBackupConfig represents a resource along with its backup +// configurations. +message ResourceBackupConfig { + option (google.api.resource) = { + type: "backupdr.googleapis.com/ResourceBackupConfig" + pattern: "projects/{project}/locations/{location}/resourceBackupConfigs/{resource_backup_config}" + plural: "resourceBackupConfigs" + singular: "resourceBackupConfig" + }; + + // The type of the cloud resource. + enum ResourceType { + // Resource type not set. + RESOURCE_TYPE_UNSPECIFIED = 0; + + // Cloud SQL instance. + CLOUD_SQL_INSTANCE = 1; + + // Compute Engine VM. + COMPUTE_ENGINE_VM = 2; + + // Compute Engine Disk. + COMPUTE_ENGINE_DISK = 3; + + // Compute Engine Regional Disk. + COMPUTE_ENGINE_REGIONAL_DISK = 4; + } + + // Identifier. The resource name of the ResourceBackupConfig. + // Format: + // projects/{project}/locations/{location}/resourceBackupConfigs/{uid} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The unique identifier of the resource backup config. + string uid = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the cloud resource that this configuration applies to. Supported + // resource types are + // [ResourceBackupConfig.ResourceType][google.cloud.backupdr.v1beta.ResourceBackupConfig.ResourceType]. + string target_resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The human friendly name of the target resource. + string target_resource_display_name = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the target resource. + ResourceType target_resource_type = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Labels associated with the target resource. + map target_resource_labels = 6; + + // Backup configurations applying to the target resource, including those + // targeting its related/child resources. For example, backup configuration + // applicable to Compute Engine disks will be populated in this field for a + // Compute Engine VM which has the disk associated. + repeated BackupConfigDetails backup_configs_details = 7; + + // Output only. Whether the target resource is configured for backup. This is + // true if the backup_configs_details is not empty. + bool backup_configured = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the target resource is protected by a backup vault. + // This is true if the backup_configs_details is not empty and any of the + // [ResourceBackupConfig.backup_configs_details][google.cloud.backupdr.v1beta.ResourceBackupConfig.backup_configs_details] + // has a backup configuration with + // [BackupConfigDetails.backup_vault][google.cloud.backupdr.v1beta.BackupConfigDetails.backup_vault] + // set. + bool vaulted = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupConfigDetails has information about how the resource is configured +// for backups and about the most recent backup taken for this configuration. +message BackupConfigDetails { + // Type of the backup configuration. + // This enum may receive new values in the future. + enum Type { + // Backup config type is unspecified. + TYPE_UNSPECIFIED = 0; + + // Backup config is Cloud SQL instance's automated backup config. + CLOUD_SQL_INSTANCE_BACKUP_CONFIG = 1; + + // Backup config is Compute Engine Resource Policy. + COMPUTE_ENGINE_RESOURCE_POLICY = 2; + + // Backup config is Google Cloud Backup and DR's Backup Plan. + BACKUPDR_BACKUP_PLAN = 3; + + // Backup config is Google Cloud Backup and DR's Template. + BACKUPDR_TEMPLATE = 4; + } + + // The state tells whether the backup config is active or not. + enum State { + // Backup config state not set. + STATE_UNSPECIFIED = 0; + + // The config is in an active state protecting the resource + ACTIVE = 1; + + // The config is currently not protecting the resource. Either because it is + // disabled or the owning project has been deleted without cleanup of the + // actual resource. + INACTIVE = 2; + + // The config still exists but because of some error state it is not + // protecting the resource. Like the source project is deleted. For eg. + // PlanAssociation, BackupPlan is deleted. + ERROR = 3; + } + + // The plan specific config. This depends on the value of + // [BackupConfigDetails.type][google.cloud.backupdr.v1beta.BackupConfigDetails.type]. + // For type=BACKUPDR_BACKUP_PLAN, backup_dr_plan_config would be populated to + // capture information related to Google Cloud Backup and DR's Backup Plans. + // For type=BACKUPDR_TEMPLATE, backup_dr_template_config would be populated to + // capture information related to Google Cloud Backup and DR's Template + // details. + oneof plan_specific_config { + // Google Cloud Backup and DR's Backup Plan specific data. + BackupDrPlanConfig backup_dr_plan_config = 10; + + // Google Cloud Backup and DR's Template specific data. + BackupDrTemplateConfig backup_dr_template_config = 11; + } + + // Output only. The full resource name of the backup config source resource. + // For example, + // "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupPlans/{backupplanId}" + // or + // "//compute.googleapis.com/projects/{project}/locations/{region}/resourcePolicies/{resourcePolicyId}". + string backup_config_source = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name of the backup config source resource. + string backup_config_source_display_name = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the backup config resource. + Type type = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of the backup config resource. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Point in time recovery settings of the backup configuration + // resource. + PitrSettings pitr_settings = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the latest successful backup created via this + // backup configuration. + google.protobuf.Timestamp latest_successful_backup_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the resource that is applicable for the backup configuration. Example: + // "//compute.googleapis.com/projects/{project}/zones/{zone}/instances/{instance}" + string applicable_resource = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the backup vault that will store the backups generated through this + // backup configuration. Example: + // "//backupdr.googleapis.com/v1/projects/{project}/locations/{region}/backupVaults/{backupvaultId}" + string backup_vault = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The locations where the backups are to be stored. + repeated BackupLocation backup_locations = 12; +} + +// Point in time recovery settings of the backup configuration resource. +message PitrSettings { + // Output only. Number of days to retain the backup. + int32 retention_days = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Provides additional information about Google Cloud Backup and DR's Template +// backup configuration. +message BackupDrTemplateConfig { + // Output only. The URI of the BackupDr template resource for the first party + // identity users. + string first_party_management_uri = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URI of the BackupDr template resource for the third party + // identity users. + string third_party_management_uri = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupDrPlanConfig has additional information about Google Cloud Backup and +// DR's Plan backup configuration. +message BackupDrPlanConfig { + // Backup rules of the backup plan resource. + repeated BackupDrPlanRule backup_dr_plan_rules = 1; +} + +// BackupDrPlanRule has rule specific information of the backup plan resource. +message BackupDrPlanRule { + // Output only. Unique Id of the backup rule. + string rule_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of the latest successful backup created via this + // backup rule. + google.protobuf.Timestamp last_successful_backup_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupLocation represents a cloud location where a backup can be stored. +message BackupLocation { + // The type of the location. + enum Type { + // Location type is unspecified. + TYPE_UNSPECIFIED = 0; + + // Location type is zonal. + ZONAL = 1; + + // Location type is regional. + REGIONAL = 2; + + // Location type is multi regional. + MULTI_REGIONAL = 3; + } + + // Output only. The type of the location. + Type type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The id of the cloud location. Example: "us-central1" + string location_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateSetCredentialsProvider.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..18c2a4b86f00 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupDRSettings; +import com.google.cloud.backupdr.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + BackupDRSettings backupDRSettings = + BackupDRSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings); + } +} +// [END backupdr_v1beta_generated_BackupDR_Create_SetCredentialsProvider_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateSetEndpoint.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..6790a77ca125 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_Create_SetEndpoint_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupDRSettings; +import com.google.cloud.backupdr.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + BackupDRSettings backupDRSettings = + BackupDRSettings.newBuilder().setEndpoint(myEndpoint).build(); + BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings); + } +} +// [END backupdr_v1beta_generated_BackupDR_Create_SetEndpoint_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateUseHttpJsonTransport.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..b171dd279a79 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,39 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_Create_UseHttpJsonTransport_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupDRSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + BackupDRSettings backupDRSettings = BackupDRSettings.newHttpJsonBuilder().build(); + BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings); + } +} +// [END backupdr_v1beta_generated_BackupDR_Create_UseHttpJsonTransport_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/AsyncCreateAutoProtectionPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/AsyncCreateAutoProtectionPolicy.java new file mode 100644 index 000000000000..13ea73764336 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/AsyncCreateAutoProtectionPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateAutoProtectionPolicy { + + public static void main(String[] args) throws Exception { + asyncCreateAutoProtectionPolicy(); + } + + public static void asyncCreateAutoProtectionPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateAutoProtectionPolicyRequest request = + CreateAutoProtectionPolicyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAutoProtectionPolicyId("autoProtectionPolicyId1759243253") + .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build()) + .build(); + ApiFuture future = + backupDRClient.createAutoProtectionPolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/AsyncCreateAutoProtectionPolicyLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/AsyncCreateAutoProtectionPolicyLRO.java new file mode 100644 index 000000000000..1bbca74d14c7 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/AsyncCreateAutoProtectionPolicyLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.OperationMetadata; + +public class AsyncCreateAutoProtectionPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncCreateAutoProtectionPolicyLRO(); + } + + public static void asyncCreateAutoProtectionPolicyLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateAutoProtectionPolicyRequest request = + CreateAutoProtectionPolicyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAutoProtectionPolicyId("autoProtectionPolicyId1759243253") + .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build()) + .build(); + OperationFuture future = + backupDRClient.createAutoProtectionPolicyOperationCallable().futureCall(request); + // Do something. + AutoProtectionPolicy response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicy.java new file mode 100644 index 000000000000..5f2cf9cc2843 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateAutoProtectionPolicy { + + public static void main(String[] args) throws Exception { + syncCreateAutoProtectionPolicy(); + } + + public static void syncCreateAutoProtectionPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateAutoProtectionPolicyRequest request = + CreateAutoProtectionPolicyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAutoProtectionPolicyId("autoProtectionPolicyId1759243253") + .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build()) + .build(); + AutoProtectionPolicy response = backupDRClient.createAutoProtectionPolicyAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicyLocationnameAutoprotectionpolicyString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicyLocationnameAutoprotectionpolicyString.java new file mode 100644 index 000000000000..c5262632265c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicyLocationnameAutoprotectionpolicyString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_LocationnameAutoprotectionpolicyString_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateAutoProtectionPolicyLocationnameAutoprotectionpolicyString { + + public static void main(String[] args) throws Exception { + syncCreateAutoProtectionPolicyLocationnameAutoprotectionpolicyString(); + } + + public static void syncCreateAutoProtectionPolicyLocationnameAutoprotectionpolicyString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + AutoProtectionPolicy response = + backupDRClient + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_LocationnameAutoprotectionpolicyString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicyStringAutoprotectionpolicyString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicyStringAutoprotectionpolicyString.java new file mode 100644 index 000000000000..8e6ce0df327d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicy/SyncCreateAutoProtectionPolicyStringAutoprotectionpolicyString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_StringAutoprotectionpolicyString_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateAutoProtectionPolicyStringAutoprotectionpolicyString { + + public static void main(String[] args) throws Exception { + syncCreateAutoProtectionPolicyStringAutoprotectionpolicyString(); + } + + public static void syncCreateAutoProtectionPolicyStringAutoprotectionpolicyString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + String autoProtectionPolicyId = "autoProtectionPolicyId1759243253"; + AutoProtectionPolicy response = + backupDRClient + .createAutoProtectionPolicyAsync(parent, autoProtectionPolicy, autoProtectionPolicyId) + .get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicy_StringAutoprotectionpolicyString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/AsyncCreateAutoProtectionPolicyBinding.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/AsyncCreateAutoProtectionPolicyBinding.java new file mode 100644 index 000000000000..53b9e6596ae1 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/AsyncCreateAutoProtectionPolicyBinding.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; +import com.google.longrunning.Operation; + +public class AsyncCreateAutoProtectionPolicyBinding { + + public static void main(String[] args) throws Exception { + asyncCreateAutoProtectionPolicyBinding(); + } + + public static void asyncCreateAutoProtectionPolicyBinding() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateAutoProtectionPolicyBindingRequest request = + CreateAutoProtectionPolicyBindingRequest.newBuilder() + .setParent( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setAutoProtectionPolicyBindingId("autoProtectionPolicyBindingId2122957414") + .setAutoProtectionPolicyBinding(AutoProtectionPolicyBinding.newBuilder().build()) + .build(); + ApiFuture future = + backupDRClient.createAutoProtectionPolicyBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/AsyncCreateAutoProtectionPolicyBindingLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/AsyncCreateAutoProtectionPolicyBindingLRO.java new file mode 100644 index 000000000000..352c67d3a3f4 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/AsyncCreateAutoProtectionPolicyBindingLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.OperationMetadata; + +public class AsyncCreateAutoProtectionPolicyBindingLRO { + + public static void main(String[] args) throws Exception { + asyncCreateAutoProtectionPolicyBindingLRO(); + } + + public static void asyncCreateAutoProtectionPolicyBindingLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateAutoProtectionPolicyBindingRequest request = + CreateAutoProtectionPolicyBindingRequest.newBuilder() + .setParent( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setAutoProtectionPolicyBindingId("autoProtectionPolicyBindingId2122957414") + .setAutoProtectionPolicyBinding(AutoProtectionPolicyBinding.newBuilder().build()) + .build(); + OperationFuture future = + backupDRClient.createAutoProtectionPolicyBindingOperationCallable().futureCall(request); + // Do something. + AutoProtectionPolicyBinding response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBinding.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBinding.java new file mode 100644 index 000000000000..058e525b3375 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBinding.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateAutoProtectionPolicyBindingRequest; + +public class SyncCreateAutoProtectionPolicyBinding { + + public static void main(String[] args) throws Exception { + syncCreateAutoProtectionPolicyBinding(); + } + + public static void syncCreateAutoProtectionPolicyBinding() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateAutoProtectionPolicyBindingRequest request = + CreateAutoProtectionPolicyBindingRequest.newBuilder() + .setParent( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setAutoProtectionPolicyBindingId("autoProtectionPolicyBindingId2122957414") + .setAutoProtectionPolicyBinding(AutoProtectionPolicyBinding.newBuilder().build()) + .build(); + AutoProtectionPolicyBinding response = + backupDRClient.createAutoProtectionPolicyBindingAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBindingAutoprotectionpolicynameAutoprotectionpolicybindingString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBindingAutoprotectionpolicynameAutoprotectionpolicybindingString.java new file mode 100644 index 000000000000..391eda665d27 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBindingAutoprotectionpolicynameAutoprotectionpolicybindingString.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_AutoprotectionpolicynameAutoprotectionpolicybindingString_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public +class SyncCreateAutoProtectionPolicyBindingAutoprotectionpolicynameAutoprotectionpolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreateAutoProtectionPolicyBindingAutoprotectionpolicynameAutoprotectionpolicybindingString(); + } + + public static void + syncCreateAutoProtectionPolicyBindingAutoprotectionpolicynameAutoprotectionpolicybindingString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + AutoProtectionPolicyBinding response = + backupDRClient + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_AutoprotectionpolicynameAutoprotectionpolicybindingString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBindingStringAutoprotectionpolicybindingString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBindingStringAutoprotectionpolicybindingString.java new file mode 100644 index 000000000000..b035e04cc8af --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createautoprotectionpolicybinding/SyncCreateAutoProtectionPolicyBindingStringAutoprotectionpolicybindingString.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_StringAutoprotectionpolicybindingString_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncCreateAutoProtectionPolicyBindingStringAutoprotectionpolicybindingString { + + public static void main(String[] args) throws Exception { + syncCreateAutoProtectionPolicyBindingStringAutoprotectionpolicybindingString(); + } + + public static void syncCreateAutoProtectionPolicyBindingStringAutoprotectionpolicybindingString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString(); + AutoProtectionPolicyBinding autoProtectionPolicyBinding = + AutoProtectionPolicyBinding.newBuilder().build(); + String autoProtectionPolicyBindingId = "autoProtectionPolicyBindingId2122957414"; + AutoProtectionPolicyBinding response = + backupDRClient + .createAutoProtectionPolicyBindingAsync( + parent, autoProtectionPolicyBinding, autoProtectionPolicyBindingId) + .get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateAutoProtectionPolicyBinding_StringAutoprotectionpolicybindingString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/AsyncCreateBackupPlan.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/AsyncCreateBackupPlan.java new file mode 100644 index 000000000000..a9594ee2e208 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/AsyncCreateBackupPlan.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlan_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateBackupPlan { + + public static void main(String[] args) throws Exception { + asyncCreateBackupPlan(); + } + + public static void asyncCreateBackupPlan() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupPlanRequest request = + CreateBackupPlanRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPlanId("backupPlanId-84871546") + .setBackupPlan(BackupPlan.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backupDRClient.createBackupPlanCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlan_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/AsyncCreateBackupPlanLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/AsyncCreateBackupPlanLRO.java new file mode 100644 index 000000000000..85d2d02d502c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/AsyncCreateBackupPlanLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlan_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.OperationMetadata; + +public class AsyncCreateBackupPlanLRO { + + public static void main(String[] args) throws Exception { + asyncCreateBackupPlanLRO(); + } + + public static void asyncCreateBackupPlanLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupPlanRequest request = + CreateBackupPlanRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPlanId("backupPlanId-84871546") + .setBackupPlan(BackupPlan.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.createBackupPlanOperationCallable().futureCall(request); + // Do something. + BackupPlan response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlan_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlan.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlan.java new file mode 100644 index 000000000000..e915066e172d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlan.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlan_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateBackupPlan { + + public static void main(String[] args) throws Exception { + syncCreateBackupPlan(); + } + + public static void syncCreateBackupPlan() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupPlanRequest request = + CreateBackupPlanRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPlanId("backupPlanId-84871546") + .setBackupPlan(BackupPlan.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + BackupPlan response = backupDRClient.createBackupPlanAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlan_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlanLocationnameBackupplanString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlanLocationnameBackupplanString.java new file mode 100644 index 000000000000..d8b45cdf1a9f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlanLocationnameBackupplanString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlan_LocationnameBackupplanString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateBackupPlanLocationnameBackupplanString { + + public static void main(String[] args) throws Exception { + syncCreateBackupPlanLocationnameBackupplanString(); + } + + public static void syncCreateBackupPlanLocationnameBackupplanString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + BackupPlan response = + backupDRClient.createBackupPlanAsync(parent, backupPlan, backupPlanId).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlan_LocationnameBackupplanString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlanStringBackupplanString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlanStringBackupplanString.java new file mode 100644 index 000000000000..32d495bf9439 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplan/SyncCreateBackupPlanStringBackupplanString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlan_StringBackupplanString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateBackupPlanStringBackupplanString { + + public static void main(String[] args) throws Exception { + syncCreateBackupPlanStringBackupplanString(); + } + + public static void syncCreateBackupPlanStringBackupplanString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + String backupPlanId = "backupPlanId-84871546"; + BackupPlan response = + backupDRClient.createBackupPlanAsync(parent, backupPlan, backupPlanId).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlan_StringBackupplanString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/AsyncCreateBackupPlanAssociation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/AsyncCreateBackupPlanAssociation.java new file mode 100644 index 000000000000..f60964cd0779 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/AsyncCreateBackupPlanAssociation.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateBackupPlanAssociation { + + public static void main(String[] args) throws Exception { + asyncCreateBackupPlanAssociation(); + } + + public static void asyncCreateBackupPlanAssociation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupPlanAssociationRequest request = + CreateBackupPlanAssociationRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPlanAssociationId("backupPlanAssociationId567762737") + .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + backupDRClient.createBackupPlanAssociationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/AsyncCreateBackupPlanAssociationLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/AsyncCreateBackupPlanAssociationLRO.java new file mode 100644 index 000000000000..8ef761d98938 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/AsyncCreateBackupPlanAssociationLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.OperationMetadata; + +public class AsyncCreateBackupPlanAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncCreateBackupPlanAssociationLRO(); + } + + public static void asyncCreateBackupPlanAssociationLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupPlanAssociationRequest request = + CreateBackupPlanAssociationRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPlanAssociationId("backupPlanAssociationId567762737") + .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.createBackupPlanAssociationOperationCallable().futureCall(request); + // Do something. + BackupPlanAssociation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociation.java new file mode 100644 index 000000000000..f97fae942b5d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.CreateBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateBackupPlanAssociation { + + public static void main(String[] args) throws Exception { + syncCreateBackupPlanAssociation(); + } + + public static void syncCreateBackupPlanAssociation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupPlanAssociationRequest request = + CreateBackupPlanAssociationRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupPlanAssociationId("backupPlanAssociationId567762737") + .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + BackupPlanAssociation response = + backupDRClient.createBackupPlanAssociationAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociationLocationnameBackupplanassociationString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociationLocationnameBackupplanassociationString.java new file mode 100644 index 000000000000..2416bee18fb0 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociationLocationnameBackupplanassociationString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_LocationnameBackupplanassociationString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateBackupPlanAssociationLocationnameBackupplanassociationString { + + public static void main(String[] args) throws Exception { + syncCreateBackupPlanAssociationLocationnameBackupplanassociationString(); + } + + public static void syncCreateBackupPlanAssociationLocationnameBackupplanassociationString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + BackupPlanAssociation response = + backupDRClient + .createBackupPlanAssociationAsync( + parent, backupPlanAssociation, backupPlanAssociationId) + .get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_LocationnameBackupplanassociationString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociationStringBackupplanassociationString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociationStringBackupplanassociationString.java new file mode 100644 index 000000000000..4e998c7e8069 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupplanassociation/SyncCreateBackupPlanAssociationStringBackupplanassociationString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_StringBackupplanassociationString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncCreateBackupPlanAssociationStringBackupplanassociationString { + + public static void main(String[] args) throws Exception { + syncCreateBackupPlanAssociationStringBackupplanassociationString(); + } + + public static void syncCreateBackupPlanAssociationStringBackupplanassociationString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + String backupPlanAssociationId = "backupPlanAssociationId567762737"; + BackupPlanAssociation response = + backupDRClient + .createBackupPlanAssociationAsync( + parent, backupPlanAssociation, backupPlanAssociationId) + .get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupPlanAssociation_StringBackupplanassociationString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/AsyncCreateBackupVault.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/AsyncCreateBackupVault.java new file mode 100644 index 000000000000..a7ae2daed65a --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/AsyncCreateBackupVault.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupVault_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupVaultRequest request = + CreateBackupVaultRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupVaultId("backupVaultId-1897432373") + .setBackupVault(BackupVault.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + ApiFuture future = backupDRClient.createBackupVaultCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupVault_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/AsyncCreateBackupVaultLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/AsyncCreateBackupVaultLRO.java new file mode 100644 index 000000000000..f2409106a3ad --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/AsyncCreateBackupVaultLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupVault_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupVaultRequest request = + CreateBackupVaultRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupVaultId("backupVaultId-1897432373") + .setBackupVault(BackupVault.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + OperationFuture future = + backupDRClient.createBackupVaultOperationCallable().futureCall(request); + // Do something. + BackupVault response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupVault_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVault.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVault.java new file mode 100644 index 000000000000..d8f17fd55251 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVault.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupVault_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.CreateBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateBackupVaultRequest request = + CreateBackupVaultRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setBackupVaultId("backupVaultId-1897432373") + .setBackupVault(BackupVault.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + BackupVault response = backupDRClient.createBackupVaultAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupVault_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVaultLocationnameBackupvaultString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVaultLocationnameBackupvaultString.java new file mode 100644 index 000000000000..d3212bdf7826 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVaultLocationnameBackupvaultString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupVault_LocationnameBackupvaultString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.LocationName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + BackupVault response = + backupDRClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupVault_LocationnameBackupvaultString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVaultStringBackupvaultString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVaultStringBackupvaultString.java new file mode 100644 index 000000000000..a8e0740c606b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createbackupvault/SyncCreateBackupVaultStringBackupvaultString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateBackupVault_StringBackupvaultString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.LocationName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + BackupVault backupVault = BackupVault.newBuilder().build(); + String backupVaultId = "backupVaultId-1897432373"; + BackupVault response = + backupDRClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateBackupVault_StringBackupvaultString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/AsyncCreateManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/AsyncCreateManagementServer.java new file mode 100644 index 000000000000..33ec2664092c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/AsyncCreateManagementServer.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateManagementServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateManagementServerRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.longrunning.Operation; + +public class AsyncCreateManagementServer { + + public static void main(String[] args) throws Exception { + asyncCreateManagementServer(); + } + + public static void asyncCreateManagementServer() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateManagementServerRequest request = + CreateManagementServerRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setManagementServerId("managementServerId-1229628127") + .setManagementServer(ManagementServer.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + backupDRClient.createManagementServerCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateManagementServer_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/AsyncCreateManagementServerLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/AsyncCreateManagementServerLRO.java new file mode 100644 index 000000000000..1ce509abec48 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/AsyncCreateManagementServerLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateManagementServer_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateManagementServerRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.OperationMetadata; + +public class AsyncCreateManagementServerLRO { + + public static void main(String[] args) throws Exception { + asyncCreateManagementServerLRO(); + } + + public static void asyncCreateManagementServerLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateManagementServerRequest request = + CreateManagementServerRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setManagementServerId("managementServerId-1229628127") + .setManagementServer(ManagementServer.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.createManagementServerOperationCallable().futureCall(request); + // Do something. + ManagementServer response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateManagementServer_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServer.java new file mode 100644 index 000000000000..a4339bb2f5f8 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServer.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateManagementServer_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.CreateManagementServerRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; + +public class SyncCreateManagementServer { + + public static void main(String[] args) throws Exception { + syncCreateManagementServer(); + } + + public static void syncCreateManagementServer() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + CreateManagementServerRequest request = + CreateManagementServerRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setManagementServerId("managementServerId-1229628127") + .setManagementServer(ManagementServer.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ManagementServer response = backupDRClient.createManagementServerAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateManagementServer_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServerLocationnameManagementserverString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServerLocationnameManagementserverString.java new file mode 100644 index 000000000000..0e4ec10db290 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServerLocationnameManagementserverString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateManagementServer_LocationnameManagementserverString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; + +public class SyncCreateManagementServerLocationnameManagementserverString { + + public static void main(String[] args) throws Exception { + syncCreateManagementServerLocationnameManagementserverString(); + } + + public static void syncCreateManagementServerLocationnameManagementserverString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + ManagementServer response = + backupDRClient + .createManagementServerAsync(parent, managementServer, managementServerId) + .get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateManagementServer_LocationnameManagementserverString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServerStringManagementserverString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServerStringManagementserverString.java new file mode 100644 index 000000000000..884f5d493a91 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/createmanagementserver/SyncCreateManagementServerStringManagementserverString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_CreateManagementServer_StringManagementserverString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; + +public class SyncCreateManagementServerStringManagementserverString { + + public static void main(String[] args) throws Exception { + syncCreateManagementServerStringManagementserverString(); + } + + public static void syncCreateManagementServerStringManagementserverString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ManagementServer managementServer = ManagementServer.newBuilder().build(); + String managementServerId = "managementServerId-1229628127"; + ManagementServer response = + backupDRClient + .createManagementServerAsync(parent, managementServer, managementServerId) + .get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_CreateManagementServer_StringManagementserverString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/AsyncDeleteAutoProtectionPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/AsyncDeleteAutoProtectionPolicy.java new file mode 100644 index 000000000000..bf80dbe435f9 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/AsyncDeleteAutoProtectionPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteAutoProtectionPolicy { + + public static void main(String[] args) throws Exception { + asyncDeleteAutoProtectionPolicy(); + } + + public static void asyncDeleteAutoProtectionPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteAutoProtectionPolicyRequest request = + DeleteAutoProtectionPolicyRequest.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setEtag("etag3123477") + .build(); + ApiFuture future = + backupDRClient.deleteAutoProtectionPolicyCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/AsyncDeleteAutoProtectionPolicyLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/AsyncDeleteAutoProtectionPolicyLRO.java new file mode 100644 index 000000000000..1cf8ff8f6f05 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/AsyncDeleteAutoProtectionPolicyLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteAutoProtectionPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteAutoProtectionPolicyLRO(); + } + + public static void asyncDeleteAutoProtectionPolicyLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteAutoProtectionPolicyRequest request = + DeleteAutoProtectionPolicyRequest.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setEtag("etag3123477") + .build(); + OperationFuture future = + backupDRClient.deleteAutoProtectionPolicyOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicy.java new file mode 100644 index 000000000000..b2f9e8bb086e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DeleteAutoProtectionPolicyRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteAutoProtectionPolicy { + + public static void main(String[] args) throws Exception { + syncDeleteAutoProtectionPolicy(); + } + + public static void syncDeleteAutoProtectionPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteAutoProtectionPolicyRequest request = + DeleteAutoProtectionPolicyRequest.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setEtag("etag3123477") + .build(); + backupDRClient.deleteAutoProtectionPolicyAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicyAutoprotectionpolicyname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicyAutoprotectionpolicyname.java new file mode 100644 index 000000000000..2c6b1672f865 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicyAutoprotectionpolicyname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_Autoprotectionpolicyname_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAutoProtectionPolicyAutoprotectionpolicyname { + + public static void main(String[] args) throws Exception { + syncDeleteAutoProtectionPolicyAutoprotectionpolicyname(); + } + + public static void syncDeleteAutoProtectionPolicyAutoprotectionpolicyname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + backupDRClient.deleteAutoProtectionPolicyAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_Autoprotectionpolicyname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicyString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicyString.java new file mode 100644 index 000000000000..e29529b7b547 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deleteautoprotectionpolicy/SyncDeleteAutoProtectionPolicyString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_String_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAutoProtectionPolicyString { + + public static void main(String[] args) throws Exception { + syncDeleteAutoProtectionPolicyString(); + } + + public static void syncDeleteAutoProtectionPolicyString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString(); + backupDRClient.deleteAutoProtectionPolicyAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteAutoProtectionPolicy_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/AsyncDeleteBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/AsyncDeleteBackup.java new file mode 100644 index 000000000000..f9e99754c261 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/AsyncDeleteBackup.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.DeleteBackupRequest; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backupDRClient.deleteBackupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackup_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/AsyncDeleteBackupLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/AsyncDeleteBackupLRO.java new file mode 100644 index 000000000000..831354137b22 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/AsyncDeleteBackupLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.DeleteBackupRequest; +import com.google.cloud.backupdr.v1beta.OperationMetadata; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.deleteBackupOperationCallable().futureCall(request); + // Do something. + Backup response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackup_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackup.java new file mode 100644 index 000000000000..b6ee334de85b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackup.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackup_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.DeleteBackupRequest; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupRequest request = + DeleteBackupRequest.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setRequestId("requestId693933066") + .build(); + Backup response = backupDRClient.deleteBackupAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackup_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackupBackupname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackupBackupname.java new file mode 100644 index 000000000000..9e844eb4ff30 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackupBackupname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackup_Backupname_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + Backup response = backupDRClient.deleteBackupAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackup_Backupname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackupString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackupString.java new file mode 100644 index 000000000000..e7cbe7026547 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackup/SyncDeleteBackupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackup_String_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString(); + Backup response = backupDRClient.deleteBackupAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackup_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/AsyncDeleteBackupPlan.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/AsyncDeleteBackupPlan.java new file mode 100644 index 000000000000..5134463339a4 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/AsyncDeleteBackupPlan.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteBackupPlan { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupPlan(); + } + + public static void asyncDeleteBackupPlan() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupPlanRequest request = + DeleteBackupPlanRequest.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backupDRClient.deleteBackupPlanCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/AsyncDeleteBackupPlanLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/AsyncDeleteBackupPlanLRO.java new file mode 100644 index 000000000000..bedcd3973f3b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/AsyncDeleteBackupPlanLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteBackupPlanLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupPlanLRO(); + } + + public static void asyncDeleteBackupPlanLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupPlanRequest request = + DeleteBackupPlanRequest.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.deleteBackupPlanOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlan.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlan.java new file mode 100644 index 000000000000..944abc57bf3e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlan.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPlan { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPlan(); + } + + public static void syncDeleteBackupPlan() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupPlanRequest request = + DeleteBackupPlanRequest.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setRequestId("requestId693933066") + .build(); + backupDRClient.deleteBackupPlanAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlanBackupplanname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlanBackupplanname.java new file mode 100644 index 000000000000..142b641a06e7 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlanBackupplanname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_Backupplanname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPlanBackupplanname { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPlanBackupplanname(); + } + + public static void syncDeleteBackupPlanBackupplanname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + backupDRClient.deleteBackupPlanAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_Backupplanname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlanString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlanString.java new file mode 100644 index 000000000000..fedbf135e925 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplan/SyncDeleteBackupPlanString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPlanString { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPlanString(); + } + + public static void syncDeleteBackupPlanString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString(); + backupDRClient.deleteBackupPlanAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlan_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/AsyncDeleteBackupPlanAssociation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/AsyncDeleteBackupPlanAssociation.java new file mode 100644 index 000000000000..83251e3f4324 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/AsyncDeleteBackupPlanAssociation.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteBackupPlanAssociation { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupPlanAssociation(); + } + + public static void asyncDeleteBackupPlanAssociation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupPlanAssociationRequest request = + DeleteBackupPlanAssociationRequest.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setRequestId("requestId693933066") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.deleteBackupPlanAssociationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/AsyncDeleteBackupPlanAssociationLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/AsyncDeleteBackupPlanAssociationLRO.java new file mode 100644 index 000000000000..1c77977954b6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/AsyncDeleteBackupPlanAssociationLRO.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteBackupPlanAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteBackupPlanAssociationLRO(); + } + + public static void asyncDeleteBackupPlanAssociationLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupPlanAssociationRequest request = + DeleteBackupPlanAssociationRequest.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setRequestId("requestId693933066") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + OperationFuture future = + backupDRClient.deleteBackupPlanAssociationOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociation.java new file mode 100644 index 000000000000..fb62ad1dd55a --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociation.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.cloud.backupdr.v1beta.DeleteBackupPlanAssociationRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPlanAssociation { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPlanAssociation(); + } + + public static void syncDeleteBackupPlanAssociation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupPlanAssociationRequest request = + DeleteBackupPlanAssociationRequest.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setRequestId("requestId693933066") + .setAutoProtectionPolicyBinding( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + backupDRClient.deleteBackupPlanAssociationAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociationBackupplanassociationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociationBackupplanassociationname.java new file mode 100644 index 000000000000..9b868aeb3588 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociationBackupplanassociationname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_Backupplanassociationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPlanAssociationBackupplanassociationname { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPlanAssociationBackupplanassociationname(); + } + + public static void syncDeleteBackupPlanAssociationBackupplanassociationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + backupDRClient.deleteBackupPlanAssociationAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_Backupplanassociationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociationString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociationString.java new file mode 100644 index 000000000000..4f9c9aef12c0 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupplanassociation/SyncDeleteBackupPlanAssociationString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.protobuf.Empty; + +public class SyncDeleteBackupPlanAssociationString { + + public static void main(String[] args) throws Exception { + syncDeleteBackupPlanAssociationString(); + } + + public static void syncDeleteBackupPlanAssociationString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString(); + backupDRClient.deleteBackupPlanAssociationAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupPlanAssociation_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/AsyncDeleteBackupVault.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/AsyncDeleteBackupVault.java new file mode 100644 index 000000000000..02405d65a049 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/AsyncDeleteBackupVault.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupVault_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupVaultRequest request = + DeleteBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .setEtag("etag3123477") + .setValidateOnly(true) + .setAllowMissing(true) + .setIgnoreBackupPlanReferences(true) + .build(); + ApiFuture future = backupDRClient.deleteBackupVaultCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupVault_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/AsyncDeleteBackupVaultLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/AsyncDeleteBackupVaultLRO.java new file mode 100644 index 000000000000..01176368f83b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/AsyncDeleteBackupVaultLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupVault_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; +import com.google.cloud.backupdr.v1beta.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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupVaultRequest request = + DeleteBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .setEtag("etag3123477") + .setValidateOnly(true) + .setAllowMissing(true) + .setIgnoreBackupPlanReferences(true) + .build(); + OperationFuture future = + backupDRClient.deleteBackupVaultOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupVault_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVault.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVault.java new file mode 100644 index 000000000000..2c64fa708edb --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVault.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupVault_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.DeleteBackupVaultRequest; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteBackupVaultRequest request = + DeleteBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setRequestId("requestId693933066") + .setForce(true) + .setEtag("etag3123477") + .setValidateOnly(true) + .setAllowMissing(true) + .setIgnoreBackupPlanReferences(true) + .build(); + backupDRClient.deleteBackupVaultAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupVault_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVaultBackupvaultname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVaultBackupvaultname.java new file mode 100644 index 000000000000..168de69a615f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVaultBackupvaultname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupVault_Backupvaultname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + backupDRClient.deleteBackupVaultAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupVault_Backupvaultname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVaultString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVaultString.java new file mode 100644 index 000000000000..9aaa2ebc22fe --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletebackupvault/SyncDeleteBackupVaultString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteBackupVault_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString(); + backupDRClient.deleteBackupVaultAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteBackupVault_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/AsyncDeleteManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/AsyncDeleteManagementServer.java new file mode 100644 index 000000000000..9ca8f677af84 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/AsyncDeleteManagementServer.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteManagementServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.longrunning.Operation; + +public class AsyncDeleteManagementServer { + + public static void main(String[] args) throws Exception { + asyncDeleteManagementServer(); + } + + public static void asyncDeleteManagementServer() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteManagementServerRequest request = + DeleteManagementServerRequest.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + backupDRClient.deleteManagementServerCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteManagementServer_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/AsyncDeleteManagementServerLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/AsyncDeleteManagementServerLRO.java new file mode 100644 index 000000000000..0e8fb4380c4d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/AsyncDeleteManagementServerLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteManagementServer_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteManagementServerLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteManagementServerLRO(); + } + + public static void asyncDeleteManagementServerLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteManagementServerRequest request = + DeleteManagementServerRequest.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.deleteManagementServerOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteManagementServer_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServer.java new file mode 100644 index 000000000000..acbce8f91f0c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServer.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteManagementServer_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DeleteManagementServerRequest; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.protobuf.Empty; + +public class SyncDeleteManagementServer { + + public static void main(String[] args) throws Exception { + syncDeleteManagementServer(); + } + + public static void syncDeleteManagementServer() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DeleteManagementServerRequest request = + DeleteManagementServerRequest.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setRequestId("requestId693933066") + .build(); + backupDRClient.deleteManagementServerAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteManagementServer_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServerManagementservername.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServerManagementservername.java new file mode 100644 index 000000000000..408a11f40fc4 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServerManagementservername.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteManagementServer_Managementservername_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.protobuf.Empty; + +public class SyncDeleteManagementServerManagementservername { + + public static void main(String[] args) throws Exception { + syncDeleteManagementServerManagementservername(); + } + + public static void syncDeleteManagementServerManagementservername() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + backupDRClient.deleteManagementServerAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteManagementServer_Managementservername_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServerString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServerString.java new file mode 100644 index 000000000000..502c973bcce6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/deletemanagementserver/SyncDeleteManagementServerString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_DeleteManagementServer_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.protobuf.Empty; + +public class SyncDeleteManagementServerString { + + public static void main(String[] args) throws Exception { + syncDeleteManagementServerString(); + } + + public static void syncDeleteManagementServerString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString(); + backupDRClient.deleteManagementServerAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_DeleteManagementServer_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/AsyncFetchBackupPlanAssociationsForResourceType.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/AsyncFetchBackupPlanAssociationsForResourceType.java new file mode 100644 index 000000000000..b5463b6121ef --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/AsyncFetchBackupPlanAssociationsForResourceType.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class AsyncFetchBackupPlanAssociationsForResourceType { + + public static void main(String[] args) throws Exception { + asyncFetchBackupPlanAssociationsForResourceType(); + } + + public static void asyncFetchBackupPlanAssociationsForResourceType() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchBackupPlanAssociationsForResourceTypeRequest request = + FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient + .fetchBackupPlanAssociationsForResourceTypePagedCallable() + .futureCall(request); + // Do something. + for (BackupPlanAssociation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/AsyncFetchBackupPlanAssociationsForResourceTypePaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/AsyncFetchBackupPlanAssociationsForResourceTypePaged.java new file mode 100644 index 000000000000..e6fa8c8e8814 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/AsyncFetchBackupPlanAssociationsForResourceTypePaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncFetchBackupPlanAssociationsForResourceTypePaged { + + public static void main(String[] args) throws Exception { + asyncFetchBackupPlanAssociationsForResourceTypePaged(); + } + + public static void asyncFetchBackupPlanAssociationsForResourceTypePaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchBackupPlanAssociationsForResourceTypeRequest request = + FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + FetchBackupPlanAssociationsForResourceTypeResponse response = + backupDRClient.fetchBackupPlanAssociationsForResourceTypeCallable().call(request); + for (BackupPlanAssociation element : response.getBackupPlanAssociationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceType.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceType.java new file mode 100644 index 000000000000..409bfc973d1d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceType.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.FetchBackupPlanAssociationsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchBackupPlanAssociationsForResourceType { + + public static void main(String[] args) throws Exception { + syncFetchBackupPlanAssociationsForResourceType(); + } + + public static void syncFetchBackupPlanAssociationsForResourceType() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchBackupPlanAssociationsForResourceTypeRequest request = + FetchBackupPlanAssociationsForResourceTypeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (BackupPlanAssociation element : + backupDRClient.fetchBackupPlanAssociationsForResourceType(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceTypeLocationnameString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceTypeLocationnameString.java new file mode 100644 index 000000000000..698e910c3fd7 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceTypeLocationnameString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_LocationnameString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchBackupPlanAssociationsForResourceTypeLocationnameString { + + public static void main(String[] args) throws Exception { + syncFetchBackupPlanAssociationsForResourceTypeLocationnameString(); + } + + public static void syncFetchBackupPlanAssociationsForResourceTypeLocationnameString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String resourceType = "resourceType-384364440"; + for (BackupPlanAssociation element : + backupDRClient + .fetchBackupPlanAssociationsForResourceType(parent, resourceType) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_LocationnameString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceTypeStringString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceTypeStringString.java new file mode 100644 index 000000000000..7d9bea544ea7 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupplanassociationsforresourcetype/SyncFetchBackupPlanAssociationsForResourceTypeStringString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_StringString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchBackupPlanAssociationsForResourceTypeStringString { + + public static void main(String[] args) throws Exception { + syncFetchBackupPlanAssociationsForResourceTypeStringString(); + } + + public static void syncFetchBackupPlanAssociationsForResourceTypeStringString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + String resourceType = "resourceType-384364440"; + for (BackupPlanAssociation element : + backupDRClient + .fetchBackupPlanAssociationsForResourceType(parent, resourceType) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupPlanAssociationsForResourceType_StringString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/AsyncFetchBackupsForResourceType.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/AsyncFetchBackupsForResourceType.java new file mode 100644 index 000000000000..fb8d0a9c4bea --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/AsyncFetchBackupsForResourceType.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupView; +import com.google.cloud.backupdr.v1beta.DataSourceName; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; + +public class AsyncFetchBackupsForResourceType { + + public static void main(String[] args) throws Exception { + asyncFetchBackupsForResourceType(); + } + + public static void asyncFetchBackupsForResourceType() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchBackupsForResourceTypeRequest request = + FetchBackupsForResourceTypeRequest.newBuilder() + .setParent( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupView.forNumber(0)) + .build(); + ApiFuture future = + backupDRClient.fetchBackupsForResourceTypePagedCallable().futureCall(request); + // Do something. + for (Backup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/AsyncFetchBackupsForResourceTypePaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/AsyncFetchBackupsForResourceTypePaged.java new file mode 100644 index 000000000000..ae7de0dd8b84 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/AsyncFetchBackupsForResourceTypePaged.java @@ -0,0 +1,69 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_Paged_async] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupView; +import com.google.cloud.backupdr.v1beta.DataSourceName; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeResponse; +import com.google.common.base.Strings; + +public class AsyncFetchBackupsForResourceTypePaged { + + public static void main(String[] args) throws Exception { + asyncFetchBackupsForResourceTypePaged(); + } + + public static void asyncFetchBackupsForResourceTypePaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchBackupsForResourceTypeRequest request = + FetchBackupsForResourceTypeRequest.newBuilder() + .setParent( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupView.forNumber(0)) + .build(); + while (true) { + FetchBackupsForResourceTypeResponse response = + backupDRClient.fetchBackupsForResourceTypeCallable().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 backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceType.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceType.java new file mode 100644 index 000000000000..9d317de17d1e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceType.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupView; +import com.google.cloud.backupdr.v1beta.DataSourceName; +import com.google.cloud.backupdr.v1beta.FetchBackupsForResourceTypeRequest; + +public class SyncFetchBackupsForResourceType { + + public static void main(String[] args) throws Exception { + syncFetchBackupsForResourceType(); + } + + public static void syncFetchBackupsForResourceType() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchBackupsForResourceTypeRequest request = + FetchBackupsForResourceTypeRequest.newBuilder() + .setParent( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupView.forNumber(0)) + .build(); + for (Backup element : backupDRClient.fetchBackupsForResourceType(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceTypeDatasourcenameString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceTypeDatasourcenameString.java new file mode 100644 index 000000000000..62d56500d6d6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceTypeDatasourcenameString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_DatasourcenameString_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceName; + +public class SyncFetchBackupsForResourceTypeDatasourcenameString { + + public static void main(String[] args) throws Exception { + syncFetchBackupsForResourceTypeDatasourcenameString(); + } + + public static void syncFetchBackupsForResourceTypeDatasourcenameString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + String resourceType = "resourceType-384364440"; + for (Backup element : + backupDRClient.fetchBackupsForResourceType(parent, resourceType).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_DatasourcenameString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceTypeStringString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceTypeStringString.java new file mode 100644 index 000000000000..ce3293882cc3 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchbackupsforresourcetype/SyncFetchBackupsForResourceTypeStringString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_StringString_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceName; + +public class SyncFetchBackupsForResourceTypeStringString { + + public static void main(String[] args) throws Exception { + syncFetchBackupsForResourceTypeStringString(); + } + + public static void syncFetchBackupsForResourceTypeStringString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString(); + String resourceType = "resourceType-384364440"; + for (Backup element : + backupDRClient.fetchBackupsForResourceType(parent, resourceType).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchBackupsForResourceType_StringString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/AsyncFetchDataSourceReferencesForResourceType.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/AsyncFetchDataSourceReferencesForResourceType.java new file mode 100644 index 000000000000..e5dabfd3e2ba --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/AsyncFetchDataSourceReferencesForResourceType.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class AsyncFetchDataSourceReferencesForResourceType { + + public static void main(String[] args) throws Exception { + asyncFetchDataSourceReferencesForResourceType(); + } + + public static void asyncFetchDataSourceReferencesForResourceType() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchDataSourceReferencesForResourceTypeRequest request = + FetchDataSourceReferencesForResourceTypeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient + .fetchDataSourceReferencesForResourceTypePagedCallable() + .futureCall(request); + // Do something. + for (DataSourceReference element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/AsyncFetchDataSourceReferencesForResourceTypePaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/AsyncFetchDataSourceReferencesForResourceTypePaged.java new file mode 100644 index 000000000000..4cf6890e5a24 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/AsyncFetchDataSourceReferencesForResourceTypePaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncFetchDataSourceReferencesForResourceTypePaged { + + public static void main(String[] args) throws Exception { + asyncFetchDataSourceReferencesForResourceTypePaged(); + } + + public static void asyncFetchDataSourceReferencesForResourceTypePaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchDataSourceReferencesForResourceTypeRequest request = + FetchDataSourceReferencesForResourceTypeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + FetchDataSourceReferencesForResourceTypeResponse response = + backupDRClient.fetchDataSourceReferencesForResourceTypeCallable().call(request); + for (DataSourceReference element : response.getDataSourceReferencesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceType.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceType.java new file mode 100644 index 000000000000..617509a7db1c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceType.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.FetchDataSourceReferencesForResourceTypeRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchDataSourceReferencesForResourceType { + + public static void main(String[] args) throws Exception { + syncFetchDataSourceReferencesForResourceType(); + } + + public static void syncFetchDataSourceReferencesForResourceType() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchDataSourceReferencesForResourceTypeRequest request = + FetchDataSourceReferencesForResourceTypeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setResourceType("resourceType-384364440") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (DataSourceReference element : + backupDRClient.fetchDataSourceReferencesForResourceType(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceTypeLocationnameString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceTypeLocationnameString.java new file mode 100644 index 000000000000..111d1c069254 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceTypeLocationnameString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_LocationnameString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchDataSourceReferencesForResourceTypeLocationnameString { + + public static void main(String[] args) throws Exception { + syncFetchDataSourceReferencesForResourceTypeLocationnameString(); + } + + public static void syncFetchDataSourceReferencesForResourceTypeLocationnameString() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String resourceType = "resourceType-384364440"; + for (DataSourceReference element : + backupDRClient + .fetchDataSourceReferencesForResourceType(parent, resourceType) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_LocationnameString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceTypeStringString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceTypeStringString.java new file mode 100644 index 000000000000..8e95d21411a7 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchdatasourcereferencesforresourcetype/SyncFetchDataSourceReferencesForResourceTypeStringString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_StringString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchDataSourceReferencesForResourceTypeStringString { + + public static void main(String[] args) throws Exception { + syncFetchDataSourceReferencesForResourceTypeStringString(); + } + + public static void syncFetchDataSourceReferencesForResourceTypeStringString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + String resourceType = "resourceType-384364440"; + for (DataSourceReference element : + backupDRClient + .fetchDataSourceReferencesForResourceType(parent, resourceType) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchDataSourceReferencesForResourceType_StringString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/AsyncFetchUsableBackupVaults.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/AsyncFetchUsableBackupVaults.java new file mode 100644 index 000000000000..7eed0c103d65 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/AsyncFetchUsableBackupVaults.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class AsyncFetchUsableBackupVaults { + + public static void main(String[] args) throws Exception { + asyncFetchUsableBackupVaults(); + } + + public static void asyncFetchUsableBackupVaults() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchUsableBackupVaultsRequest request = + FetchUsableBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.fetchUsableBackupVaultsPagedCallable().futureCall(request); + // Do something. + for (BackupVault element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/AsyncFetchUsableBackupVaultsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/AsyncFetchUsableBackupVaultsPaged.java new file mode 100644 index 000000000000..d9d886c143cd --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/AsyncFetchUsableBackupVaultsPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncFetchUsableBackupVaultsPaged { + + public static void main(String[] args) throws Exception { + asyncFetchUsableBackupVaultsPaged(); + } + + public static void asyncFetchUsableBackupVaultsPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchUsableBackupVaultsRequest request = + FetchUsableBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + FetchUsableBackupVaultsResponse response = + backupDRClient.fetchUsableBackupVaultsCallable().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 backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaults.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaults.java new file mode 100644 index 000000000000..9718110595c0 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaults.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.FetchUsableBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchUsableBackupVaults { + + public static void main(String[] args) throws Exception { + syncFetchUsableBackupVaults(); + } + + public static void syncFetchUsableBackupVaults() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + FetchUsableBackupVaultsRequest request = + FetchUsableBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (BackupVault element : backupDRClient.fetchUsableBackupVaults(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaultsLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaultsLocationname.java new file mode 100644 index 000000000000..feaa5fbebefc --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaultsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_Locationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchUsableBackupVaultsLocationname { + + public static void main(String[] args) throws Exception { + syncFetchUsableBackupVaultsLocationname(); + } + + public static void syncFetchUsableBackupVaultsLocationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (BackupVault element : backupDRClient.fetchUsableBackupVaults(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaultsString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaultsString.java new file mode 100644 index 000000000000..f0dabfbd0278 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/fetchusablebackupvaults/SyncFetchUsableBackupVaultsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncFetchUsableBackupVaultsString { + + public static void main(String[] args) throws Exception { + syncFetchUsableBackupVaultsString(); + } + + public static void syncFetchUsableBackupVaultsString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (BackupVault element : backupDRClient.fetchUsableBackupVaults(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_FetchUsableBackupVaults_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/AsyncGetAutoProtectionPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/AsyncGetAutoProtectionPolicy.java new file mode 100644 index 000000000000..0fd97739e43e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/AsyncGetAutoProtectionPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest; + +public class AsyncGetAutoProtectionPolicy { + + public static void main(String[] args) throws Exception { + asyncGetAutoProtectionPolicy(); + } + + public static void asyncGetAutoProtectionPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetAutoProtectionPolicyRequest request = + GetAutoProtectionPolicyRequest.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.getAutoProtectionPolicyCallable().futureCall(request); + // Do something. + AutoProtectionPolicy response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicy.java new file mode 100644 index 000000000000..8dafe7c3ce36 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyRequest; + +public class SyncGetAutoProtectionPolicy { + + public static void main(String[] args) throws Exception { + syncGetAutoProtectionPolicy(); + } + + public static void syncGetAutoProtectionPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetAutoProtectionPolicyRequest request = + GetAutoProtectionPolicyRequest.newBuilder() + .setName( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .build(); + AutoProtectionPolicy response = backupDRClient.getAutoProtectionPolicy(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicyAutoprotectionpolicyname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicyAutoprotectionpolicyname.java new file mode 100644 index 000000000000..1c03e0313002 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicyAutoprotectionpolicyname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_Autoprotectionpolicyname_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncGetAutoProtectionPolicyAutoprotectionpolicyname { + + public static void main(String[] args) throws Exception { + syncGetAutoProtectionPolicyAutoprotectionpolicyname(); + } + + public static void syncGetAutoProtectionPolicyAutoprotectionpolicyname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + AutoProtectionPolicyName name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + AutoProtectionPolicy response = backupDRClient.getAutoProtectionPolicy(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_Autoprotectionpolicyname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicyString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicyString.java new file mode 100644 index 000000000000..6ab201f4b6dd --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicy/SyncGetAutoProtectionPolicyString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_String_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncGetAutoProtectionPolicyString { + + public static void main(String[] args) throws Exception { + syncGetAutoProtectionPolicyString(); + } + + public static void syncGetAutoProtectionPolicyString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString(); + AutoProtectionPolicy response = backupDRClient.getAutoProtectionPolicy(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicy_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/AsyncGetAutoProtectionPolicyBinding.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/AsyncGetAutoProtectionPolicyBinding.java new file mode 100644 index 000000000000..09c62270059f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/AsyncGetAutoProtectionPolicyBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest; + +public class AsyncGetAutoProtectionPolicyBinding { + + public static void main(String[] args) throws Exception { + asyncGetAutoProtectionPolicyBinding(); + } + + public static void asyncGetAutoProtectionPolicyBinding() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetAutoProtectionPolicyBindingRequest request = + GetAutoProtectionPolicyBindingRequest.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.getAutoProtectionPolicyBindingCallable().futureCall(request); + // Do something. + AutoProtectionPolicyBinding response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBinding.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBinding.java new file mode 100644 index 000000000000..1074cfa056ce --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.GetAutoProtectionPolicyBindingRequest; + +public class SyncGetAutoProtectionPolicyBinding { + + public static void main(String[] args) throws Exception { + syncGetAutoProtectionPolicyBinding(); + } + + public static void syncGetAutoProtectionPolicyBinding() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetAutoProtectionPolicyBindingRequest request = + GetAutoProtectionPolicyBindingRequest.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + AutoProtectionPolicyBinding response = backupDRClient.getAutoProtectionPolicyBinding(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBindingAutoprotectionpolicybindingname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBindingAutoprotectionpolicybindingname.java new file mode 100644 index 000000000000..7f355f23c19f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBindingAutoprotectionpolicybindingname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_Autoprotectionpolicybindingname_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncGetAutoProtectionPolicyBindingAutoprotectionpolicybindingname { + + public static void main(String[] args) throws Exception { + syncGetAutoProtectionPolicyBindingAutoprotectionpolicybindingname(); + } + + public static void syncGetAutoProtectionPolicyBindingAutoprotectionpolicybindingname() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + AutoProtectionPolicyBinding response = backupDRClient.getAutoProtectionPolicyBinding(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_Autoprotectionpolicybindingname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBindingString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBindingString.java new file mode 100644 index 000000000000..1c97e2c4b108 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getautoprotectionpolicybinding/SyncGetAutoProtectionPolicyBindingString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_String_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncGetAutoProtectionPolicyBindingString { + + public static void main(String[] args) throws Exception { + syncGetAutoProtectionPolicyBindingString(); + } + + public static void syncGetAutoProtectionPolicyBindingString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString(); + AutoProtectionPolicyBinding response = backupDRClient.getAutoProtectionPolicyBinding(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetAutoProtectionPolicyBinding_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/AsyncGetBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/AsyncGetBackup.java new file mode 100644 index 000000000000..1a8b6c633f31 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/AsyncGetBackup.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.BackupView; +import com.google.cloud.backupdr.v1beta.GetBackupRequest; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupRequest request = + GetBackupRequest.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setView(BackupView.forNumber(0)) + .build(); + ApiFuture future = backupDRClient.getBackupCallable().futureCall(request); + // Do something. + Backup response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackup_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackup.java new file mode 100644 index 000000000000..e99e442cc498 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackup.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackup_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.BackupView; +import com.google.cloud.backupdr.v1beta.GetBackupRequest; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupRequest request = + GetBackupRequest.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setView(BackupView.forNumber(0)) + .build(); + Backup response = backupDRClient.getBackup(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackup_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackupBackupname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackupBackupname.java new file mode 100644 index 000000000000..4c790a915537 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackupBackupname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackup_Backupname_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + Backup response = backupDRClient.getBackup(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackup_Backupname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackupString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackupString.java new file mode 100644 index 000000000000..b3a30dc31d71 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackup/SyncGetBackupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackup_String_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString(); + Backup response = backupDRClient.getBackup(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackup_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/AsyncGetBackupPlan.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/AsyncGetBackupPlan.java new file mode 100644 index 000000000000..d233e814a590 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/AsyncGetBackupPlan.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlan_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRequest; + +public class AsyncGetBackupPlan { + + public static void main(String[] args) throws Exception { + asyncGetBackupPlan(); + } + + public static void asyncGetBackupPlan() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupPlanRequest request = + GetBackupPlanRequest.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .build(); + ApiFuture future = backupDRClient.getBackupPlanCallable().futureCall(request); + // Do something. + BackupPlan response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlan_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlan.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlan.java new file mode 100644 index 000000000000..bc16fef7815f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlan.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlan_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRequest; + +public class SyncGetBackupPlan { + + public static void main(String[] args) throws Exception { + syncGetBackupPlan(); + } + + public static void syncGetBackupPlan() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupPlanRequest request = + GetBackupPlanRequest.newBuilder() + .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .build(); + BackupPlan response = backupDRClient.getBackupPlan(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlan_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlanBackupplanname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlanBackupplanname.java new file mode 100644 index 000000000000..c2a27d1f560d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlanBackupplanname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlan_Backupplanname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.BackupPlanName; + +public class SyncGetBackupPlanBackupplanname { + + public static void main(String[] args) throws Exception { + syncGetBackupPlanBackupplanname(); + } + + public static void syncGetBackupPlanBackupplanname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + BackupPlan response = backupDRClient.getBackupPlan(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlan_Backupplanname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlanString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlanString.java new file mode 100644 index 000000000000..0a4520a509aa --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplan/SyncGetBackupPlanString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlan_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.BackupPlanName; + +public class SyncGetBackupPlanString { + + public static void main(String[] args) throws Exception { + syncGetBackupPlanString(); + } + + public static void syncGetBackupPlanString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString(); + BackupPlan response = backupDRClient.getBackupPlan(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlan_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/AsyncGetBackupPlanAssociation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/AsyncGetBackupPlanAssociation.java new file mode 100644 index 000000000000..647ccd178026 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/AsyncGetBackupPlanAssociation.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest; + +public class AsyncGetBackupPlanAssociation { + + public static void main(String[] args) throws Exception { + asyncGetBackupPlanAssociation(); + } + + public static void asyncGetBackupPlanAssociation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupPlanAssociationRequest request = + GetBackupPlanAssociationRequest.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.getBackupPlanAssociationCallable().futureCall(request); + // Do something. + BackupPlanAssociation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociation.java new file mode 100644 index 000000000000..94761ae824cd --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociation.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.cloud.backupdr.v1beta.GetBackupPlanAssociationRequest; + +public class SyncGetBackupPlanAssociation { + + public static void main(String[] args) throws Exception { + syncGetBackupPlanAssociation(); + } + + public static void syncGetBackupPlanAssociation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupPlanAssociationRequest request = + GetBackupPlanAssociationRequest.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .build(); + BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociationBackupplanassociationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociationBackupplanassociationname.java new file mode 100644 index 000000000000..b1606467fd9e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociationBackupplanassociationname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_Backupplanassociationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; + +public class SyncGetBackupPlanAssociationBackupplanassociationname { + + public static void main(String[] args) throws Exception { + syncGetBackupPlanAssociationBackupplanassociationname(); + } + + public static void syncGetBackupPlanAssociationBackupplanassociationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_Backupplanassociationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociationString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociationString.java new file mode 100644 index 000000000000..e4f29ad3c7b3 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanassociation/SyncGetBackupPlanAssociationString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; + +public class SyncGetBackupPlanAssociationString { + + public static void main(String[] args) throws Exception { + syncGetBackupPlanAssociationString(); + } + + public static void syncGetBackupPlanAssociationString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString(); + BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlanAssociation_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/AsyncGetBackupPlanRevision.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/AsyncGetBackupPlanRevision.java new file mode 100644 index 000000000000..07a65e5fd541 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/AsyncGetBackupPlanRevision.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.BackupPlanRevisionName; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest; + +public class AsyncGetBackupPlanRevision { + + public static void main(String[] args) throws Exception { + asyncGetBackupPlanRevision(); + } + + public static void asyncGetBackupPlanRevision() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupPlanRevisionRequest request = + GetBackupPlanRevisionRequest.newBuilder() + .setName( + BackupPlanRevisionName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.getBackupPlanRevisionCallable().futureCall(request); + // Do something. + BackupPlanRevision response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevision.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevision.java new file mode 100644 index 000000000000..4bfd7e321058 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevision.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.BackupPlanRevisionName; +import com.google.cloud.backupdr.v1beta.GetBackupPlanRevisionRequest; + +public class SyncGetBackupPlanRevision { + + public static void main(String[] args) throws Exception { + syncGetBackupPlanRevision(); + } + + public static void syncGetBackupPlanRevision() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupPlanRevisionRequest request = + GetBackupPlanRevisionRequest.newBuilder() + .setName( + BackupPlanRevisionName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]") + .toString()) + .build(); + BackupPlanRevision response = backupDRClient.getBackupPlanRevision(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevisionBackupplanrevisionname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevisionBackupplanrevisionname.java new file mode 100644 index 000000000000..7b63ed7844e2 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevisionBackupplanrevisionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_Backupplanrevisionname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.BackupPlanRevisionName; + +public class SyncGetBackupPlanRevisionBackupplanrevisionname { + + public static void main(String[] args) throws Exception { + syncGetBackupPlanRevisionBackupplanrevisionname(); + } + + public static void syncGetBackupPlanRevisionBackupplanrevisionname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlanRevisionName name = + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]"); + BackupPlanRevision response = backupDRClient.getBackupPlanRevision(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_Backupplanrevisionname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevisionString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevisionString.java new file mode 100644 index 000000000000..412f9356c5cf --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupplanrevision/SyncGetBackupPlanRevisionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.BackupPlanRevisionName; + +public class SyncGetBackupPlanRevisionString { + + public static void main(String[] args) throws Exception { + syncGetBackupPlanRevisionString(); + } + + public static void syncGetBackupPlanRevisionString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + BackupPlanRevisionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[REVISION]") + .toString(); + BackupPlanRevision response = backupDRClient.getBackupPlanRevision(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupPlanRevision_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/AsyncGetBackupVault.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/AsyncGetBackupVault.java new file mode 100644 index 000000000000..7a121b745ee6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/AsyncGetBackupVault.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupVault_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.BackupVaultView; +import com.google.cloud.backupdr.v1beta.GetBackupVaultRequest; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupVaultRequest request = + GetBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setView(BackupVaultView.forNumber(0)) + .build(); + ApiFuture future = backupDRClient.getBackupVaultCallable().futureCall(request); + // Do something. + BackupVault response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupVault_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVault.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVault.java new file mode 100644 index 000000000000..7a93b06f5c94 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVault.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupVault_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.BackupVaultView; +import com.google.cloud.backupdr.v1beta.GetBackupVaultRequest; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBackupVaultRequest request = + GetBackupVaultRequest.newBuilder() + .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setView(BackupVaultView.forNumber(0)) + .build(); + BackupVault response = backupDRClient.getBackupVault(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupVault_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVaultBackupvaultname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVaultBackupvaultname.java new file mode 100644 index 000000000000..1f370620015f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVaultBackupvaultname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupVault_Backupvaultname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BackupVaultName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + BackupVault response = backupDRClient.getBackupVault(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupVault_Backupvaultname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVaultString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVaultString.java new file mode 100644 index 000000000000..481267a62869 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbackupvault/SyncGetBackupVaultString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBackupVault_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BackupVaultName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString(); + BackupVault response = backupDRClient.getBackupVault(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBackupVault_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/AsyncGetBindingMatchingResource.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/AsyncGetBindingMatchingResource.java new file mode 100644 index 000000000000..de72e2ebd9b0 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/AsyncGetBindingMatchingResource.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.BindingMatchingResourceName; +import com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest; + +public class AsyncGetBindingMatchingResource { + + public static void main(String[] args) throws Exception { + asyncGetBindingMatchingResource(); + } + + public static void asyncGetBindingMatchingResource() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBindingMatchingResourceRequest request = + GetBindingMatchingResourceRequest.newBuilder() + .setName( + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.getBindingMatchingResourceCallable().futureCall(request); + // Do something. + BindingMatchingResource response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResource.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResource.java new file mode 100644 index 000000000000..302c63c85280 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.BindingMatchingResourceName; +import com.google.cloud.backupdr.v1beta.GetBindingMatchingResourceRequest; + +public class SyncGetBindingMatchingResource { + + public static void main(String[] args) throws Exception { + syncGetBindingMatchingResource(); + } + + public static void syncGetBindingMatchingResource() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetBindingMatchingResourceRequest request = + GetBindingMatchingResourceRequest.newBuilder() + .setName( + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]") + .toString()) + .build(); + BindingMatchingResource response = backupDRClient.getBindingMatchingResource(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResourceBindingmatchingresourcename.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResourceBindingmatchingresourcename.java new file mode 100644 index 000000000000..74e12a829c41 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResourceBindingmatchingresourcename.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_Bindingmatchingresourcename_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.BindingMatchingResourceName; + +public class SyncGetBindingMatchingResourceBindingmatchingresourcename { + + public static void main(String[] args) throws Exception { + syncGetBindingMatchingResourceBindingmatchingresourcename(); + } + + public static void syncGetBindingMatchingResourceBindingmatchingresourcename() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BindingMatchingResourceName name = + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]"); + BindingMatchingResource response = backupDRClient.getBindingMatchingResource(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_Bindingmatchingresourcename_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResourceString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResourceString.java new file mode 100644 index 000000000000..6ae1647e29a4 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getbindingmatchingresource/SyncGetBindingMatchingResourceString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.BindingMatchingResourceName; + +public class SyncGetBindingMatchingResourceString { + + public static void main(String[] args) throws Exception { + syncGetBindingMatchingResourceString(); + } + + public static void syncGetBindingMatchingResourceString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + BindingMatchingResourceName.of( + "[PROJECT]", + "[LOCATION]", + "[AUTO_PROTECTION_POLICY]", + "[BINDING]", + "[MATCHING_RESOURCE]") + .toString(); + BindingMatchingResource response = backupDRClient.getBindingMatchingResource(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetBindingMatchingResource_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/AsyncGetDataSource.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/AsyncGetDataSource.java new file mode 100644 index 000000000000..ee9a646bb1dc --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/AsyncGetDataSource.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetDataSource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.DataSourceName; +import com.google.cloud.backupdr.v1beta.GetDataSourceRequest; + +public class AsyncGetDataSource { + + public static void main(String[] args) throws Exception { + asyncGetDataSource(); + } + + public static void asyncGetDataSource() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetDataSourceRequest request = + GetDataSourceRequest.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .build(); + ApiFuture future = backupDRClient.getDataSourceCallable().futureCall(request); + // Do something. + DataSource response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetDataSource_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSource.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSource.java new file mode 100644 index 000000000000..b07958c616f3 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSource.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetDataSource_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.DataSourceName; +import com.google.cloud.backupdr.v1beta.GetDataSourceRequest; + +public class SyncGetDataSource { + + public static void main(String[] args) throws Exception { + syncGetDataSource(); + } + + public static void syncGetDataSource() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetDataSourceRequest request = + GetDataSourceRequest.newBuilder() + .setName( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .build(); + DataSource response = backupDRClient.getDataSource(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetDataSource_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSourceDatasourcename.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSourceDatasourcename.java new file mode 100644 index 000000000000..8adccd700c31 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSourceDatasourcename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetDataSource_Datasourcename_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.DataSourceName; + +public class SyncGetDataSourceDatasourcename { + + public static void main(String[] args) throws Exception { + syncGetDataSourceDatasourcename(); + } + + public static void syncGetDataSourceDatasourcename() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DataSourceName name = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + DataSource response = backupDRClient.getDataSource(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetDataSource_Datasourcename_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSourceString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSourceString.java new file mode 100644 index 000000000000..959c4e68d39e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasource/SyncGetDataSourceString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetDataSource_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.DataSourceName; + +public class SyncGetDataSourceString { + + public static void main(String[] args) throws Exception { + syncGetDataSourceString(); + } + + public static void syncGetDataSourceString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString(); + DataSource response = backupDRClient.getDataSource(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetDataSource_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/AsyncGetDataSourceReference.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/AsyncGetDataSourceReference.java new file mode 100644 index 000000000000..70439b5d0bcc --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/AsyncGetDataSourceReference.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetDataSourceReference_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.DataSourceReferenceName; +import com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest; + +public class AsyncGetDataSourceReference { + + public static void main(String[] args) throws Exception { + asyncGetDataSourceReference(); + } + + public static void asyncGetDataSourceReference() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetDataSourceReferenceRequest request = + GetDataSourceReferenceRequest.newBuilder() + .setName( + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.getDataSourceReferenceCallable().futureCall(request); + // Do something. + DataSourceReference response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetDataSourceReference_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReference.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReference.java new file mode 100644 index 000000000000..0f478d8eefae --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReference.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetDataSourceReference_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.DataSourceReferenceName; +import com.google.cloud.backupdr.v1beta.GetDataSourceReferenceRequest; + +public class SyncGetDataSourceReference { + + public static void main(String[] args) throws Exception { + syncGetDataSourceReference(); + } + + public static void syncGetDataSourceReference() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetDataSourceReferenceRequest request = + GetDataSourceReferenceRequest.newBuilder() + .setName( + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]") + .toString()) + .build(); + DataSourceReference response = backupDRClient.getDataSourceReference(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetDataSourceReference_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReferenceDatasourcereferencename.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReferenceDatasourcereferencename.java new file mode 100644 index 000000000000..00288d33fe4b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReferenceDatasourcereferencename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetDataSourceReference_Datasourcereferencename_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.DataSourceReferenceName; + +public class SyncGetDataSourceReferenceDatasourcereferencename { + + public static void main(String[] args) throws Exception { + syncGetDataSourceReferenceDatasourcereferencename(); + } + + public static void syncGetDataSourceReferenceDatasourcereferencename() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DataSourceReferenceName name = + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]"); + DataSourceReference response = backupDRClient.getDataSourceReference(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetDataSourceReference_Datasourcereferencename_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReferenceString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReferenceString.java new file mode 100644 index 000000000000..5b9984457bee --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getdatasourcereference/SyncGetDataSourceReferenceString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetDataSourceReference_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.DataSourceReferenceName; + +public class SyncGetDataSourceReferenceString { + + public static void main(String[] args) throws Exception { + syncGetDataSourceReferenceString(); + } + + public static void syncGetDataSourceReferenceString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + DataSourceReferenceName.of("[PROJECT]", "[LOCATION]", "[DATA_SOURCE_REFERENCE]") + .toString(); + DataSourceReference response = backupDRClient.getDataSourceReference(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetDataSourceReference_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getiampolicy/AsyncGetIamPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..093a4790d684 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = backupDRClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetIamPolicy_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getiampolicy/SyncGetIamPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..b35523ada06d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetIamPolicy_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = backupDRClient.getIamPolicy(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetIamPolicy_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getlocation/AsyncGetLocation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..c4db62d3ada6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = backupDRClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetLocation_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getlocation/SyncGetLocation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..e166a999273e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetLocation_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = backupDRClient.getLocation(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetLocation_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/AsyncGetManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/AsyncGetManagementServer.java new file mode 100644 index 000000000000..8b388ee41a1d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/AsyncGetManagementServer.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetManagementServer_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.GetManagementServerRequest; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.ManagementServerName; + +public class AsyncGetManagementServer { + + public static void main(String[] args) throws Exception { + asyncGetManagementServer(); + } + + public static void asyncGetManagementServer() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetManagementServerRequest request = + GetManagementServerRequest.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.getManagementServerCallable().futureCall(request); + // Do something. + ManagementServer response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetManagementServer_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServer.java new file mode 100644 index 000000000000..c9427ae23052 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServer.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetManagementServer_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.GetManagementServerRequest; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.ManagementServerName; + +public class SyncGetManagementServer { + + public static void main(String[] args) throws Exception { + syncGetManagementServer(); + } + + public static void syncGetManagementServer() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + GetManagementServerRequest request = + GetManagementServerRequest.newBuilder() + .setName( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .build(); + ManagementServer response = backupDRClient.getManagementServer(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetManagementServer_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServerManagementservername.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServerManagementservername.java new file mode 100644 index 000000000000..0abe6bc5616a --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServerManagementservername.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetManagementServer_Managementservername_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.ManagementServerName; + +public class SyncGetManagementServerManagementservername { + + public static void main(String[] args) throws Exception { + syncGetManagementServerManagementservername(); + } + + public static void syncGetManagementServerManagementservername() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ManagementServerName name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]"); + ManagementServer response = backupDRClient.getManagementServer(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetManagementServer_Managementservername_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServerString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServerString.java new file mode 100644 index 000000000000..7fb20e2ab14a --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/getmanagementserver/SyncGetManagementServerString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_GetManagementServer_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.cloud.backupdr.v1beta.ManagementServerName; + +public class SyncGetManagementServerString { + + public static void main(String[] args) throws Exception { + syncGetManagementServerString(); + } + + public static void syncGetManagementServerString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString(); + ManagementServer response = backupDRClient.getManagementServer(name); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_GetManagementServer_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/AsyncInitializeService.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/AsyncInitializeService.java new file mode 100644 index 000000000000..21b23e8d2448 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/AsyncInitializeService.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_InitializeService_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.InitializeServiceRequest; +import com.google.longrunning.Operation; + +public class AsyncInitializeService { + + public static void main(String[] args) throws Exception { + asyncInitializeService(); + } + + public static void asyncInitializeService() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + InitializeServiceRequest request = + InitializeServiceRequest.newBuilder() + .setName("name3373707") + .setResourceType("resourceType-384364440") + .setRequestId("requestId693933066") + .setBackupPlanLocation("backupPlanLocation543722720") + .setValidateOnly(true) + .build(); + ApiFuture future = backupDRClient.initializeServiceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_InitializeService_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/AsyncInitializeServiceLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/AsyncInitializeServiceLRO.java new file mode 100644 index 000000000000..d2fe84ffab26 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/AsyncInitializeServiceLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_InitializeService_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.InitializeServiceRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceResponse; +import com.google.cloud.backupdr.v1beta.OperationMetadata; + +public class AsyncInitializeServiceLRO { + + public static void main(String[] args) throws Exception { + asyncInitializeServiceLRO(); + } + + public static void asyncInitializeServiceLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + InitializeServiceRequest request = + InitializeServiceRequest.newBuilder() + .setName("name3373707") + .setResourceType("resourceType-384364440") + .setRequestId("requestId693933066") + .setBackupPlanLocation("backupPlanLocation543722720") + .setValidateOnly(true) + .build(); + OperationFuture future = + backupDRClient.initializeServiceOperationCallable().futureCall(request); + // Do something. + InitializeServiceResponse response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_InitializeService_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/SyncInitializeService.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/SyncInitializeService.java new file mode 100644 index 000000000000..a63aefe41f9b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initializeservice/SyncInitializeService.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_InitializeService_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.InitializeServiceRequest; +import com.google.cloud.backupdr.v1beta.InitializeServiceResponse; + +public class SyncInitializeService { + + public static void main(String[] args) throws Exception { + syncInitializeService(); + } + + public static void syncInitializeService() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + InitializeServiceRequest request = + InitializeServiceRequest.newBuilder() + .setName("name3373707") + .setResourceType("resourceType-384364440") + .setRequestId("requestId693933066") + .setBackupPlanLocation("backupPlanLocation543722720") + .setValidateOnly(true) + .build(); + InitializeServiceResponse response = backupDRClient.initializeServiceAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_InitializeService_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/AsyncInitiateDeleteAutoProtectionPolicyBinding.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/AsyncInitiateDeleteAutoProtectionPolicyBinding.java new file mode 100644 index 000000000000..2c02baad0743 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/AsyncInitiateDeleteAutoProtectionPolicyBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; +import com.google.longrunning.Operation; + +public class AsyncInitiateDeleteAutoProtectionPolicyBinding { + + public static void main(String[] args) throws Exception { + asyncInitiateDeleteAutoProtectionPolicyBinding(); + } + + public static void asyncInitiateDeleteAutoProtectionPolicyBinding() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + InitiateDeleteAutoProtectionPolicyBindingRequest request = + InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + ApiFuture future = + backupDRClient.initiateDeleteAutoProtectionPolicyBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/AsyncInitiateDeleteAutoProtectionPolicyBindingLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/AsyncInitiateDeleteAutoProtectionPolicyBindingLRO.java new file mode 100644 index 000000000000..7308a3dca811 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/AsyncInitiateDeleteAutoProtectionPolicyBindingLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; +import com.google.cloud.backupdr.v1beta.OperationMetadata; + +public class AsyncInitiateDeleteAutoProtectionPolicyBindingLRO { + + public static void main(String[] args) throws Exception { + asyncInitiateDeleteAutoProtectionPolicyBindingLRO(); + } + + public static void asyncInitiateDeleteAutoProtectionPolicyBindingLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + InitiateDeleteAutoProtectionPolicyBindingRequest request = + InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + OperationFuture future = + backupDRClient + .initiateDeleteAutoProtectionPolicyBindingOperationCallable() + .futureCall(request); + // Do something. + AutoProtectionPolicyBinding response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBinding.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBinding.java new file mode 100644 index 000000000000..62e4b4827ca8 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBinding.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest; + +public class SyncInitiateDeleteAutoProtectionPolicyBinding { + + public static void main(String[] args) throws Exception { + syncInitiateDeleteAutoProtectionPolicyBinding(); + } + + public static void syncInitiateDeleteAutoProtectionPolicyBinding() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + InitiateDeleteAutoProtectionPolicyBindingRequest request = + InitiateDeleteAutoProtectionPolicyBindingRequest.newBuilder() + .setName( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .build(); + AutoProtectionPolicyBinding response = + backupDRClient.initiateDeleteAutoProtectionPolicyBindingAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBindingAutoprotectionpolicybindingname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBindingAutoprotectionpolicybindingname.java new file mode 100644 index 000000000000..7a60c66816fb --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBindingAutoprotectionpolicybindingname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_Autoprotectionpolicybindingname_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncInitiateDeleteAutoProtectionPolicyBindingAutoprotectionpolicybindingname { + + public static void main(String[] args) throws Exception { + syncInitiateDeleteAutoProtectionPolicyBindingAutoprotectionpolicybindingname(); + } + + public static void syncInitiateDeleteAutoProtectionPolicyBindingAutoprotectionpolicybindingname() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + AutoProtectionPolicyBindingName name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + AutoProtectionPolicyBinding response = + backupDRClient.initiateDeleteAutoProtectionPolicyBindingAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_Autoprotectionpolicybindingname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBindingString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBindingString.java new file mode 100644 index 000000000000..58a119eef28e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/initiatedeleteautoprotectionpolicybinding/SyncInitiateDeleteAutoProtectionPolicyBindingString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_String_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncInitiateDeleteAutoProtectionPolicyBindingString { + + public static void main(String[] args) throws Exception { + syncInitiateDeleteAutoProtectionPolicyBindingString(); + } + + public static void syncInitiateDeleteAutoProtectionPolicyBindingString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString(); + AutoProtectionPolicyBinding response = + backupDRClient.initiateDeleteAutoProtectionPolicyBindingAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_InitiateDeleteAutoProtectionPolicyBinding_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/AsyncListAppliedAutoProtectionPolicies.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/AsyncListAppliedAutoProtectionPolicies.java new file mode 100644 index 000000000000..c4b530d10351 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/AsyncListAppliedAutoProtectionPolicies.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class AsyncListAppliedAutoProtectionPolicies { + + public static void main(String[] args) throws Exception { + asyncListAppliedAutoProtectionPolicies(); + } + + public static void asyncListAppliedAutoProtectionPolicies() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAppliedAutoProtectionPoliciesRequest request = + ListAppliedAutoProtectionPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.listAppliedAutoProtectionPoliciesPagedCallable().futureCall(request); + // Do something. + for (AppliedAutoProtectionPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/AsyncListAppliedAutoProtectionPoliciesPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/AsyncListAppliedAutoProtectionPoliciesPaged.java new file mode 100644 index 000000000000..6b7ea8fd6998 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/AsyncListAppliedAutoProtectionPoliciesPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_Paged_async] +import com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncListAppliedAutoProtectionPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncListAppliedAutoProtectionPoliciesPaged(); + } + + public static void asyncListAppliedAutoProtectionPoliciesPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAppliedAutoProtectionPoliciesRequest request = + ListAppliedAutoProtectionPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAppliedAutoProtectionPoliciesResponse response = + backupDRClient.listAppliedAutoProtectionPoliciesCallable().call(request); + for (AppliedAutoProtectionPolicy element : + response.getAppliedAutoProtectionPoliciesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPolicies.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPolicies.java new file mode 100644 index 000000000000..6e48cc1f2d99 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPolicies.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_sync] +import com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAppliedAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListAppliedAutoProtectionPolicies { + + public static void main(String[] args) throws Exception { + syncListAppliedAutoProtectionPolicies(); + } + + public static void syncListAppliedAutoProtectionPolicies() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAppliedAutoProtectionPoliciesRequest request = + ListAppliedAutoProtectionPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (AppliedAutoProtectionPolicy element : + backupDRClient.listAppliedAutoProtectionPolicies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPoliciesLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPoliciesLocationname.java new file mode 100644 index 000000000000..892adb5e5a5b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPoliciesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_Locationname_sync] +import com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListAppliedAutoProtectionPoliciesLocationname { + + public static void main(String[] args) throws Exception { + syncListAppliedAutoProtectionPoliciesLocationname(); + } + + public static void syncListAppliedAutoProtectionPoliciesLocationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (AppliedAutoProtectionPolicy element : + backupDRClient.listAppliedAutoProtectionPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPoliciesString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPoliciesString.java new file mode 100644 index 000000000000..1d356a87dc07 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listappliedautoprotectionpolicies/SyncListAppliedAutoProtectionPoliciesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_String_sync] +import com.google.cloud.backupdr.v1beta.AppliedAutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListAppliedAutoProtectionPoliciesString { + + public static void main(String[] args) throws Exception { + syncListAppliedAutoProtectionPoliciesString(); + } + + public static void syncListAppliedAutoProtectionPoliciesString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (AppliedAutoProtectionPolicy element : + backupDRClient.listAppliedAutoProtectionPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAppliedAutoProtectionPolicies_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/AsyncListAutoProtectionPolicies.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/AsyncListAutoProtectionPolicies.java new file mode 100644 index 000000000000..5a9b3df83ca6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/AsyncListAutoProtectionPolicies.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class AsyncListAutoProtectionPolicies { + + public static void main(String[] args) throws Exception { + asyncListAutoProtectionPolicies(); + } + + public static void asyncListAutoProtectionPolicies() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAutoProtectionPoliciesRequest request = + ListAutoProtectionPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.listAutoProtectionPoliciesPagedCallable().futureCall(request); + // Do something. + for (AutoProtectionPolicy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/AsyncListAutoProtectionPoliciesPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/AsyncListAutoProtectionPoliciesPaged.java new file mode 100644 index 000000000000..53ea5767361f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/AsyncListAutoProtectionPoliciesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_Paged_async] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncListAutoProtectionPoliciesPaged { + + public static void main(String[] args) throws Exception { + asyncListAutoProtectionPoliciesPaged(); + } + + public static void asyncListAutoProtectionPoliciesPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAutoProtectionPoliciesRequest request = + ListAutoProtectionPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAutoProtectionPoliciesResponse response = + backupDRClient.listAutoProtectionPoliciesCallable().call(request); + for (AutoProtectionPolicy element : response.getAutoProtectionPoliciesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPolicies.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPolicies.java new file mode 100644 index 000000000000..da4ca434b030 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPolicies.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPoliciesRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListAutoProtectionPolicies { + + public static void main(String[] args) throws Exception { + syncListAutoProtectionPolicies(); + } + + public static void syncListAutoProtectionPolicies() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAutoProtectionPoliciesRequest request = + ListAutoProtectionPoliciesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (AutoProtectionPolicy element : + backupDRClient.listAutoProtectionPolicies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPoliciesLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPoliciesLocationname.java new file mode 100644 index 000000000000..9b9490293a5d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPoliciesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_Locationname_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListAutoProtectionPoliciesLocationname { + + public static void main(String[] args) throws Exception { + syncListAutoProtectionPoliciesLocationname(); + } + + public static void syncListAutoProtectionPoliciesLocationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (AutoProtectionPolicy element : + backupDRClient.listAutoProtectionPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPoliciesString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPoliciesString.java new file mode 100644 index 000000000000..1235f663a351 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicies/SyncListAutoProtectionPoliciesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_String_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListAutoProtectionPoliciesString { + + public static void main(String[] args) throws Exception { + syncListAutoProtectionPoliciesString(); + } + + public static void syncListAutoProtectionPoliciesString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (AutoProtectionPolicy element : + backupDRClient.listAutoProtectionPolicies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicies_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/AsyncListAutoProtectionPolicyBindings.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/AsyncListAutoProtectionPolicyBindings.java new file mode 100644 index 000000000000..d053a7d9b5c2 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/AsyncListAutoProtectionPolicyBindings.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; + +public class AsyncListAutoProtectionPolicyBindings { + + public static void main(String[] args) throws Exception { + asyncListAutoProtectionPolicyBindings(); + } + + public static void asyncListAutoProtectionPolicyBindings() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAutoProtectionPolicyBindingsRequest request = + ListAutoProtectionPolicyBindingsRequest.newBuilder() + .setParent( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.listAutoProtectionPolicyBindingsPagedCallable().futureCall(request); + // Do something. + for (AutoProtectionPolicyBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/AsyncListAutoProtectionPolicyBindingsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/AsyncListAutoProtectionPolicyBindingsPaged.java new file mode 100644 index 000000000000..4b5daf23b5dc --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/AsyncListAutoProtectionPolicyBindingsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_Paged_async] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsResponse; +import com.google.common.base.Strings; + +public class AsyncListAutoProtectionPolicyBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncListAutoProtectionPolicyBindingsPaged(); + } + + public static void asyncListAutoProtectionPolicyBindingsPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAutoProtectionPolicyBindingsRequest request = + ListAutoProtectionPolicyBindingsRequest.newBuilder() + .setParent( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAutoProtectionPolicyBindingsResponse response = + backupDRClient.listAutoProtectionPolicyBindingsCallable().call(request); + for (AutoProtectionPolicyBinding element : response.getAutoProtectionPolicyBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindings.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindings.java new file mode 100644 index 000000000000..b6a09746456f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindings.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListAutoProtectionPolicyBindingsRequest; + +public class SyncListAutoProtectionPolicyBindings { + + public static void main(String[] args) throws Exception { + syncListAutoProtectionPolicyBindings(); + } + + public static void syncListAutoProtectionPolicyBindings() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListAutoProtectionPolicyBindingsRequest request = + ListAutoProtectionPolicyBindingsRequest.newBuilder() + .setParent( + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (AutoProtectionPolicyBinding element : + backupDRClient.listAutoProtectionPolicyBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindingsAutoprotectionpolicyname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindingsAutoprotectionpolicyname.java new file mode 100644 index 000000000000..5297b2311cb9 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindingsAutoprotectionpolicyname.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_Autoprotectionpolicyname_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncListAutoProtectionPolicyBindingsAutoprotectionpolicyname { + + public static void main(String[] args) throws Exception { + syncListAutoProtectionPolicyBindingsAutoprotectionpolicyname(); + } + + public static void syncListAutoProtectionPolicyBindingsAutoprotectionpolicyname() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + AutoProtectionPolicyName parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]"); + for (AutoProtectionPolicyBinding element : + backupDRClient.listAutoProtectionPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_Autoprotectionpolicyname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindingsString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindingsString.java new file mode 100644 index 000000000000..1d92007efa02 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listautoprotectionpolicybindings/SyncListAutoProtectionPolicyBindingsString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_String_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBinding; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; + +public class SyncListAutoProtectionPolicyBindingsString { + + public static void main(String[] args) throws Exception { + syncListAutoProtectionPolicyBindingsString(); + } + + public static void syncListAutoProtectionPolicyBindingsString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = + AutoProtectionPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]") + .toString(); + for (AutoProtectionPolicyBinding element : + backupDRClient.listAutoProtectionPolicyBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListAutoProtectionPolicyBindings_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/AsyncListBackupPlanAssociations.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/AsyncListBackupPlanAssociations.java new file mode 100644 index 000000000000..1e822b448eef --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/AsyncListBackupPlanAssociations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class AsyncListBackupPlanAssociations { + + public static void main(String[] args) throws Exception { + asyncListBackupPlanAssociations(); + } + + public static void asyncListBackupPlanAssociations() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlanAssociationsRequest request = + ListBackupPlanAssociationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + backupDRClient.listBackupPlanAssociationsPagedCallable().futureCall(request); + // Do something. + for (BackupPlanAssociation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/AsyncListBackupPlanAssociationsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/AsyncListBackupPlanAssociationsPaged.java new file mode 100644 index 000000000000..49b7d3075c93 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/AsyncListBackupPlanAssociationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncListBackupPlanAssociationsPaged { + + public static void main(String[] args) throws Exception { + asyncListBackupPlanAssociationsPaged(); + } + + public static void asyncListBackupPlanAssociationsPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlanAssociationsRequest request = + ListBackupPlanAssociationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListBackupPlanAssociationsResponse response = + backupDRClient.listBackupPlanAssociationsCallable().call(request); + for (BackupPlanAssociation element : response.getBackupPlanAssociationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociations.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociations.java new file mode 100644 index 000000000000..9f710d7638ee --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociations.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.ListBackupPlanAssociationsRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListBackupPlanAssociations { + + public static void main(String[] args) throws Exception { + syncListBackupPlanAssociations(); + } + + public static void syncListBackupPlanAssociations() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlanAssociationsRequest request = + ListBackupPlanAssociationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (BackupPlanAssociation element : + backupDRClient.listBackupPlanAssociations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociationsLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociationsLocationname.java new file mode 100644 index 000000000000..03c13faa5d30 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociationsLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_Locationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListBackupPlanAssociationsLocationname { + + public static void main(String[] args) throws Exception { + syncListBackupPlanAssociationsLocationname(); + } + + public static void syncListBackupPlanAssociationsLocationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (BackupPlanAssociation element : + backupDRClient.listBackupPlanAssociations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociationsString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociationsString.java new file mode 100644 index 000000000000..3ecbbaf669d9 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanassociations/SyncListBackupPlanAssociationsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListBackupPlanAssociationsString { + + public static void main(String[] args) throws Exception { + syncListBackupPlanAssociationsString(); + } + + public static void syncListBackupPlanAssociationsString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (BackupPlanAssociation element : + backupDRClient.listBackupPlanAssociations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanAssociations_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/AsyncListBackupPlanRevisions.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/AsyncListBackupPlanRevisions.java new file mode 100644 index 000000000000..508ffa6df828 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/AsyncListBackupPlanRevisions.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; + +public class AsyncListBackupPlanRevisions { + + public static void main(String[] args) throws Exception { + asyncListBackupPlanRevisions(); + } + + public static void asyncListBackupPlanRevisions() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlanRevisionsRequest request = + ListBackupPlanRevisionsRequest.newBuilder() + .setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + backupDRClient.listBackupPlanRevisionsPagedCallable().futureCall(request); + // Do something. + for (BackupPlanRevision element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/AsyncListBackupPlanRevisionsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/AsyncListBackupPlanRevisionsPaged.java new file mode 100644 index 000000000000..0e99fbc7ab08 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/AsyncListBackupPlanRevisionsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsResponse; +import com.google.common.base.Strings; + +public class AsyncListBackupPlanRevisionsPaged { + + public static void main(String[] args) throws Exception { + asyncListBackupPlanRevisionsPaged(); + } + + public static void asyncListBackupPlanRevisionsPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlanRevisionsRequest request = + ListBackupPlanRevisionsRequest.newBuilder() + .setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListBackupPlanRevisionsResponse response = + backupDRClient.listBackupPlanRevisionsCallable().call(request); + for (BackupPlanRevision element : response.getBackupPlanRevisionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisions.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisions.java new file mode 100644 index 000000000000..4f9e9ba654f8 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; +import com.google.cloud.backupdr.v1beta.ListBackupPlanRevisionsRequest; + +public class SyncListBackupPlanRevisions { + + public static void main(String[] args) throws Exception { + syncListBackupPlanRevisions(); + } + + public static void syncListBackupPlanRevisions() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlanRevisionsRequest request = + ListBackupPlanRevisionsRequest.newBuilder() + .setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (BackupPlanRevision element : + backupDRClient.listBackupPlanRevisions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisionsBackupplanname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisionsBackupplanname.java new file mode 100644 index 000000000000..5847ac0b78aa --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisionsBackupplanname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_Backupplanname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; + +public class SyncListBackupPlanRevisionsBackupplanname { + + public static void main(String[] args) throws Exception { + syncListBackupPlanRevisionsBackupplanname(); + } + + public static void syncListBackupPlanRevisionsBackupplanname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlanName parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]"); + for (BackupPlanRevision element : + backupDRClient.listBackupPlanRevisions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_Backupplanname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisionsString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisionsString.java new file mode 100644 index 000000000000..efa300283e92 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplanrevisions/SyncListBackupPlanRevisionsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanName; +import com.google.cloud.backupdr.v1beta.BackupPlanRevision; + +public class SyncListBackupPlanRevisionsString { + + public static void main(String[] args) throws Exception { + syncListBackupPlanRevisionsString(); + } + + public static void syncListBackupPlanRevisionsString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString(); + for (BackupPlanRevision element : + backupDRClient.listBackupPlanRevisions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlanRevisions_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/AsyncListBackupPlans.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/AsyncListBackupPlans.java new file mode 100644 index 000000000000..14d815d43291 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/AsyncListBackupPlans.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlans_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.ListBackupPlansRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class AsyncListBackupPlans { + + public static void main(String[] args) throws Exception { + asyncListBackupPlans(); + } + + public static void asyncListBackupPlans() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlansRequest request = + ListBackupPlansRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.listBackupPlansPagedCallable().futureCall(request); + // Do something. + for (BackupPlan element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlans_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/AsyncListBackupPlansPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/AsyncListBackupPlansPaged.java new file mode 100644 index 000000000000..83c0f6255bd6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/AsyncListBackupPlansPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlans_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.ListBackupPlansRequest; +import com.google.cloud.backupdr.v1beta.ListBackupPlansResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncListBackupPlansPaged { + + public static void main(String[] args) throws Exception { + asyncListBackupPlansPaged(); + } + + public static void asyncListBackupPlansPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlansRequest request = + ListBackupPlansRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListBackupPlansResponse response = backupDRClient.listBackupPlansCallable().call(request); + for (BackupPlan element : response.getBackupPlansList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlans_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlans.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlans.java new file mode 100644 index 000000000000..76e5da6a7b78 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlans.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlans_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.ListBackupPlansRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListBackupPlans { + + public static void main(String[] args) throws Exception { + syncListBackupPlans(); + } + + public static void syncListBackupPlans() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupPlansRequest request = + ListBackupPlansRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (BackupPlan element : backupDRClient.listBackupPlans(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlans_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlansLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlansLocationname.java new file mode 100644 index 000000000000..da1575cbc1be --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlansLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlans_Locationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListBackupPlansLocationname { + + public static void main(String[] args) throws Exception { + syncListBackupPlansLocationname(); + } + + public static void syncListBackupPlansLocationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (BackupPlan element : backupDRClient.listBackupPlans(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlans_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlansString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlansString.java new file mode 100644 index 000000000000..fe3951ab602e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupplans/SyncListBackupPlansString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupPlans_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListBackupPlansString { + + public static void main(String[] args) throws Exception { + syncListBackupPlansString(); + } + + public static void syncListBackupPlansString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (BackupPlan element : backupDRClient.listBackupPlans(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupPlans_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/AsyncListBackups.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/AsyncListBackups.java new file mode 100644 index 000000000000..a524a5e56ec1 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/AsyncListBackups.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackups_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupView; +import com.google.cloud.backupdr.v1beta.DataSourceName; +import com.google.cloud.backupdr.v1beta.ListBackupsRequest; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupsRequest request = + ListBackupsRequest.newBuilder() + .setParent( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupView.forNumber(0)) + .build(); + ApiFuture future = backupDRClient.listBackupsPagedCallable().futureCall(request); + // Do something. + for (Backup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackups_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/AsyncListBackupsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/AsyncListBackupsPaged.java new file mode 100644 index 000000000000..f62fdfa724d4 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/AsyncListBackupsPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackups_Paged_async] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupView; +import com.google.cloud.backupdr.v1beta.DataSourceName; +import com.google.cloud.backupdr.v1beta.ListBackupsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupsResponse; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupsRequest request = + ListBackupsRequest.newBuilder() + .setParent( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupView.forNumber(0)) + .build(); + while (true) { + ListBackupsResponse response = backupDRClient.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 backupdr_v1beta_generated_BackupDR_ListBackups_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackups.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackups.java new file mode 100644 index 000000000000..90c322f1a220 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackups.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackups_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupView; +import com.google.cloud.backupdr.v1beta.DataSourceName; +import com.google.cloud.backupdr.v1beta.ListBackupsRequest; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupsRequest request = + ListBackupsRequest.newBuilder() + .setParent( + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupView.forNumber(0)) + .build(); + for (Backup element : backupDRClient.listBackups(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackups_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackupsDatasourcename.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackupsDatasourcename.java new file mode 100644 index 000000000000..c202ff7875ba --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackupsDatasourcename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackups_Datasourcename_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceName; + +public class SyncListBackupsDatasourcename { + + public static void main(String[] args) throws Exception { + syncListBackupsDatasourcename(); + } + + public static void syncListBackupsDatasourcename() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DataSourceName parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]"); + for (Backup element : backupDRClient.listBackups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackups_Datasourcename_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackupsString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackupsString.java new file mode 100644 index 000000000000..d4fb556d77e5 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackups/SyncListBackupsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackups_String_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = + DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString(); + for (Backup element : backupDRClient.listBackups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackups_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/AsyncListBackupVaults.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/AsyncListBackupVaults.java new file mode 100644 index 000000000000..c770e1250813 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/AsyncListBackupVaults.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupVaults_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BackupVaultView; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupVaultView.forNumber(0)) + .build(); + ApiFuture future = + backupDRClient.listBackupVaultsPagedCallable().futureCall(request); + // Do something. + for (BackupVault element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupVaults_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/AsyncListBackupVaultsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/AsyncListBackupVaultsPaged.java new file mode 100644 index 000000000000..ec74e1a1995c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/AsyncListBackupVaultsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupVaults_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BackupVaultView; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupVaultView.forNumber(0)) + .build(); + while (true) { + ListBackupVaultsResponse response = backupDRClient.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 backupdr_v1beta_generated_BackupDR_ListBackupVaults_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaults.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaults.java new file mode 100644 index 000000000000..6c7cc618cbdc --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaults.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupVaults_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.BackupVaultView; +import com.google.cloud.backupdr.v1beta.ListBackupVaultsRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBackupVaultsRequest request = + ListBackupVaultsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setView(BackupVaultView.forNumber(0)) + .build(); + for (BackupVault element : backupDRClient.listBackupVaults(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupVaults_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaultsLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaultsLocationname.java new file mode 100644 index 000000000000..dc8bbc819506 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaultsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupVaults_Locationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.LocationName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (BackupVault element : backupDRClient.listBackupVaults(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupVaults_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaultsString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaultsString.java new file mode 100644 index 000000000000..0ca291ce1cb8 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbackupvaults/SyncListBackupVaultsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBackupVaults_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.LocationName; + +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (BackupVault element : backupDRClient.listBackupVaults(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBackupVaults_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/AsyncListBindingMatchingResources.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/AsyncListBindingMatchingResources.java new file mode 100644 index 000000000000..2dfd0a483a2a --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/AsyncListBindingMatchingResources.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; + +public class AsyncListBindingMatchingResources { + + public static void main(String[] args) throws Exception { + asyncListBindingMatchingResources(); + } + + public static void asyncListBindingMatchingResources() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBindingMatchingResourcesRequest request = + ListBindingMatchingResourcesRequest.newBuilder() + .setParent( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.listBindingMatchingResourcesPagedCallable().futureCall(request); + // Do something. + for (BindingMatchingResource element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/AsyncListBindingMatchingResourcesPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/AsyncListBindingMatchingResourcesPaged.java new file mode 100644 index 000000000000..6e013f7c5471 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/AsyncListBindingMatchingResourcesPaged.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_Paged_async] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesResponse; +import com.google.common.base.Strings; + +public class AsyncListBindingMatchingResourcesPaged { + + public static void main(String[] args) throws Exception { + asyncListBindingMatchingResourcesPaged(); + } + + public static void asyncListBindingMatchingResourcesPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBindingMatchingResourcesRequest request = + ListBindingMatchingResourcesRequest.newBuilder() + .setParent( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListBindingMatchingResourcesResponse response = + backupDRClient.listBindingMatchingResourcesCallable().call(request); + for (BindingMatchingResource element : response.getMatchingResourcesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResources.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResources.java new file mode 100644 index 000000000000..b9af1b29ee36 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResources.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; +import com.google.cloud.backupdr.v1beta.ListBindingMatchingResourcesRequest; + +public class SyncListBindingMatchingResources { + + public static void main(String[] args) throws Exception { + syncListBindingMatchingResources(); + } + + public static void syncListBindingMatchingResources() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListBindingMatchingResourcesRequest request = + ListBindingMatchingResourcesRequest.newBuilder() + .setParent( + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (BindingMatchingResource element : + backupDRClient.listBindingMatchingResources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResourcesAutoprotectionpolicybindingname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResourcesAutoprotectionpolicybindingname.java new file mode 100644 index 000000000000..ed8b55b87ce9 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResourcesAutoprotectionpolicybindingname.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_Autoprotectionpolicybindingname_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; + +public class SyncListBindingMatchingResourcesAutoprotectionpolicybindingname { + + public static void main(String[] args) throws Exception { + syncListBindingMatchingResourcesAutoprotectionpolicybindingname(); + } + + public static void syncListBindingMatchingResourcesAutoprotectionpolicybindingname() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + AutoProtectionPolicyBindingName parent = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]"); + for (BindingMatchingResource element : + backupDRClient.listBindingMatchingResources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_Autoprotectionpolicybindingname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResourcesString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResourcesString.java new file mode 100644 index 000000000000..717ecc0d5beb --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listbindingmatchingresources/SyncListBindingMatchingResourcesString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_String_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicyBindingName; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BindingMatchingResource; + +public class SyncListBindingMatchingResourcesString { + + public static void main(String[] args) throws Exception { + syncListBindingMatchingResourcesString(); + } + + public static void syncListBindingMatchingResourcesString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = + AutoProtectionPolicyBindingName.of( + "[PROJECT]", "[LOCATION]", "[AUTO_PROTECTION_POLICY]", "[BINDING]") + .toString(); + for (BindingMatchingResource element : + backupDRClient.listBindingMatchingResources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListBindingMatchingResources_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/AsyncListDataSourceReferences.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/AsyncListDataSourceReferences.java new file mode 100644 index 000000000000..74e3372cd872 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/AsyncListDataSourceReferences.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class AsyncListDataSourceReferences { + + public static void main(String[] args) throws Exception { + asyncListDataSourceReferences(); + } + + public static void asyncListDataSourceReferences() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListDataSourceReferencesRequest request = + ListDataSourceReferencesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.listDataSourceReferencesPagedCallable().futureCall(request); + // Do something. + for (DataSourceReference element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/AsyncListDataSourceReferencesPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/AsyncListDataSourceReferencesPaged.java new file mode 100644 index 000000000000..8688505d0a1f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/AsyncListDataSourceReferencesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncListDataSourceReferencesPaged { + + public static void main(String[] args) throws Exception { + asyncListDataSourceReferencesPaged(); + } + + public static void asyncListDataSourceReferencesPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListDataSourceReferencesRequest request = + ListDataSourceReferencesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListDataSourceReferencesResponse response = + backupDRClient.listDataSourceReferencesCallable().call(request); + for (DataSourceReference element : response.getDataSourceReferencesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferences.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferences.java new file mode 100644 index 000000000000..95a9eac218a3 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferences.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.ListDataSourceReferencesRequest; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListDataSourceReferences { + + public static void main(String[] args) throws Exception { + syncListDataSourceReferences(); + } + + public static void syncListDataSourceReferences() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListDataSourceReferencesRequest request = + ListDataSourceReferencesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (DataSourceReference element : + backupDRClient.listDataSourceReferences(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferencesLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferencesLocationname.java new file mode 100644 index 000000000000..b132c86cff2e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferencesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_Locationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListDataSourceReferencesLocationname { + + public static void main(String[] args) throws Exception { + syncListDataSourceReferencesLocationname(); + } + + public static void syncListDataSourceReferencesLocationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (DataSourceReference element : + backupDRClient.listDataSourceReferences(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferencesString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferencesString.java new file mode 100644 index 000000000000..f04266990837 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasourcereferences/SyncListDataSourceReferencesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSourceReference; +import com.google.cloud.backupdr.v1beta.LocationName; + +public class SyncListDataSourceReferencesString { + + public static void main(String[] args) throws Exception { + syncListDataSourceReferencesString(); + } + + public static void syncListDataSourceReferencesString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (DataSourceReference element : + backupDRClient.listDataSourceReferences(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSourceReferences_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/AsyncListDataSources.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/AsyncListDataSources.java new file mode 100644 index 000000000000..3d4a92e87999 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/AsyncListDataSources.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSources_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.ListDataSourcesRequest; + +public class AsyncListDataSources { + + public static void main(String[] args) throws Exception { + asyncListDataSources(); + } + + public static void asyncListDataSources() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListDataSourcesRequest request = + ListDataSourcesRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.listDataSourcesPagedCallable().futureCall(request); + // Do something. + for (DataSource element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSources_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/AsyncListDataSourcesPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/AsyncListDataSourcesPaged.java new file mode 100644 index 000000000000..06fc7b65681d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/AsyncListDataSourcesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSources_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.ListDataSourcesRequest; +import com.google.cloud.backupdr.v1beta.ListDataSourcesResponse; +import com.google.common.base.Strings; + +public class AsyncListDataSourcesPaged { + + public static void main(String[] args) throws Exception { + asyncListDataSourcesPaged(); + } + + public static void asyncListDataSourcesPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListDataSourcesRequest request = + ListDataSourcesRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListDataSourcesResponse response = backupDRClient.listDataSourcesCallable().call(request); + for (DataSource element : response.getDataSourcesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSources_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSources.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSources.java new file mode 100644 index 000000000000..6443936ce5e4 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSources.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSources_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.ListDataSourcesRequest; + +public class SyncListDataSources { + + public static void main(String[] args) throws Exception { + syncListDataSources(); + } + + public static void syncListDataSources() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListDataSourcesRequest request = + ListDataSourcesRequest.newBuilder() + .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (DataSource element : backupDRClient.listDataSources(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSources_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSourcesBackupvaultname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSourcesBackupvaultname.java new file mode 100644 index 000000000000..32ac10396c7f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSourcesBackupvaultname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSources_Backupvaultname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.DataSource; + +public class SyncListDataSourcesBackupvaultname { + + public static void main(String[] args) throws Exception { + syncListDataSourcesBackupvaultname(); + } + + public static void syncListDataSourcesBackupvaultname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]"); + for (DataSource element : backupDRClient.listDataSources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSources_Backupvaultname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSourcesString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSourcesString.java new file mode 100644 index 000000000000..0341e5f0801f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listdatasources/SyncListDataSourcesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListDataSources_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVaultName; +import com.google.cloud.backupdr.v1beta.DataSource; + +public class SyncListDataSourcesString { + + public static void main(String[] args) throws Exception { + syncListDataSourcesString(); + } + + public static void syncListDataSourcesString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString(); + for (DataSource element : backupDRClient.listDataSources(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListDataSources_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/AsyncListLocations.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..bc7da9c6adb6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = backupDRClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListLocations_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/AsyncListLocationsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..dbff2a90cb0a --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListLocations_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = backupDRClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListLocations_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/SyncListLocations.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..ba858e330700 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListLocations_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : backupDRClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListLocations_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/AsyncListManagementServers.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/AsyncListManagementServers.java new file mode 100644 index 000000000000..f8a9abfb07ea --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/AsyncListManagementServers.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListManagementServers_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListManagementServersRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; + +public class AsyncListManagementServers { + + public static void main(String[] args) throws Exception { + asyncListManagementServers(); + } + + public static void asyncListManagementServers() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListManagementServersRequest request = + ListManagementServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDRClient.listManagementServersPagedCallable().futureCall(request); + // Do something. + for (ManagementServer element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListManagementServers_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/AsyncListManagementServersPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/AsyncListManagementServersPaged.java new file mode 100644 index 000000000000..f71236d002fd --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/AsyncListManagementServersPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListManagementServers_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListManagementServersRequest; +import com.google.cloud.backupdr.v1beta.ListManagementServersResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; +import com.google.common.base.Strings; + +public class AsyncListManagementServersPaged { + + public static void main(String[] args) throws Exception { + asyncListManagementServersPaged(); + } + + public static void asyncListManagementServersPaged() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListManagementServersRequest request = + ListManagementServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListManagementServersResponse response = + backupDRClient.listManagementServersCallable().call(request); + for (ManagementServer element : response.getManagementServersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListManagementServers_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServers.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServers.java new file mode 100644 index 000000000000..0bf4e4c8ce0d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServers.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListManagementServers_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ListManagementServersRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; + +public class SyncListManagementServers { + + public static void main(String[] args) throws Exception { + syncListManagementServers(); + } + + public static void syncListManagementServers() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + ListManagementServersRequest request = + ListManagementServersRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (ManagementServer element : backupDRClient.listManagementServers(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListManagementServers_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServersLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServersLocationname.java new file mode 100644 index 000000000000..15bb18748445 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServersLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListManagementServers_Locationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; + +public class SyncListManagementServersLocationname { + + public static void main(String[] args) throws Exception { + syncListManagementServersLocationname(); + } + + public static void syncListManagementServersLocationname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (ManagementServer element : backupDRClient.listManagementServers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListManagementServers_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServersString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServersString.java new file mode 100644 index 000000000000..c9dca95d7d20 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/listmanagementservers/SyncListManagementServersString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_ListManagementServers_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ManagementServer; + +public class SyncListManagementServersString { + + public static void main(String[] args) throws Exception { + syncListManagementServersString(); + } + + public static void syncListManagementServersString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (ManagementServer element : backupDRClient.listManagementServers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDR_ListManagementServers_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/AsyncRestoreBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/AsyncRestoreBackup.java new file mode 100644 index 000000000000..cd4dc2f796fc --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/AsyncRestoreBackup.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_RestoreBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.RestoreBackupRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncRestoreBackup { + + public static void main(String[] args) throws Exception { + asyncRestoreBackup(); + } + + public static void asyncRestoreBackup() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + RestoreBackupRequest request = + RestoreBackupRequest.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setRequestId("requestId693933066") + .setClearOverridesFieldMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = backupDRClient.restoreBackupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_RestoreBackup_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/AsyncRestoreBackupLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/AsyncRestoreBackupLRO.java new file mode 100644 index 000000000000..953b16c9283e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/AsyncRestoreBackupLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_RestoreBackup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.RestoreBackupRequest; +import com.google.cloud.backupdr.v1beta.RestoreBackupResponse; +import com.google.protobuf.FieldMask; + +public class AsyncRestoreBackupLRO { + + public static void main(String[] args) throws Exception { + asyncRestoreBackupLRO(); + } + + public static void asyncRestoreBackupLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + RestoreBackupRequest request = + RestoreBackupRequest.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setRequestId("requestId693933066") + .setClearOverridesFieldMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + backupDRClient.restoreBackupOperationCallable().futureCall(request); + // Do something. + RestoreBackupResponse response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_RestoreBackup_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackup.java new file mode 100644 index 000000000000..54e10dc6c52c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackup.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_RestoreBackup_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.RestoreBackupRequest; +import com.google.cloud.backupdr.v1beta.RestoreBackupResponse; +import com.google.protobuf.FieldMask; + +public class SyncRestoreBackup { + + public static void main(String[] args) throws Exception { + syncRestoreBackup(); + } + + public static void syncRestoreBackup() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + RestoreBackupRequest request = + RestoreBackupRequest.newBuilder() + .setName( + BackupName.of( + "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString()) + .setRequestId("requestId693933066") + .setClearOverridesFieldMask(FieldMask.newBuilder().build()) + .build(); + RestoreBackupResponse response = backupDRClient.restoreBackupAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_RestoreBackup_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackupBackupname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackupBackupname.java new file mode 100644 index 000000000000..3a24fb74a75f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackupBackupname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_RestoreBackup_Backupname_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.RestoreBackupResponse; + +public class SyncRestoreBackupBackupname { + + public static void main(String[] args) throws Exception { + syncRestoreBackupBackupname(); + } + + public static void syncRestoreBackupBackupname() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupName name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]"); + RestoreBackupResponse response = backupDRClient.restoreBackupAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_RestoreBackup_Backupname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackupString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackupString.java new file mode 100644 index 000000000000..f3d14cb528ec --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/restorebackup/SyncRestoreBackupString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_RestoreBackup_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupName; +import com.google.cloud.backupdr.v1beta.RestoreBackupResponse; + +public class SyncRestoreBackupString { + + public static void main(String[] args) throws Exception { + syncRestoreBackupString(); + } + + public static void syncRestoreBackupString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]") + .toString(); + RestoreBackupResponse response = backupDRClient.restoreBackupAsync(name).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_RestoreBackup_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/setiampolicy/AsyncSetIamPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..207b45586c59 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = backupDRClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_SetIamPolicy_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/setiampolicy/SyncSetIamPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..604979f9bc34 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_SetIamPolicy_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = backupDRClient.setIamPolicy(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_SetIamPolicy_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/testiampermissions/AsyncTestIamPermissions.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..b7d4be98b7b7 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + backupDRClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_TestIamPermissions_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/testiampermissions/SyncTestIamPermissions.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..2fc5e1e43c55 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_TestIamPermissions_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = backupDRClient.testIamPermissions(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_TestIamPermissions_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/AsyncTriggerBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/AsyncTriggerBackup.java new file mode 100644 index 000000000000..e9c12d270e88 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/AsyncTriggerBackup.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_TriggerBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.cloud.backupdr.v1beta.TriggerBackupRequest; +import com.google.longrunning.Operation; +import java.util.HashMap; + +public class AsyncTriggerBackup { + + public static void main(String[] args) throws Exception { + asyncTriggerBackup(); + } + + public static void asyncTriggerBackup() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + TriggerBackupRequest request = + TriggerBackupRequest.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setRuleId("ruleId-919875273") + .setRequestId("requestId693933066") + .setCustomRetentionDays(-352387226) + .putAllLabels(new HashMap()) + .build(); + ApiFuture future = backupDRClient.triggerBackupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_TriggerBackup_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/AsyncTriggerBackupLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/AsyncTriggerBackupLRO.java new file mode 100644 index 000000000000..1c0e0ac4d53a --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/AsyncTriggerBackupLRO.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_TriggerBackup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.TriggerBackupRequest; +import java.util.HashMap; + +public class AsyncTriggerBackupLRO { + + public static void main(String[] args) throws Exception { + asyncTriggerBackupLRO(); + } + + public static void asyncTriggerBackupLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + TriggerBackupRequest request = + TriggerBackupRequest.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setRuleId("ruleId-919875273") + .setRequestId("requestId693933066") + .setCustomRetentionDays(-352387226) + .putAllLabels(new HashMap()) + .build(); + OperationFuture future = + backupDRClient.triggerBackupOperationCallable().futureCall(request); + // Do something. + BackupPlanAssociation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_TriggerBackup_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackup.java new file mode 100644 index 000000000000..4e57012647fe --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackup.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_TriggerBackup_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; +import com.google.cloud.backupdr.v1beta.TriggerBackupRequest; +import java.util.HashMap; + +public class SyncTriggerBackup { + + public static void main(String[] args) throws Exception { + syncTriggerBackup(); + } + + public static void syncTriggerBackup() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + TriggerBackupRequest request = + TriggerBackupRequest.newBuilder() + .setName( + BackupPlanAssociationName.of( + "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString()) + .setRuleId("ruleId-919875273") + .setRequestId("requestId693933066") + .setCustomRetentionDays(-352387226) + .putAllLabels(new HashMap()) + .build(); + BackupPlanAssociation response = backupDRClient.triggerBackupAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_TriggerBackup_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackupBackupplanassociationnameString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackupBackupplanassociationnameString.java new file mode 100644 index 000000000000..47da2a327e51 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackupBackupplanassociationnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_TriggerBackup_BackupplanassociationnameString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; + +public class SyncTriggerBackupBackupplanassociationnameString { + + public static void main(String[] args) throws Exception { + syncTriggerBackupBackupplanassociationnameString(); + } + + public static void syncTriggerBackupBackupplanassociationnameString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlanAssociationName name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]"); + String ruleId = "ruleId-919875273"; + BackupPlanAssociation response = backupDRClient.triggerBackupAsync(name, ruleId).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_TriggerBackup_BackupplanassociationnameString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackupStringString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackupStringString.java new file mode 100644 index 000000000000..3ae0298d6552 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/triggerbackup/SyncTriggerBackupStringString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_TriggerBackup_StringString_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociationName; + +public class SyncTriggerBackupStringString { + + public static void main(String[] args) throws Exception { + syncTriggerBackupStringString(); + } + + public static void syncTriggerBackupStringString() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + String name = + BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]") + .toString(); + String ruleId = "ruleId-919875273"; + BackupPlanAssociation response = backupDRClient.triggerBackupAsync(name, ruleId).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_TriggerBackup_StringString_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/AsyncUpdateAutoProtectionPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/AsyncUpdateAutoProtectionPolicy.java new file mode 100644 index 000000000000..5871dc051924 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/AsyncUpdateAutoProtectionPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAutoProtectionPolicy { + + public static void main(String[] args) throws Exception { + asyncUpdateAutoProtectionPolicy(); + } + + public static void asyncUpdateAutoProtectionPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateAutoProtectionPolicyRequest request = + UpdateAutoProtectionPolicyRequest.newBuilder() + .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + backupDRClient.updateAutoProtectionPolicyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/AsyncUpdateAutoProtectionPolicyLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/AsyncUpdateAutoProtectionPolicyLRO.java new file mode 100644 index 000000000000..96b3c9794c8f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/AsyncUpdateAutoProtectionPolicyLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAutoProtectionPolicyLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateAutoProtectionPolicyLRO(); + } + + public static void asyncUpdateAutoProtectionPolicyLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateAutoProtectionPolicyRequest request = + UpdateAutoProtectionPolicyRequest.newBuilder() + .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + OperationFuture future = + backupDRClient.updateAutoProtectionPolicyOperationCallable().futureCall(request); + // Do something. + AutoProtectionPolicy response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/SyncUpdateAutoProtectionPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/SyncUpdateAutoProtectionPolicy.java new file mode 100644 index 000000000000..bf8f6258e1b5 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/SyncUpdateAutoProtectionPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.UpdateAutoProtectionPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAutoProtectionPolicy { + + public static void main(String[] args) throws Exception { + syncUpdateAutoProtectionPolicy(); + } + + public static void syncUpdateAutoProtectionPolicy() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateAutoProtectionPolicyRequest request = + UpdateAutoProtectionPolicyRequest.newBuilder() + .setAutoProtectionPolicy(AutoProtectionPolicy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + AutoProtectionPolicy response = backupDRClient.updateAutoProtectionPolicyAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/SyncUpdateAutoProtectionPolicyAutoprotectionpolicyFieldmask.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/SyncUpdateAutoProtectionPolicyAutoprotectionpolicyFieldmask.java new file mode 100644 index 000000000000..350d9d6d276b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updateautoprotectionpolicy/SyncUpdateAutoProtectionPolicyAutoprotectionpolicyFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_AutoprotectionpolicyFieldmask_sync] +import com.google.cloud.backupdr.v1beta.AutoProtectionPolicy; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAutoProtectionPolicyAutoprotectionpolicyFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAutoProtectionPolicyAutoprotectionpolicyFieldmask(); + } + + public static void syncUpdateAutoProtectionPolicyAutoprotectionpolicyFieldmask() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + AutoProtectionPolicy autoProtectionPolicy = AutoProtectionPolicy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + AutoProtectionPolicy response = + backupDRClient.updateAutoProtectionPolicyAsync(autoProtectionPolicy, updateMask).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateAutoProtectionPolicy_AutoprotectionpolicyFieldmask_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/AsyncUpdateBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/AsyncUpdateBackup.java new file mode 100644 index 000000000000..604b4b3ae281 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/AsyncUpdateBackup.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupRequest request = + UpdateBackupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackup(Backup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backupDRClient.updateBackupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackup_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/AsyncUpdateBackupLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/AsyncUpdateBackupLRO.java new file mode 100644 index 000000000000..ff229e7a2749 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/AsyncUpdateBackupLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupRequest request = + UpdateBackupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackup(Backup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.updateBackupOperationCallable().futureCall(request); + // Do something. + Backup response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackup_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/SyncUpdateBackup.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/SyncUpdateBackup.java new file mode 100644 index 000000000000..6d40b06ce01d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/SyncUpdateBackup.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackup_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupRequest request = + UpdateBackupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackup(Backup.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Backup response = backupDRClient.updateBackupAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackup_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/SyncUpdateBackupBackupFieldmask.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/SyncUpdateBackupBackupFieldmask.java new file mode 100644 index 000000000000..22bd57aca07d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackup/SyncUpdateBackupBackupFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackup_BackupFieldmask_sync] +import com.google.cloud.backupdr.v1beta.Backup; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + Backup backup = Backup.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Backup response = backupDRClient.updateBackupAsync(backup, updateMask).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackup_BackupFieldmask_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/AsyncUpdateBackupPlan.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/AsyncUpdateBackupPlan.java new file mode 100644 index 000000000000..c7350cb74423 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/AsyncUpdateBackupPlan.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupPlan { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupPlan(); + } + + public static void asyncUpdateBackupPlan() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupPlanRequest request = + UpdateBackupPlanRequest.newBuilder() + .setBackupPlan(BackupPlan.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = backupDRClient.updateBackupPlanCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/AsyncUpdateBackupPlanLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/AsyncUpdateBackupPlanLRO.java new file mode 100644 index 000000000000..832771d88f0d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/AsyncUpdateBackupPlanLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupPlanLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupPlanLRO(); + } + + public static void asyncUpdateBackupPlanLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupPlanRequest request = + UpdateBackupPlanRequest.newBuilder() + .setBackupPlan(BackupPlan.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.updateBackupPlanOperationCallable().futureCall(request); + // Do something. + BackupPlan response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/SyncUpdateBackupPlan.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/SyncUpdateBackupPlan.java new file mode 100644 index 000000000000..22f76c3ee943 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/SyncUpdateBackupPlan.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupPlan { + + public static void main(String[] args) throws Exception { + syncUpdateBackupPlan(); + } + + public static void syncUpdateBackupPlan() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupPlanRequest request = + UpdateBackupPlanRequest.newBuilder() + .setBackupPlan(BackupPlan.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + BackupPlan response = backupDRClient.updateBackupPlanAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/SyncUpdateBackupPlanBackupplanFieldmask.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/SyncUpdateBackupPlanBackupplanFieldmask.java new file mode 100644 index 000000000000..b6913af4dc96 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplan/SyncUpdateBackupPlanBackupplanFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_BackupplanFieldmask_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlan; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupPlanBackupplanFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateBackupPlanBackupplanFieldmask(); + } + + public static void syncUpdateBackupPlanBackupplanFieldmask() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlan backupPlan = BackupPlan.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + BackupPlan response = backupDRClient.updateBackupPlanAsync(backupPlan, updateMask).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlan_BackupplanFieldmask_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/AsyncUpdateBackupPlanAssociation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/AsyncUpdateBackupPlanAssociation.java new file mode 100644 index 000000000000..6a5b6b32045b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/AsyncUpdateBackupPlanAssociation.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupPlanAssociation { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupPlanAssociation(); + } + + public static void asyncUpdateBackupPlanAssociation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupPlanAssociationRequest request = + UpdateBackupPlanAssociationRequest.newBuilder() + .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + backupDRClient.updateBackupPlanAssociationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/AsyncUpdateBackupPlanAssociationLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/AsyncUpdateBackupPlanAssociationLRO.java new file mode 100644 index 000000000000..f99c5546110c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/AsyncUpdateBackupPlanAssociationLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateBackupPlanAssociationLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateBackupPlanAssociationLRO(); + } + + public static void asyncUpdateBackupPlanAssociationLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupPlanAssociationRequest request = + UpdateBackupPlanAssociationRequest.newBuilder() + .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + backupDRClient.updateBackupPlanAssociationOperationCallable().futureCall(request); + // Do something. + BackupPlanAssociation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/SyncUpdateBackupPlanAssociation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/SyncUpdateBackupPlanAssociation.java new file mode 100644 index 000000000000..9e50c00649c0 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/SyncUpdateBackupPlanAssociation.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.cloud.backupdr.v1beta.UpdateBackupPlanAssociationRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupPlanAssociation { + + public static void main(String[] args) throws Exception { + syncUpdateBackupPlanAssociation(); + } + + public static void syncUpdateBackupPlanAssociation() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupPlanAssociationRequest request = + UpdateBackupPlanAssociationRequest.newBuilder() + .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + BackupPlanAssociation response = + backupDRClient.updateBackupPlanAssociationAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/SyncUpdateBackupPlanAssociationBackupplanassociationFieldmask.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/SyncUpdateBackupPlanAssociationBackupplanassociationFieldmask.java new file mode 100644 index 000000000000..009cb0cc4df0 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupplanassociation/SyncUpdateBackupPlanAssociationBackupplanassociationFieldmask.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_BackupplanassociationFieldmask_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupPlanAssociation; +import com.google.protobuf.FieldMask; + +public class SyncUpdateBackupPlanAssociationBackupplanassociationFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateBackupPlanAssociationBackupplanassociationFieldmask(); + } + + public static void syncUpdateBackupPlanAssociationBackupplanassociationFieldmask() + 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + BackupPlanAssociation response = + backupDRClient.updateBackupPlanAssociationAsync(backupPlanAssociation, updateMask).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupPlanAssociation_BackupplanassociationFieldmask_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/AsyncUpdateBackupVault.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/AsyncUpdateBackupVault.java new file mode 100644 index 000000000000..23fcb31f8f22 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/AsyncUpdateBackupVault.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupVault_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupVaultRequest request = + UpdateBackupVaultRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupVault(BackupVault.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setForce(true) + .setForceUpdateAccessRestriction(true) + .build(); + ApiFuture future = backupDRClient.updateBackupVaultCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupVault_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/AsyncUpdateBackupVaultLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/AsyncUpdateBackupVaultLRO.java new file mode 100644 index 000000000000..b9f3a28770dc --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/AsyncUpdateBackupVaultLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupVault_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupVaultRequest request = + UpdateBackupVaultRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupVault(BackupVault.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setForce(true) + .setForceUpdateAccessRestriction(true) + .build(); + OperationFuture future = + backupDRClient.updateBackupVaultOperationCallable().futureCall(request); + // Do something. + BackupVault response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupVault_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/SyncUpdateBackupVault.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/SyncUpdateBackupVault.java new file mode 100644 index 000000000000..a37f1399d9fa --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/SyncUpdateBackupVault.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupVault_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +import com.google.cloud.backupdr.v1beta.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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateBackupVaultRequest request = + UpdateBackupVaultRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setBackupVault(BackupVault.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setForce(true) + .setForceUpdateAccessRestriction(true) + .build(); + BackupVault response = backupDRClient.updateBackupVaultAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupVault_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/SyncUpdateBackupVaultBackupvaultFieldmask.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/SyncUpdateBackupVaultBackupvaultFieldmask.java new file mode 100644 index 000000000000..8c062ec138de --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatebackupvault/SyncUpdateBackupVaultBackupvaultFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateBackupVault_BackupvaultFieldmask_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.BackupVault; +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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + BackupVault backupVault = BackupVault.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + BackupVault response = backupDRClient.updateBackupVaultAsync(backupVault, updateMask).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateBackupVault_BackupvaultFieldmask_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/AsyncUpdateDataSource.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/AsyncUpdateDataSource.java new file mode 100644 index 000000000000..4929e0d67b8f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/AsyncUpdateDataSource.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateDataSource_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataSource { + + public static void main(String[] args) throws Exception { + asyncUpdateDataSource(); + } + + public static void asyncUpdateDataSource() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateDataSourceRequest request = + UpdateDataSourceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .build(); + ApiFuture future = backupDRClient.updateDataSourceCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateDataSource_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/AsyncUpdateDataSourceLRO.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/AsyncUpdateDataSourceLRO.java new file mode 100644 index 000000000000..779fbde9a98c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/AsyncUpdateDataSourceLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateDataSource_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.OperationMetadata; +import com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataSourceLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDataSourceLRO(); + } + + public static void asyncUpdateDataSourceLRO() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateDataSourceRequest request = + UpdateDataSourceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .build(); + OperationFuture future = + backupDRClient.updateDataSourceOperationCallable().futureCall(request); + // Do something. + DataSource response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateDataSource_LRO_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/SyncUpdateDataSource.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/SyncUpdateDataSource.java new file mode 100644 index 000000000000..3c2ad9c4f178 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/SyncUpdateDataSource.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateDataSource_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.cloud.backupdr.v1beta.UpdateDataSourceRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataSource { + + public static void main(String[] args) throws Exception { + syncUpdateDataSource(); + } + + public static void syncUpdateDataSource() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + UpdateDataSourceRequest request = + UpdateDataSourceRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataSource(DataSource.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .build(); + DataSource response = backupDRClient.updateDataSourceAsync(request).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateDataSource_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/SyncUpdateDataSourceDatasourceFieldmask.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/SyncUpdateDataSourceDatasourceFieldmask.java new file mode 100644 index 000000000000..37118ccde14d --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdr/updatedatasource/SyncUpdateDataSourceDatasourceFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDR_UpdateDataSource_DatasourceFieldmask_sync] +import com.google.cloud.backupdr.v1beta.BackupDRClient; +import com.google.cloud.backupdr.v1beta.DataSource; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataSourceDatasourceFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDataSourceDatasourceFieldmask(); + } + + public static void syncUpdateDataSourceDatasourceFieldmask() 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 (BackupDRClient backupDRClient = BackupDRClient.create()) { + DataSource dataSource = DataSource.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + DataSource response = backupDRClient.updateDataSourceAsync(dataSource, updateMask).get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDR_UpdateDataSource_DatasourceFieldmask_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateSetCredentialsProvider.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..7f9e6bcdcfd2 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummarySettings; +import com.google.cloud.backupdr.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + BackupDrProtectionSummarySettings backupDrProtectionSummarySettings = + BackupDrProtectionSummarySettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create(backupDrProtectionSummarySettings); + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_Create_SetCredentialsProvider_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateSetEndpoint.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..40e650d84d60 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_Create_SetEndpoint_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummarySettings; +import com.google.cloud.backupdr.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + BackupDrProtectionSummarySettings backupDrProtectionSummarySettings = + BackupDrProtectionSummarySettings.newBuilder().setEndpoint(myEndpoint).build(); + BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create(backupDrProtectionSummarySettings); + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_Create_SetEndpoint_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateUseHttpJsonTransport.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..af91b0c9bdb6 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_Create_UseHttpJsonTransport_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummarySettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + BackupDrProtectionSummarySettings backupDrProtectionSummarySettings = + BackupDrProtectionSummarySettings.newHttpJsonBuilder().build(); + BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create(backupDrProtectionSummarySettings); + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_Create_UseHttpJsonTransport_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getiampolicy/AsyncGetIamPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..675db337bc49 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + backupDrProtectionSummaryClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_GetIamPolicy_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getiampolicy/SyncGetIamPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..174ea3b49e31 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_GetIamPolicy_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = backupDrProtectionSummaryClient.getIamPolicy(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_GetIamPolicy_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getlocation/AsyncGetLocation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..63687a920f2b --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + backupDrProtectionSummaryClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_GetLocation_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getlocation/SyncGetLocation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..72756f5ece60 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_GetLocation_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = backupDrProtectionSummaryClient.getLocation(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_GetLocation_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/AsyncListLocations.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..d0d47740ca52 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + backupDrProtectionSummaryClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListLocations_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/AsyncListLocationsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..f1cef4d2eb1c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListLocations_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + backupDrProtectionSummaryClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListLocations_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/SyncListLocations.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..65c987709f0c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listlocations/SyncListLocations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListLocations_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : backupDrProtectionSummaryClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListLocations_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/AsyncListResourceBackupConfigs.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/AsyncListResourceBackupConfigs.java new file mode 100644 index 000000000000..b2e8fd234cf3 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/AsyncListResourceBackupConfigs.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ResourceBackupConfig; + +public class AsyncListResourceBackupConfigs { + + public static void main(String[] args) throws Exception { + asyncListResourceBackupConfigs(); + } + + public static void asyncListResourceBackupConfigs() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + ListResourceBackupConfigsRequest request = + ListResourceBackupConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + backupDrProtectionSummaryClient + .listResourceBackupConfigsPagedCallable() + .futureCall(request); + // Do something. + for (ResourceBackupConfig element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/AsyncListResourceBackupConfigsPaged.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/AsyncListResourceBackupConfigsPaged.java new file mode 100644 index 000000000000..2e80752cd40e --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/AsyncListResourceBackupConfigsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_Paged_async] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsResponse; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ResourceBackupConfig; +import com.google.common.base.Strings; + +public class AsyncListResourceBackupConfigsPaged { + + public static void main(String[] args) throws Exception { + asyncListResourceBackupConfigsPaged(); + } + + public static void asyncListResourceBackupConfigsPaged() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + ListResourceBackupConfigsRequest request = + ListResourceBackupConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListResourceBackupConfigsResponse response = + backupDrProtectionSummaryClient.listResourceBackupConfigsCallable().call(request); + for (ResourceBackupConfig element : response.getResourceBackupConfigsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_Paged_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigs.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigs.java new file mode 100644 index 000000000000..22c0d7b8a3b2 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigs.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ListResourceBackupConfigsRequest; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ResourceBackupConfig; + +public class SyncListResourceBackupConfigs { + + public static void main(String[] args) throws Exception { + syncListResourceBackupConfigs(); + } + + public static void syncListResourceBackupConfigs() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + ListResourceBackupConfigsRequest request = + ListResourceBackupConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (ResourceBackupConfig element : + backupDrProtectionSummaryClient.listResourceBackupConfigs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigsLocationname.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigsLocationname.java new file mode 100644 index 000000000000..9411b9b37f21 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigsLocationname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_Locationname_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ResourceBackupConfig; + +public class SyncListResourceBackupConfigsLocationname { + + public static void main(String[] args) throws Exception { + syncListResourceBackupConfigsLocationname(); + } + + public static void syncListResourceBackupConfigsLocationname() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (ResourceBackupConfig element : + backupDrProtectionSummaryClient.listResourceBackupConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_Locationname_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigsString.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigsString.java new file mode 100644 index 000000000000..e86b43c34010 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/listresourcebackupconfigs/SyncListResourceBackupConfigsString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_String_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.LocationName; +import com.google.cloud.backupdr.v1beta.ResourceBackupConfig; + +public class SyncListResourceBackupConfigsString { + + public static void main(String[] args) throws Exception { + syncListResourceBackupConfigsString(); + } + + public static void syncListResourceBackupConfigsString() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (ResourceBackupConfig element : + backupDrProtectionSummaryClient.listResourceBackupConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_ListResourceBackupConfigs_String_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/setiampolicy/AsyncSetIamPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..5d99861015b2 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + backupDrProtectionSummaryClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_SetIamPolicy_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/setiampolicy/SyncSetIamPolicy.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..2acc9a3c1c37 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_SetIamPolicy_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = backupDrProtectionSummaryClient.setIamPolicy(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_SetIamPolicy_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/testiampermissions/AsyncTestIamPermissions.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..679dfd9e62b8 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + backupDrProtectionSummaryClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_TestIamPermissions_async] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/testiampermissions/SyncTestIamPermissions.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..b24fe7e6441c --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummary/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummary_TestIamPermissions_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummaryClient; +import com.google.cloud.backupdr.v1beta.ManagementServerName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() 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 (BackupDrProtectionSummaryClient backupDrProtectionSummaryClient = + BackupDrProtectionSummaryClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + backupDrProtectionSummaryClient.testIamPermissions(request); + } + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummary_TestIamPermissions_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummarysettings/getlocation/SyncGetLocation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummarysettings/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..a72b77bdbd09 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrprotectionsummarysettings/getlocation/SyncGetLocation.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummarySettings_GetLocation_sync] +import com.google.cloud.backupdr.v1beta.BackupDrProtectionSummarySettings; +import java.time.Duration; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() 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 + BackupDrProtectionSummarySettings.Builder backupDrProtectionSummarySettingsBuilder = + BackupDrProtectionSummarySettings.newBuilder(); + backupDrProtectionSummarySettingsBuilder + .getLocationSettings() + .setRetrySettings( + backupDrProtectionSummarySettingsBuilder + .getLocationSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + BackupDrProtectionSummarySettings backupDrProtectionSummarySettings = + backupDrProtectionSummarySettingsBuilder.build(); + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummarySettings_GetLocation_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrsettings/createmanagementserver/SyncCreateManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrsettings/createmanagementserver/SyncCreateManagementServer.java new file mode 100644 index 000000000000..3ad5226f988f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrsettings/createmanagementserver/SyncCreateManagementServer.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDRSettings_CreateManagementServer_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.backupdr.v1beta.BackupDRSettings; +import java.time.Duration; + +public class SyncCreateManagementServer { + + public static void main(String[] args) throws Exception { + syncCreateManagementServer(); + } + + public static void syncCreateManagementServer() 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 + BackupDRSettings.Builder backupDRSettingsBuilder = BackupDRSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + backupDRSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END backupdr_v1beta_generated_BackupDRSettings_CreateManagementServer_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrsettings/getmanagementserver/SyncGetManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrsettings/getmanagementserver/SyncGetManagementServer.java new file mode 100644 index 000000000000..b14c66ffb897 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/backupdrsettings/getmanagementserver/SyncGetManagementServer.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.samples; + +// [START backupdr_v1beta_generated_BackupDRSettings_GetManagementServer_sync] +import com.google.cloud.backupdr.v1beta.BackupDRSettings; +import java.time.Duration; + +public class SyncGetManagementServer { + + public static void main(String[] args) throws Exception { + syncGetManagementServer(); + } + + public static void syncGetManagementServer() 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 + BackupDRSettings.Builder backupDRSettingsBuilder = BackupDRSettings.newBuilder(); + backupDRSettingsBuilder + .getManagementServerSettings() + .setRetrySettings( + backupDRSettingsBuilder + .getManagementServerSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + BackupDRSettings backupDRSettings = backupDRSettingsBuilder.build(); + } +} +// [END backupdr_v1beta_generated_BackupDRSettings_GetManagementServer_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrprotectionsummarystubsettings/getlocation/SyncGetLocation.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrprotectionsummarystubsettings/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..e11a5fdadb67 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrprotectionsummarystubsettings/getlocation/SyncGetLocation.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub.samples; + +// [START backupdr_v1beta_generated_BackupDrProtectionSummaryStubSettings_GetLocation_sync] +import com.google.cloud.backupdr.v1beta.stub.BackupDrProtectionSummaryStubSettings; +import java.time.Duration; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() 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 + BackupDrProtectionSummaryStubSettings.Builder backupDrProtectionSummarySettingsBuilder = + BackupDrProtectionSummaryStubSettings.newBuilder(); + backupDrProtectionSummarySettingsBuilder + .getLocationSettings() + .setRetrySettings( + backupDrProtectionSummarySettingsBuilder + .getLocationSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + BackupDrProtectionSummaryStubSettings backupDrProtectionSummarySettings = + backupDrProtectionSummarySettingsBuilder.build(); + } +} +// [END backupdr_v1beta_generated_BackupDrProtectionSummaryStubSettings_GetLocation_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrstubsettings/createmanagementserver/SyncCreateManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrstubsettings/createmanagementserver/SyncCreateManagementServer.java new file mode 100644 index 000000000000..fce8244b029f --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrstubsettings/createmanagementserver/SyncCreateManagementServer.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub.samples; + +// [START backupdr_v1beta_generated_BackupDRStubSettings_CreateManagementServer_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.backupdr.v1beta.stub.BackupDRStubSettings; +import java.time.Duration; + +public class SyncCreateManagementServer { + + public static void main(String[] args) throws Exception { + syncCreateManagementServer(); + } + + public static void syncCreateManagementServer() 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 + BackupDRStubSettings.Builder backupDRSettingsBuilder = BackupDRStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + backupDRSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END backupdr_v1beta_generated_BackupDRStubSettings_CreateManagementServer_sync] diff --git a/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrstubsettings/getmanagementserver/SyncGetManagementServer.java b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrstubsettings/getmanagementserver/SyncGetManagementServer.java new file mode 100644 index 000000000000..fc615c9b5f05 --- /dev/null +++ b/java-backupdr/samples/snippets/generated/com/google/cloud/backupdr/v1beta/stub/backupdrstubsettings/getmanagementserver/SyncGetManagementServer.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 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.backupdr.v1beta.stub.samples; + +// [START backupdr_v1beta_generated_BackupDRStubSettings_GetManagementServer_sync] +import com.google.cloud.backupdr.v1beta.stub.BackupDRStubSettings; +import java.time.Duration; + +public class SyncGetManagementServer { + + public static void main(String[] args) throws Exception { + syncGetManagementServer(); + } + + public static void syncGetManagementServer() 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 + BackupDRStubSettings.Builder backupDRSettingsBuilder = BackupDRStubSettings.newBuilder(); + backupDRSettingsBuilder + .getManagementServerSettings() + .setRetrySettings( + backupDRSettingsBuilder + .getManagementServerSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + BackupDRStubSettings backupDRSettings = backupDRSettingsBuilder.build(); + } +} +// [END backupdr_v1beta_generated_BackupDRStubSettings_GetManagementServer_sync] diff --git a/librarian.yaml b/librarian.yaml index 62b53562ed00..936f4e3db2c7 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -421,6 +421,11 @@ libraries: additional_protos: - path: google/cloud/location/locations.proto - path: google/iam/v1/iam_policy.proto + - path: google/cloud/backupdr/v1beta + java: + additional_protos: + - path: google/cloud/location/locations.proto + - path: google/iam/v1/iam_policy.proto java: api_id_override: backupdr.googleapis.com api_description_override: 'Backup and DR Service is a powerful, centralized, cloud-first backup and disaster recovery solution for cloud-based and hybrid workloads. ' diff --git a/versions.txt b/versions.txt index 86d7ced78548..27bee25281ba 100644 --- a/versions.txt +++ b/versions.txt @@ -1119,5 +1119,7 @@ google-shopping-merchant-loyaltycustomers-bom:0.1.0:0.2.0-SNAPSHOT proto-google-shopping-merchant-loyaltycustomers-v1:0.1.0:0.2.0-SNAPSHOT grpc-google-shopping-merchant-loyaltycustomers-v1:0.1.0:0.2.0-SNAPSHOT google-shopping-merchant-loyaltycustomers:0.1.0:0.2.0-SNAPSHOT -proto-google-cloud-networkservices-v1beta1:0.53.0:0.54.0-SNAPSHOT +grpc-google-cloud-backupdr-v1beta:0.56.0:0.57.0-SNAPSHOT grpc-google-cloud-networkservices-v1beta1:0.53.0:0.54.0-SNAPSHOT +proto-google-cloud-backupdr-v1beta:0.56.0:0.57.0-SNAPSHOT +proto-google-cloud-networkservices-v1beta1:0.53.0:0.54.0-SNAPSHOT